From b94a3354932dbcf6680e8d378219e9f41f29873e Mon Sep 17 00:00:00 2001 From: rondlh <77279634+rondlh@users.noreply.github.com> Date: Tue, 12 Dec 2023 08:48:02 +0800 Subject: [PATCH 001/236] =?UTF-8?q?=E2=9C=A8=20SERIAL=5FDMA=20(for=20some?= =?UTF-8?q?=20STM32Fx)=20(#26328)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 24 +- Marlin/src/HAL/AVR/MarlinSerial.h | 4 - Marlin/src/HAL/AVR/inc/Conditionals_LCD.h | 4 + Marlin/src/HAL/LPC1768/MarlinSerial.h | 10 - Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h | 4 + Marlin/src/HAL/LPC1768/inc/Conditionals_adv.h | 7 + Marlin/src/HAL/STM32/HardwareSerial.cpp | 449 ++++++++++++++++++ Marlin/src/HAL/STM32/HardwareSerial.h | 85 ++++ Marlin/src/HAL/STM32/MarlinSerial.cpp | 60 ++- Marlin/src/HAL/STM32/MarlinSerial.h | 37 +- Marlin/src/inc/SanityCheck.h | 9 + buildroot/tests/STM32F103RE_btt | 1 + 12 files changed, 637 insertions(+), 57 deletions(-) create mode 100644 Marlin/src/HAL/STM32/HardwareSerial.cpp create mode 100644 Marlin/src/HAL/STM32/HardwareSerial.h diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 5871c99a215f..e4f85a8d87b7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2649,10 +2649,12 @@ //#define FULL_REPORT_TO_HOST_FEATURE // Auto-report the machine status like Grbl CNC #endif -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +/** + * Bad Serial-connections can miss a received command by sending an 'ok' + * Therefore some clients abort after 30 seconds in a timeout. + * Some other clients start sending commands while receiving a 'wait'. + * This "wait" is only sent when the buffer is empty. 1 second is a good value here. + */ //#define NO_TIMEOUTS 1000 // (ms) // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. @@ -2665,6 +2667,15 @@ // For serial echo, the number of digits after the decimal point //#define SERIAL_FLOAT_PRECISION 4 +/** + * This feature is EXPERIMENTAL so use with caution and test thoroughly. + * Enable this option to receive data on the serial ports via the onboard DMA + * controller for more stable and reliable high-speed serial communication. + * Only some STM32 MCUs are currently supported. + * Note: This has no effect on emulated USB serial ports. + */ +//#define SERIAL_DMA + /** * Set the number of proportional font spaces required to fill up a typical character space. * This can help to better align the output of commands like `G29 O` Mesh Output. @@ -3442,9 +3453,8 @@ /** * TWI/I2C BUS * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. + * This feature is EXPERIMENTAL but may be useful for custom I2C peripherals. + * Enable this to send and receive I2C data from slave devices on the bus. * * ; Example #1 * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) diff --git a/Marlin/src/HAL/AVR/MarlinSerial.h b/Marlin/src/HAL/AVR/MarlinSerial.h index f47541f12dc5..a40730e0a87f 100644 --- a/Marlin/src/HAL/AVR/MarlinSerial.h +++ b/Marlin/src/HAL/AVR/MarlinSerial.h @@ -37,10 +37,6 @@ #include "../../core/types.h" #include "../../core/serial_hook.h" -#ifndef SERIAL_PORT - #define SERIAL_PORT 0 -#endif - #ifndef USBCON // The presence of the UBRRH register is used to detect a UART. diff --git a/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h b/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h index 5f1c4b16019d..65b019b261a8 100644 --- a/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h @@ -20,3 +20,7 @@ * */ #pragma once + +#ifndef SERIAL_PORT + #define SERIAL_PORT 0 +#endif diff --git a/Marlin/src/HAL/LPC1768/MarlinSerial.h b/Marlin/src/HAL/LPC1768/MarlinSerial.h index 3e6848a1e3d0..2fadd8209bdf 100644 --- a/Marlin/src/HAL/LPC1768/MarlinSerial.h +++ b/Marlin/src/HAL/LPC1768/MarlinSerial.h @@ -30,16 +30,6 @@ #endif #include "../../core/serial_hook.h" -#ifndef SERIAL_PORT - #define SERIAL_PORT 0 -#endif -#ifndef RX_BUFFER_SIZE - #define RX_BUFFER_SIZE 128 -#endif -#ifndef TX_BUFFER_SIZE - #define TX_BUFFER_SIZE 32 -#endif - class MarlinSerial : public HardwareSerial { public: MarlinSerial(LPC_UART_TypeDef *UARTx) : HardwareSerial(UARTx) { } diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h index 5f1c4b16019d..65b019b261a8 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h @@ -20,3 +20,7 @@ * */ #pragma once + +#ifndef SERIAL_PORT + #define SERIAL_PORT 0 +#endif diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_adv.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_adv.h index 8e7cab185f2a..9d04c4f787c6 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_adv.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_adv.h @@ -24,3 +24,10 @@ #if DISABLED(NO_SD_HOST_DRIVE) #define HAS_SD_HOST_DRIVE 1 #endif + +#ifndef RX_BUFFER_SIZE + #define RX_BUFFER_SIZE 128 +#endif +#ifndef TX_BUFFER_SIZE + #define TX_BUFFER_SIZE 32 +#endif diff --git a/Marlin/src/HAL/STM32/HardwareSerial.cpp b/Marlin/src/HAL/STM32/HardwareSerial.cpp new file mode 100644 index 000000000000..a6f97f356e2e --- /dev/null +++ b/Marlin/src/HAL/STM32/HardwareSerial.cpp @@ -0,0 +1,449 @@ +/** + * 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 + * Copyright (c) 2017 Victor Perez + * + * 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 . + * + */ + +// +// HAL_HardwareSerial Class. Adapted from Arduino HardwareSerial. +// + +#include "../platforms.h" + +#ifdef HAL_STM32 + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(SERIAL_DMA) && defined(HAL_UART_MODULE_ENABLED) && !defined(HAL_UART_MODULE_ONLY) + +#include +#include "HardwareSerial.h" +#include "uart.h" + +// USART/UART PIN MAPPING FOR STM32F0/F1/F2/F4/F7 +#ifndef PIN_SERIAL1_TX + #define PIN_SERIAL1_TX PA9 +#endif +#ifndef PIN_SERIAL1_RX + #define PIN_SERIAL1_RX PA10 +#endif +#ifndef PIN_SERIAL2_TX + #define PIN_SERIAL2_TX PA2 +#endif +#ifndef PIN_SERIAL2_RX + #define PIN_SERIAL2_RX PA3 +#endif +#ifndef PIN_SERIAL3_TX + #define PIN_SERIAL3_TX PB10 +#endif +#ifndef PIN_SERIAL3_RX + #define PIN_SERIAL3_RX PB11 +#endif +#ifndef PIN_SERIAL4_TX + #define PIN_SERIAL4_TX PC10 +#endif +#ifndef PIN_SERIAL4_RX + #define PIN_SERIAL4_RX PC11 +#endif +#ifndef PIN_SERIAL5_TX + #define PIN_SERIAL5_TX PC12 +#endif +#ifndef PIN_SERIAL5_RX + #define PIN_SERIAL5_RX PD2 +#endif +#ifndef PIN_SERIAL6_TX + #define PIN_SERIAL6_TX PC6 +#endif +#ifndef PIN_SERIAL6_RX + #define PIN_SERIAL6_RX PC7 +#endif + +// TODO: Get from include file + +#if ANY(STM32F2xx, STM32F4xx, STM32F7xx) + + #define RCC_AHB1Periph_DMA1 ((uint32_t)0x00200000) + #define RCC_AHB1Periph_DMA2 ((uint32_t)0x00400000) + + void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { + // Check the parameters + assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); + + assert_param(IS_FUNCTIONAL_STATE(NewState)); + if (NewState != DISABLE) + RCC->AHB1ENR |= RCC_AHB1Periph; + else + RCC->AHB1ENR &= ~RCC_AHB1Periph; + } + +#endif + +#if ANY(STM32F0xx, STM32F1xx) + + #define RCC_AHBPeriph_DMA1 ((uint32_t)0x00000001) + #define RCC_AHBPeriph_DMA2 ((uint32_t)0x00000002) + + void RCC_AHBPeriphClockCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState) { + /* Check the parameters */ + assert_param(IS_RCC_AHB_PERIPH(RCC_AHBPeriph)); + assert_param(IS_FUNCTIONAL_STATE(NewState)); + + if (NewState != DISABLE) + RCC->AHBENR |= RCC_AHBPeriph; + else + RCC->AHBENR &= ~RCC_AHBPeriph; + } + +#endif + +// END OF TODO------------------------------------------------------ + +// SerialEvent functions are weak, so when the user doesn't define them, +// the linker just sets their address to 0 (which is checked below). +#ifdef USING_HW_SERIAL1 + HAL_HardwareSerial HSerial1(USART1); + void serialEvent1() __attribute__((weak)); +#endif +#ifdef USING_HW_SERIAL2 + HAL_HardwareSerial HSerial2(USART2); + void serialEvent2() __attribute__((weak)); +#endif +#ifdef USING_HW_SERIAL3 + HAL_HardwareSerial Serial3(USART3); + void serialEvent3() __attribute__((weak)); +#endif +#ifdef USING_HW_SERIAL4 + #ifdef USART4 + HAL_HardwareSerial HSerial4(USART4); + #else + HAL_HardwareSerial HSerial4(UART4); + #endif + void serialEvent4() __attribute__((weak)); +#endif +#ifdef USING_HW_SERIAL5 + #ifdef USART5 + HAL_HardwareSerial HSerial5(USART5); + #else + HAL_HardwareSerial HSerial5(UART5); + #endif + void serialEvent5() __attribute__((weak)); +#endif +#ifdef USING_HW_SERIAL6 + #ifdef USART6 + HAL_HardwareSerial HSerial5(USART6); + #else + HAL_HardwareSerial HSerial5(UART6); + #endif + void serialEvent5() __attribute__((weak)); +#endif + +// Constructors //////////////////////////////////////////////////////////////// + +HAL_HardwareSerial::HAL_HardwareSerial(void *peripheral) { + if (peripheral == USART1) { + setRx(PIN_SERIAL1_RX); + setTx(PIN_SERIAL1_TX); + _uart_index = 0; + #ifdef DMA2_Stream2 + RX_DMA = { USART1, RCC_AHB1Periph_DMA2, 4, DMA2_Stream2 }; + #endif + #ifdef DMA1_Channel5 + RX_DMA = { USART1, RCC_AHBPeriph_DMA1, DMA1, DMA1_Channel5 }; + #endif + } + else if (peripheral == USART2) { + setRx(PIN_SERIAL2_RX); + setTx(PIN_SERIAL2_TX); + _uart_index = 1; + #ifdef DMA1_Stream5 + RX_DMA = { USART2, RCC_AHB1Periph_DMA1, 4, DMA1_Stream5 }; + #endif + #ifdef DMA1_Channel6 + RX_DMA = { USART2, RCC_AHBPeriph_DMA1, DMA1, DMA1_Channel6 }; + #endif + } + else if (peripheral == USART3) { + setRx(PIN_SERIAL3_RX); + setTx(PIN_SERIAL3_TX); + _uart_index = 2; + #ifdef DMA1_Stream1 + RX_DMA = { USART3, RCC_AHB1Periph_DMA1, 4, DMA1_Stream1 }; + #endif + #ifdef DMA1_Channel3 // F0 has no support for UART3, requires system remapping + RX_DMA = { USART3, RCC_AHBPeriph_DMA1, DMA1, DMA1_Channel3 }; + #endif + } + + #ifdef USART4 // Only F2 / F4 / F7 + else if (peripheral == USART4) { + #ifdef DMA1_Stream2 + RX_DMA = { USART4, RCC_AHB1Periph_DMA1, 4, DMA1_Stream2 }; + #endif + setRx(PIN_SERIAL4_RX); + setTx(PIN_SERIAL4_TX); + _uart_index = 3; + } + #endif + + #ifdef UART4 + else if (peripheral == UART4) { + #ifdef DMA1_Stream2 + RX_DMA = { UART4, RCC_AHB1Periph_DMA1, 4, DMA1_Stream2 }; + #endif + #ifdef DMA2_Channel3 // STM32F0xx has only 3 UARTs + RX_DMA = { UART4, RCC_AHBPeriph_DMA2, DMA2, DMA2_Channel3 }; + #endif + setRx(PIN_SERIAL4_RX); + setTx(PIN_SERIAL4_TX); + _uart_index = 3; + } + #endif + + #ifdef UART5 // Only F2 / F4 / F7 + else if (peripheral == UART5) { + #ifdef DMA1_Stream0 + RX_DMA = { UART5, RCC_AHB1Periph_DMA1, 4, DMA1_Stream0 }; + #endif + setRx(PIN_SERIAL5_RX); + setTx(PIN_SERIAL5_TX); + _uart_index = 4; + } + #endif + + #ifdef USART6 // Only F2 / F4 / F7 + else if (peripheral == USART6) { + #ifdef DMA2_Stream1 + RX_DMA = { USART6, RCC_AHB1Periph_DMA2, 4, DMA2_Stream1 }; + #endif + setRx(PIN_SERIAL6_RX); + setTx(PIN_SERIAL6_TX); + _uart_index = 5; + } + #endif + + else { // else get the pins of the first peripheral occurence in PinMap + _serial.pin_rx = pinmap_pin(peripheral, PinMap_UART_RX); + _serial.pin_tx = pinmap_pin(peripheral, PinMap_UART_TX); + } + + init(_serial.pin_rx, _serial.pin_tx); +} + +void HAL_HardwareSerial::setRx(uint32_t _rx) { + _serial.pin_rx = digitalPinToPinName(_rx); +} + +void HAL_HardwareSerial::setTx(uint32_t _tx) { + _serial.pin_tx = digitalPinToPinName(_tx); +} + +void HAL_HardwareSerial::init(PinName _rx, PinName _tx) { + _serial.pin_rx = _rx; + _serial.rx_buff = _rx_buffer; + _serial.rx_head = _serial.rx_tail = 0; + + _serial.pin_tx = _tx; + _serial.tx_buff = _tx_buffer; + _serial.tx_head = _serial.tx_tail = 0; +} + +// Actual interrupt handlers ////////////////////////////////////////////////////////////// + +/** + * @brief Read receive byte from uart + * @param obj : pointer to serial_t structure + * @retval last character received + */ +int HAL_HardwareSerial::_tx_complete_irq(serial_t *obj) { + // If interrupts are enabled, there must be more data in the output buffer. Send the next byte + obj->tx_tail = (obj->tx_tail + 1) % TX_BUFFER_SIZE; + + if (obj->tx_head == obj->tx_tail) return -1; + + return 0; +} + +// Public Methods ////////////////////////////////////////////////////////////// + +void HAL_HardwareSerial::begin(unsigned long baud, uint8_t config) { + uint32_t databits = 0, stopbits = 0, parity = 0; + + _baud = baud; + _config = config; + + // Manage databits + switch (config & 0x07) { + case 0x02: databits = 6; break; + case 0x04: databits = 7; break; + case 0x06: databits = 8; break; + default: databits = 0; break; + } + + if ((config & 0x30) == 0x30) { + parity = UART_PARITY_ODD; + databits++; + } + else if ((config & 0x20) == 0x20) { + parity = UART_PARITY_EVEN; + databits++; + } + else + parity = UART_PARITY_NONE; + + stopbits = (config & 0x08) == 0x08 ? UART_STOPBITS_2 : UART_STOPBITS_1; + + switch (databits) { + #ifdef UART_WORDLENGTH_7B + case 7: databits = UART_WORDLENGTH_7B; break; + #endif + case 8: databits = UART_WORDLENGTH_8B; break; + case 9: databits = UART_WORDLENGTH_9B; break; + default: + case 0: Error_Handler(); break; + } + + uart_init(&_serial, (uint32_t)baud, databits, parity, stopbits); + Serial_DMA_Read_Enable(); // Start the circular DMA serial reading process, no callback needed +} + +void HAL_HardwareSerial::end() { + flush(); // Wait for transmission of outgoing data + uart_deinit(&_serial); + _serial.rx_head = _serial.rx_tail; // Clear any received data +} + +// Update buffer head for DMA progress +void HAL_HardwareSerial::update_rx_head() { + + #if ENABLED(EMERGENCY_PARSER) + static uint32_t flag = 0; + while (flag != _serial.rx_head) { // send all available data to emergency parser immediately + emergency_parser.update(static_cast(this)->emergency_state, _serial.rx_buff[flag]); + flag = (flag + 1) % RX_BUFFER_SIZE; + } + #endif + + #if ANY(STM32F2xx, STM32F4xx, STM32F7xx) + _serial.rx_head = RX_BUFFER_SIZE - RX_DMA.dma_streamRX->NDTR; + #endif + + #if ANY(STM32F0xx, STM32F1xx) + _serial.rx_head = RX_BUFFER_SIZE - RX_DMA.dma_channelRX->CNDTR; + #endif + +} + +int HAL_HardwareSerial::available() { + update_rx_head(); + return ((unsigned int)(RX_BUFFER_SIZE + _serial.rx_head - _serial.rx_tail)) % RX_BUFFER_SIZE; +} + +int HAL_HardwareSerial::peek() { + update_rx_head(); + if (_serial.rx_head == _serial.rx_tail) return -1; + return _serial.rx_buff[_serial.rx_tail]; +} + +int HAL_HardwareSerial::read() { + update_rx_head(); + if (_serial.rx_head == _serial.rx_tail) return -1; // No chars if the head isn't ahead of the tail + + unsigned char c = _serial.rx_buff[_serial.rx_tail]; + _serial.rx_tail = (rx_buffer_index_t)(_serial.rx_tail + 1) % RX_BUFFER_SIZE; + return c; +} + +size_t HAL_HardwareSerial::write(uint8_t c) { // Interrupt based writing + tx_buffer_index_t i = (_serial.tx_head + 1) % TX_BUFFER_SIZE; + + // If the output buffer is full, there's nothing for it other than to + // wait for the interrupt handler to empty it a bit + while (i == _serial.tx_tail) { /* nada */ } // NOP, let the interrupt free up space for us + + _serial.tx_buff[_serial.tx_head] = c; + _serial.tx_head = i; + + if (!serial_tx_active(&_serial)) + uart_attach_tx_callback(&_serial, _tx_complete_irq); // Write next byte, launch interrupt + + return 1; +} + +void HAL_HardwareSerial::flush() { + while ((_serial.tx_head != _serial.tx_tail)) { /* nada */ } // nop, the interrupt handler will free up space for us +} + +#if ANY(STM32F2xx, STM32F4xx, STM32F7xx) + + void HAL_HardwareSerial::Serial_DMA_Read_Enable() { + RCC_AHB1PeriphClockCmd(RX_DMA.dma_rcc, ENABLE); // Enable DMA clock + + #ifdef STM32F7xx + RX_DMA.dma_streamRX->PAR = (uint32_t)(&RX_DMA.uart->RDR); // RX peripheral receive address (usart) F7 + #else + RX_DMA.dma_streamRX->PAR = (uint32_t)(&RX_DMA.uart->DR); // RX peripheral address (usart) F2 / F4 + #endif + RX_DMA.dma_streamRX->M0AR = (uint32_t)_serial.rx_buff; // RX destination address (memory) + RX_DMA.dma_streamRX->NDTR = RX_BUFFER_SIZE; // RX buffer size + + RX_DMA.dma_streamRX->CR = (RX_DMA.dma_channel << 25); // RX channel selection, set to 0 all the other CR bits + + RX_DMA.dma_streamRX->CR |= (3 << 16); // RX priority level: Very High + + //RX_DMA.dma_streamRX->CR &= ~(3 << 13); // RX memory data size: 8 bit + //RX_DMA.dma_streamRX->CR &= ~(3 << 11); // RX peripheral data size: 8 bit + RX_DMA.dma_streamRX->CR |= (1 << 10); // RX memory increment mode + //RX_DMA.dma_streamRX->CR &= ~(1 << 9); // RX peripheral no increment mode + RX_DMA.dma_streamRX->CR |= (1 << 8); // RX circular mode enabled + //RX_DMA.dma_streamRX->CR &= ~(1 << 6); // RX data transfer direction: Peripheral-to-memory + RX_DMA.uart->CR3 |= (1 << 6); // Enable DMA receiver (DMAR) + RX_DMA.dma_streamRX->CR |= (1 << 0); // RX enable DMA + } + +#endif // STM32F2xx || STM32F4xx || STM32F7xx + +#if ANY(STM32F0xx, STM32F1xx) + + void HAL_HardwareSerial::Serial_DMA_Read_Enable() { + RCC_AHBPeriphClockCmd(RX_DMA.dma_rcc, ENABLE); // enable DMA clock + + RX_DMA.dma_channelRX->CPAR = (uint32_t)(&RX_DMA.uart->DR); // RX peripheral address (usart) + RX_DMA.dma_channelRX->CMAR = (uint32_t)_serial.rx_buff; // RX destination address (memory) + RX_DMA.dma_channelRX->CNDTR = RX_BUFFER_SIZE; // RX buffer size + + RX_DMA.dma_channelRX->CCR = 0; // RX channel selection, set to 0 all the other CR bits + + RX_DMA.dma_channelRX->CCR |= (3<<12); // RX priority level: Very High + + //RX_DMA.dma_channelRX->CCR &= ~(1<<10); // RX memory data size: 8 bit + //RX_DMA.dma_channelRX->CCR &= ~(1<<8); // RX peripheral data size: 8 bit + RX_DMA.dma_channelRX->CCR |= (1<<7); // RX memory increment mode + //RX_DMA.dma_channelRX->CCR &= ~(1<<6); // RX peripheral no increment mode + RX_DMA.dma_channelRX->CCR |= (1<<5); // RX circular mode enabled + //RX_DMA.dma_channelRX->CCR &= ~(1<<4); // RX data transfer direction: Peripheral-to-memory + + RX_DMA.uart->CR3 |= (1<<6); // enable DMA receiver (DMAR) + RX_DMA.dma_channelRX->CCR |= (1<<0); // RX enable DMA + } + +#endif // STM32F0xx || STM32F1xx + +#endif // SERIAL_DMA && HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/HardwareSerial.h b/Marlin/src/HAL/STM32/HardwareSerial.h new file mode 100644 index 000000000000..cc564322b4d5 --- /dev/null +++ b/Marlin/src/HAL/STM32/HardwareSerial.h @@ -0,0 +1,85 @@ +/** + * 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 + * Copyright (c) 2017 Victor Perez + * + * 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 + +// +// HAL_HardwareSerial Class. Adapted from Arduino HardwareSerial. +// + +#if RX_BUFFER_SIZE == 0 + #undef RX_BUFFER_SIZE + #define RX_BUFFER_SIZE 128 +#endif + +#if TX_BUFFER_SIZE == 0 + #undef TX_BUFFER_SIZE + #define TX_BUFFER_SIZE 64 +#endif + +typedef struct { + USART_TypeDef * uart; + uint32_t dma_rcc; + #if ANY(STM32F0xx, STM32F1xx) // F0 / F1 + DMA_TypeDef * dma_controller; + DMA_Channel_TypeDef * dma_channelRX; + #else // F2 / F4 / F7 + uint32_t dma_channel; + DMA_Stream_TypeDef * dma_streamRX; + #endif +} DMA_CFG; + +class HAL_HardwareSerial : public Stream { + protected: + // Don't put any members after these buffers, since only the first + // 32 bytes of this struct can be accessed quickly using the ldd instruction. + unsigned char _rx_buffer[RX_BUFFER_SIZE]; + unsigned char _tx_buffer[TX_BUFFER_SIZE]; + + serial_t _serial; + + public: + HAL_HardwareSerial(void *peripheral); + void begin(unsigned long, uint8_t); + void end(); + virtual int available(); + virtual int read(); + virtual int peek(); + virtual size_t write(uint8_t); + virtual void flush(); + operator bool() { return true; } + + void setRx(uint32_t _rx); + void setTx(uint32_t _tx); + + static int _tx_complete_irq(serial_t *obj); // Interrupt handler + + private: + uint8_t _uart_index; + bool _rx_enabled; + uint8_t _config; + unsigned long _baud; + void init(PinName _rx, PinName _tx); + void update_rx_head(); + DMA_CFG RX_DMA; + void Serial_DMA_Read_Enable(); +}; diff --git a/Marlin/src/HAL/STM32/MarlinSerial.cpp b/Marlin/src/HAL/STM32/MarlinSerial.cpp index 9f0b003a316b..c4bc62994908 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32/MarlinSerial.cpp @@ -47,10 +47,15 @@ #define USART9 UART9 #endif -#define DECLARE_SERIAL_PORT(ser_num) \ - void _rx_complete_irq_ ## ser_num (serial_t * obj); \ - MSerialT MSerial ## ser_num (true, USART ## ser_num, &_rx_complete_irq_ ## ser_num); \ - void _rx_complete_irq_ ## ser_num (serial_t * obj) { MSerial ## ser_num ._rx_complete_irq(obj); } +#if ENABLED(SERIAL_DMA) + #define DECLARE_SERIAL_PORT(ser_num) \ + MSerialT MSerial ## ser_num (true, USART ## ser_num); +#else + #define DECLARE_SERIAL_PORT(ser_num) \ + void _rx_complete_irq_ ## ser_num (serial_t * obj); \ + MSerialT MSerial ## ser_num (true, USART ## ser_num, &_rx_complete_irq_ ## ser_num); \ + void _rx_complete_irq_ ## ser_num (serial_t * obj) { MSerial ## ser_num ._rx_complete_irq(obj); } +#endif #if USING_HW_SERIAL1 DECLARE_SERIAL_PORT(1) @@ -87,33 +92,38 @@ #endif void MarlinSerial::begin(unsigned long baud, uint8_t config) { - HardwareSerial::begin(baud, config); - // Replace the IRQ callback with the one we have defined - TERN_(EMERGENCY_PARSER, _serial.rx_callback = _rx_callback); + #if ENABLED(SERIAL_DMA) + HAL_HardwareSerial::begin(baud, config); + #else + HardwareSerial::begin(baud, config); + // Replace the IRQ callback with the one we have defined + TERN_(EMERGENCY_PARSER, _serial.rx_callback = _rx_callback); + #endif } -// This function is Copyright (c) 2006 Nicholas Zambetti. -void MarlinSerial::_rx_complete_irq(serial_t *obj) { - // No Parity error, read byte and store it in the buffer if there is room - unsigned char c; +#if DISABLED(SERIAL_DMA) - if (uart_getc(obj, &c) == 0) { + // This function Copyright (c) 2006 Nicholas Zambetti. + void MarlinSerial::_rx_complete_irq(serial_t *obj) { + // No Parity error, read byte and store it in the buffer if there is room + unsigned char c; + if (uart_getc(obj, &c) == 0) { - rx_buffer_index_t i = (unsigned int)(obj->rx_head + 1) % SERIAL_RX_BUFFER_SIZE; + rx_buffer_index_t i = (unsigned int)(obj->rx_head + 1) % SERIAL_RX_BUFFER_SIZE; - // if we should be storing the received character into the location - // just before the tail (meaning that the head would advance to the - // current location of the tail), we're about to overflow the buffer - // and so we don't write the character or advance the head. - if (i != obj->rx_tail) { - obj->rx_buff[obj->rx_head] = c; - obj->rx_head = i; - } + // If tail overlaps head the buffer is overflowed + // so don't write the character or advance the head. + if (i != obj->rx_tail) { + obj->rx_buff[obj->rx_head] = c; + obj->rx_head = i; + } - #if ENABLED(EMERGENCY_PARSER) - emergency_parser.update(static_cast(this)->emergency_state, c); - #endif + #if ENABLED(EMERGENCY_PARSER) + emergency_parser.update(static_cast(this)->emergency_state, c); + #endif + } } -} + +#endif // !SERIAL_DMA #endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/MarlinSerial.h b/Marlin/src/HAL/STM32/MarlinSerial.h index bf861fb8a79a..4ab1e4e75a6b 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.h +++ b/Marlin/src/HAL/STM32/MarlinSerial.h @@ -27,23 +27,38 @@ #include "../../feature/e_parser.h" #endif +#if ENABLED(SERIAL_DMA) + #include "HardwareSerial.h" +#endif + #include "../../core/serial_hook.h" -typedef void (*usart_rx_callback_t)(serial_t * obj); +#if ENABLED(SERIAL_DMA) + + struct MarlinSerial : public HAL_HardwareSerial { + MarlinSerial(void *peripheral) : HAL_HardwareSerial(peripheral) { } + void begin(unsigned long baud, uint8_t config); + inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); } + }; + +#else // Arduino non-DMA -struct MarlinSerial : public HardwareSerial { - MarlinSerial(void *peripheral, usart_rx_callback_t rx_callback) : - HardwareSerial(peripheral), _rx_callback(rx_callback) - { } + typedef void (*usart_rx_callback_t)(serial_t * obj); - void begin(unsigned long baud, uint8_t config); - inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); } + struct MarlinSerial : public HardwareSerial { + MarlinSerial(void *peripheral, usart_rx_callback_t rx_callback) + : HardwareSerial(peripheral), _rx_callback(rx_callback) { } - void _rx_complete_irq(serial_t *obj); + void begin(unsigned long baud, uint8_t config); + inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); } -protected: - usart_rx_callback_t _rx_callback; -}; + void _rx_complete_irq(serial_t *obj); + + protected: + usart_rx_callback_t _rx_callback; + }; + +#endif typedef Serial1Class MSerialT; extern MSerialT MSerial1; diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 00e90b618356..70eba0d60c9f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -254,6 +254,15 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices." #endif +// Serial DMA is only available for some STM32 MCUs +#if ENABLED(SERIAL_DMA) + #if !HAL_STM32 || NONE(STM32F0xx, STM32F1xx, STM32F2xx, STM32F4xx, STM32F7xx) + #error "SERIAL_DMA is only available for some STM32 MCUs and requires HAL/STM32." + #elif !defined(HAL_UART_MODULE_ENABLED) || defined(HAL_UART_MODULE_ONLY) + #error "SERIAL_DMA requires STM32 platform HAL UART (without HAL_UART_MODULE_ONLY)." + #endif +#endif + /** * Multiple Stepper Drivers Per Axis */ diff --git a/buildroot/tests/STM32F103RE_btt b/buildroot/tests/STM32F103RE_btt index 97d7ffec4bdd..197ca775989a 100755 --- a/buildroot/tests/STM32F103RE_btt +++ b/buildroot/tests/STM32F103RE_btt @@ -13,6 +13,7 @@ restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP \ SERIAL_PORT 1 SERIAL_PORT_2 -1 \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 +opt_enable SERIAL_DMA exec_test $1 $2 "BTT SKR E3 DIP 1.0 | Mixed TMC Drivers" "$3" # clean up From f3fd9e28f5d6fae59c55742a2e70e2d6a3330aeb Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:30:28 +1300 Subject: [PATCH 002/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20MKS=20TS35=20with?= =?UTF-8?q?=20BTT=20SKR=201.3/1.4=20(#26176)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/LPC1768/tft/tft_spi.cpp | 8 ++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 34 +++--- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 123 +++++++++++++++++--- 3 files changed, 133 insertions(+), 32 deletions(-) diff --git a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp index 2342de002db7..beaadaf51961 100644 --- a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp +++ b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp @@ -55,11 +55,19 @@ void TFT_SPI::dataTransferBegin(uint16_t dataSize) { WRITE(TFT_CS_PIN, LOW); } +#ifdef TFT_DEFAULT_DRIVER + #include "../../../lcd/tft_io/tft_ids.h" +#endif + uint32_t TFT_SPI::getID() { uint32_t id; id = readID(LCD_READ_ID); if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) id = readID(LCD_READ_ID4); + #ifdef TFT_DEFAULT_DRIVER + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) + id = TFT_DEFAULT_DRIVER; + #endif return id; } 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 4c621bf5eff6..1cc555aafe08 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -347,6 +347,10 @@ #define TFT_CS_PIN EXP2_04_PIN #define TFT_DC_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_CS_PIN EXP1_04_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_MISO_PIN EXP1_06_PIN @@ -355,6 +359,10 @@ #elif ENABLED(MKS_TS35_V2_0) + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.3 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)" + #endif + /** ------ ------ * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS @@ -368,36 +376,36 @@ #define TFT_DC_PIN EXP1_08_PIN #define TFT_RESET_PIN EXP1_04_PIN - #define TFT_BACKLIGHT_PIN EXP1_03_PIN - #define TOUCH_BUTTONS_HW_SPI - #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - //#define TFT_RST_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 LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_WORDS 2400 + #define TOUCH_CS_PIN EXP1_05_PIN + #define TOUCH_INT_PIN EXP1_06_PIN + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + #endif #if ENABLED(TFT_CLASSIC_UI) #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -11386 + #define TOUCH_CALIBRATION_X -16794 #endif #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 8684 + #define TOUCH_CALIBRATION_Y 11000 #endif #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 689 + #define TOUCH_OFFSET_X 1024 #endif #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -273 + #define TOUCH_OFFSET_Y -352 #endif #elif ENABLED(TFT_COLOR_UI) #ifndef TOUCH_CALIBRATION_X @@ -515,14 +523,6 @@ #endif // HAS_WIRED_LCD -#if NEED_TOUCH_PINS - #define TOUCH_CS_PIN EXP1_05_PIN - #define TOUCH_SCK_PIN EXP2_02_PIN - #define TOUCH_MOSI_PIN EXP2_06_PIN - #define TOUCH_MISO_PIN EXP2_01_PIN - #define TOUCH_INT_PIN EXP1_06_PIN -#endif - /** * Special pins * P1_30 (37) (NOT 5V tolerant) 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 8d63ab764ebe..51953324a3af 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -395,26 +395,119 @@ #define LCD_BACKLIGHT_PIN -1 #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN EXP1_07_PIN - #define TFT_DC_PIN EXP1_08_PIN + + #define SDCARD_CONNECTION ONBOARD + + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_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 - #define LCD_USE_DMA_SPI + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #if ENABLED(BTT_TFT35_SPI_V1_0) + + /** + * ------ ------ + * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK + * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS + * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI + * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET + * GND | 9 10 | VCC GND | 9 10 | NC + * ------ ------ + * EXP1 EXP2 + * + * 480x320, 3.5", SPI Display with Rotary Encoder. + * Stock Display for the BIQU B1 SE Series. + * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf + */ + #define TFT_CS_PIN EXP2_04_PIN + #define TFT_DC_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_CS_PIN EXP1_04_PIN + #define TOUCH_SCK_PIN EXP1_05_PIN + #define TOUCH_MISO_PIN EXP1_06_PIN + #define TOUCH_MOSI_PIN EXP1_03_PIN + #define TOUCH_INT_PIN EXP1_07_PIN + + #elif ENABLED(MKS_TS35_V2_0) + + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.4 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)" + #endif + + /** ------ ------ + * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK + * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS + * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI + * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET + * GND | 9 10 | VCC GND | 9 10 | VCC + * ------ ------ + * EXP1 EXP2 + */ + #define TFT_CS_PIN EXP1_07_PIN + #define TFT_DC_PIN EXP1_08_PIN + + #define TFT_RESET_PIN EXP1_04_PIN + #define TFT_BACKLIGHT_PIN EXP1_03_PIN + + //#define TFT_RST_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_06_PIN - #define TOUCH_CS_PIN EXP1_05_PIN - #define TOUCH_BUTTONS_HW_SPI - #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + #define LCD_USE_DMA_SPI - // SPI 1 - #define SD_SCK_PIN EXP2_02_PIN - #define SD_MISO_PIN EXP2_01_PIN - #define SD_MOSI_PIN EXP2_06_PIN + #define TFT_BUFFER_WORDS 2400 - #define TFT_BUFFER_WORDS 2400 + #define TOUCH_CS_PIN EXP1_05_PIN + #define TOUCH_INT_PIN EXP1_06_PIN + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #endif + + #if ENABLED(TFT_CLASSIC_UI) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -16794 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11000 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 1024 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -352 + #endif + + #elif ENABLED(TFT_COLOR_UI) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -16741 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11258 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 1024 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -367 + #endif + #define TFT_BUFFER_WORDS 2400 + #endif #elif IS_TFTGLCD_PANEL From 81cfa2388236820f4ed498ede01fde502a0fdca0 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 12 Dec 2023 06:09:34 +0000 Subject: [PATCH 003/236] [cron] Bump distribution date (2023-12-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 c171a6fc25fe..00fbba610d31 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-12-10" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 cc6ab3ec6611..3c5a423ec05a 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-12-10" + #define STRING_DISTRIBUTION_DATE "2023-12-12" #endif /** From 06710e54de8c83af77a4f57d458f6463fbfcad93 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Wed, 13 Dec 2023 00:33:03 -0500 Subject: [PATCH 004/236] =?UTF-8?q?=E2=9C=A8=20EDITABLE=5FDISPLAY=5FTIMEOU?= =?UTF-8?q?T=20(#26517)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration_adv.h | 14 +++--- Marlin/src/core/types.h | 4 +- Marlin/src/feature/bedlevel/bdl/bdl.cpp | 2 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 3 +- Marlin/src/gcode/calibrate/G76_M871.cpp | 2 +- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/gcode/lcd/M255.cpp | 4 +- Marlin/src/inc/Conditionals_adv.h | 6 +-- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/lcd/e3v2/common/encoder.cpp | 8 +--- Marlin/src/lcd/e3v2/proui/dwin.cpp | 8 ++-- Marlin/src/lcd/e3v2/proui/plot.cpp | 4 +- Marlin/src/lcd/marlinui.cpp | 27 ++++++----- Marlin/src/lcd/marlinui.h | 16 +++++-- Marlin/src/lcd/menu/menu_configuration.cpp | 10 +++-- Marlin/src/lcd/tft/touch.cpp | 2 +- Marlin/src/lcd/touch/touch_buttons.cpp | 2 +- Marlin/src/module/settings.cpp | 50 +++++++++++---------- Marlin/src/module/temperature.h | 14 +++--- ini/features.ini | 2 +- 21 files changed, 102 insertions(+), 82 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e4f85a8d87b7..8b4fa1ab7ca1 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1471,11 +1471,6 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// -// LCD Backlight Timeout -// -//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight - #if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI) //#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu #if ENABLED(PROBE_OFFSET_WIZARD) @@ -2206,6 +2201,15 @@ //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan #endif +// +// LCD Backlight Timeout +// Requires a display with a controllable backlight +// +//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight +#if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS) + #define EDITABLE_DISPLAY_TIMEOUT // Edit timeout with M255 S and a menu item +#endif + // // ADC Button Debounce // diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index d92dbde8b7a4..bcbf2f07aa45 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -198,7 +198,7 @@ typedef Flags<8> flags_8_t; typedef Flags<16> flags_16_t; // Flags for some axis states, with per-axis aliases xyzijkuvwe -typedef struct AxisFlags { +typedef struct { union { 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); }; @@ -212,7 +212,7 @@ typedef struct AxisFlags { 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; +} AxisFlags; // // Enumerated axis indices diff --git a/Marlin/src/feature/bedlevel/bdl/bdl.cpp b/Marlin/src/feature/bedlevel/bdl/bdl.cpp index 5345bb78c590..d469bb0c0673 100644 --- a/Marlin/src/feature/bedlevel/bdl/bdl.cpp +++ b/Marlin/src/feature/bedlevel/bdl/bdl.cpp @@ -195,7 +195,7 @@ void BDS_Leveling::process() { safe_delay(10); if (config_state == BDS_CALIBRATE_START) { config_state = BDS_CALIBRATING; - REMEMBER(gsit, gcode.stepper_inactive_time, SEC_TO_MS(60 * 5)); + REMEMBER(gsit, gcode.stepper_inactive_time, MIN_TO_MS(5)); SERIAL_ECHOLNPGM("c_z0:", planner.get_axis_position_mm(Z_AXIS), "-", pos_zero_offset); // Move the z axis instead of enabling the Z axis with M17 diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index d136f0000d8c..3d0013b6d2da 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -772,7 +772,8 @@ void unified_bed_leveling::shift_mesh_height() { const grid_count_t point_num = (GRID_MAX_POINTS - count) + 1; SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); - TERN_(LCD_BACKLIGHT_TIMEOUT_MINS, ui.refresh_backlight_timeout()); + TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); + TERN_(DWIN_LCD_PROUI, dwinRedrawScreen()); #if HAS_MARLINUI_MENU if (ui.button_pressed()) { diff --git a/Marlin/src/gcode/calibrate/G76_M871.cpp b/Marlin/src/gcode/calibrate/G76_M871.cpp index 6fe3dd89cf17..bb69b75d5056 100644 --- a/Marlin/src/gcode/calibrate/G76_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M871.cpp @@ -256,7 +256,7 @@ say_waiting_for_probe_heating(); SERIAL_ECHOLNPGM(" Bed:", target_bed, " Probe:", target_probe); - const millis_t probe_timeout_ms = millis() + SEC_TO_MS(900UL); + const millis_t probe_timeout_ms = millis() + MIN_TO_MS(15); while (thermalManager.degProbe() < target_probe) { if (report_temps(next_temp_report, probe_timeout_ms)) { SERIAL_ECHOLNPGM("!Probe heating timed out."); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index d519bd4e2941..6a0e8cb17142 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -793,7 +793,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 250: M250(); break; // M250: Set LCD contrast #endif - #if HAS_GCODE_M255 + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) case 255: M255(); break; // M255: Set LCD Sleep/Backlight Timeout (Minutes) #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 61ff0b047cac..fffd0d714bea 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -909,7 +909,7 @@ class GcodeSuite { static void M250_report(const bool forReplay=true); #endif - #if HAS_GCODE_M255 + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) static void M255(); static void M255_report(const bool forReplay=true); #endif diff --git a/Marlin/src/gcode/lcd/M255.cpp b/Marlin/src/gcode/lcd/M255.cpp index 8dc8099de149..2b982ee5d9a0 100644 --- a/Marlin/src/gcode/lcd/M255.cpp +++ b/Marlin/src/gcode/lcd/M255.cpp @@ -21,7 +21,7 @@ */ #include "../../inc/MarlinConfig.h" -#if HAS_GCODE_M255 +#if ENABLED(EDITABLE_DISPLAY_TIMEOUT) #include "../gcode.h" #include "../../lcd/marlinui.h" @@ -51,4 +51,4 @@ void GcodeSuite::M255_report(const bool forReplay/*=true*/) { ); } -#endif // HAS_GCODE_M255 +#endif // EDITABLE_DISPLAY_TIMEOUT diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index ba074e256088..755b251b1879 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -893,11 +893,11 @@ #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 +#if defined(DISPLAY_SLEEP_MINUTES) || defined(TOUCH_IDLE_SLEEP_MINS) #define HAS_DISPLAY_SLEEP 1 #endif -#if HAS_DISPLAY_SLEEP || LCD_BACKLIGHT_TIMEOUT_MINS - #define HAS_GCODE_M255 1 +#ifdef LCD_BACKLIGHT_TIMEOUT_MINS + #define HAS_BACKLIGHT_TIMEOUT 1 #endif #if ANY(DIGIPOT_MCP4018, DIGIPOT_MCP4451) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 70eba0d60c9f..2e1149e66874 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2762,7 +2762,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #endif #endif -#if LCD_BACKLIGHT_TIMEOUT_MINS +#if HAS_BACKLIGHT_TIMEOUT #if !HAS_ENCODER_ACTION && DISABLED(HAS_DWIN_E3V2) #error "LCD_BACKLIGHT_TIMEOUT_MINS requires an LCD with encoder or keypad." #elif ENABLED(NEOPIXEL_BKGD_INDEX_FIRST) diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index eb064950ec59..cb14596849a5 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -87,9 +87,7 @@ EncoderState encoderReceiveAnalyze() { #if PIN_EXISTS(LCD_LED) //LED_Action(); #endif - #if LCD_BACKLIGHT_TIMEOUT_MINS - ui.refresh_backlight_timeout(); - #endif + TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); if (!ui.backlight) { ui.refresh_brightness(); return ENCODER_DIFF_NO; @@ -161,9 +159,7 @@ EncoderState encoderReceiveAnalyze() { temp_diff = 0; } if (temp_diffState != ENCODER_DIFF_NO) { - #if LCD_BACKLIGHT_TIMEOUT_MINS - ui.refresh_backlight_timeout(); - #endif + TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); if (!ui.backlight) ui.refresh_brightness(); } return temp_diffState; diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 8d4aa9106bfa..7c68c60f8195 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1249,7 +1249,7 @@ void eachMomentUpdate() { static millis_t next_var_update_ms = 0, next_rts_update_ms = 0, next_status_update_ms = 0; const millis_t ms = millis(); - #if LCD_BACKLIGHT_TIMEOUT_MINS + #if HAS_BACKLIGHT_TIMEOUT if (ui.backlight_off_ms && ELAPSED(ms, ui.backlight_off_ms)) { turnOffBacklight(); // Backlight off ui.backlight_off_ms = 0; @@ -2235,7 +2235,7 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, #endif -#if LCD_BACKLIGHT_TIMEOUT_MINS +#if ENABLED(EDITABLE_DISPLAY_TIMEOUT) void applyTimer() { ui.backlight_timeout_minutes = menuData.value; } void setTimer() { setIntOnClick(ui.backlight_timeout_min, ui.backlight_timeout_max, ui.backlight_timeout_minutes, applyTimer); } #endif @@ -3123,7 +3123,7 @@ void drawAdvancedSettingsMenu() { #if HAS_LOCKSCREEN MENU_ITEM(ICON_Lock, MSG_LOCKSCREEN, onDrawMenuItem, dwinLockScreen); #endif - #if LCD_BACKLIGHT_TIMEOUT_MINS + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes); #endif #if ENABLED(SOUND_MENU_ITEM) @@ -3347,7 +3347,7 @@ void drawTuneMenu() { EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, setBrightness, &ui.brightness); MENU_ITEM(ICON_Brightness, MSG_BRIGHTNESS_OFF, onDrawMenuItem, turnOffBacklight); #endif - #if LCD_BACKLIGHT_TIMEOUT_MINS + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes); #endif #if ENABLED(CASE_LIGHT_MENU) diff --git a/Marlin/src/lcd/e3v2/proui/plot.cpp b/Marlin/src/lcd/e3v2/proui/plot.cpp index 92c6c947177b..84c58389a6f7 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.cpp +++ b/Marlin/src/lcd/e3v2/proui/plot.cpp @@ -73,9 +73,7 @@ void Plot::update(const_float_t value) { dwinDrawPoint(COLOR_YELLOW, 1, 1, x2 - 1, y); } graphpoints++; - #if LCD_BACKLIGHT_TIMEOUT_MINS - ui.refresh_backlight_timeout(); - #endif + TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); } #endif // PROUI_TUNING_GRAPH diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 4eb58f52aedf..60fb298dfcde 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -24,7 +24,7 @@ #include "../MarlinCore.h" // for printingIsPaused -#if LED_POWEROFF_TIMEOUT > 0 || ALL(HAS_WIRED_LCD, PRINTER_EVENT_LEDS) || (defined(LCD_BACKLIGHT_TIMEOUT_MINS) && defined(NEOPIXEL_BKGD_INDEX_FIRST)) +#if LED_POWEROFF_TIMEOUT > 0 || ALL(HAS_WIRED_LCD, PRINTER_EVENT_LEDS) || (HAS_BACKLIGHT_TIMEOUT && defined(NEOPIXEL_BKGD_INDEX_FIRST)) #include "../feature/leds/leds.h" #endif @@ -185,10 +185,14 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update #endif -#if LCD_BACKLIGHT_TIMEOUT_MINS +#if HAS_BACKLIGHT_TIMEOUT + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + uint8_t MarlinUI::backlight_timeout_minutes; // Initialized by settings.load() + #else + constexpr uint8_t MarlinUI::backlight_timeout_minutes; + #endif constexpr uint8_t MarlinUI::backlight_timeout_min, MarlinUI::backlight_timeout_max; - uint8_t MarlinUI::backlight_timeout_minutes; // Initialized by settings.load() millis_t MarlinUI::backlight_off_ms = 0; void MarlinUI::refresh_backlight_timeout() { @@ -203,12 +207,16 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #elif HAS_DISPLAY_SLEEP + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + uint8_t MarlinUI::sleep_timeout_minutes; // Initialized by settings.load() + #else + constexpr uint8_t MarlinUI::sleep_timeout_minutes; + #endif constexpr uint8_t MarlinUI::sleep_timeout_min, MarlinUI::sleep_timeout_max; - uint8_t MarlinUI::sleep_timeout_minutes; // Initialized by settings.load() - millis_t MarlinUI::screen_timeout_millis = 0; + millis_t MarlinUI::screen_timeout_ms = 0; void MarlinUI::refresh_screen_timeout() { - screen_timeout_millis = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0; + screen_timeout_ms = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0; sleep_display(false); } @@ -1092,7 +1100,7 @@ void MarlinUI::init() { if (encoderPastThreshold || lcd_clicked) { reset_status_timeout(ms); - #if LCD_BACKLIGHT_TIMEOUT_MINS + #if HAS_BACKLIGHT_TIMEOUT refresh_backlight_timeout(); #elif HAS_DISPLAY_SLEEP refresh_screen_timeout(); @@ -1202,8 +1210,7 @@ void MarlinUI::init() { return_to_status(); #endif - #if LCD_BACKLIGHT_TIMEOUT_MINS - + #if HAS_BACKLIGHT_TIMEOUT if (backlight_off_ms && ELAPSED(ms, backlight_off_ms)) { #ifdef NEOPIXEL_BKGD_INDEX_FIRST neo.set_background_off(); @@ -1214,7 +1221,7 @@ void MarlinUI::init() { backlight_off_ms = 0; } #elif HAS_DISPLAY_SLEEP - if (screen_timeout_millis && ELAPSED(ms, screen_timeout_millis)) + if (screen_timeout_ms && ELAPSED(ms, screen_timeout_ms)) sleep_display(); #endif diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 595b89b6e00f..a463701f566a 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -272,17 +272,25 @@ class MarlinUI { FORCE_INLINE static void refresh_brightness() { set_brightness(brightness); } #endif - #if LCD_BACKLIGHT_TIMEOUT_MINS + #if HAS_BACKLIGHT_TIMEOUT + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + static uint8_t backlight_timeout_minutes; + #else + static constexpr uint8_t backlight_timeout_minutes = LCD_BACKLIGHT_TIMEOUT_MINS; + #endif static constexpr uint8_t backlight_timeout_min = 0; static constexpr uint8_t backlight_timeout_max = 99; - static uint8_t backlight_timeout_minutes; static millis_t backlight_off_ms; static void refresh_backlight_timeout(); #elif HAS_DISPLAY_SLEEP + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + static uint8_t sleep_timeout_minutes; + #else + static constexpr uint8_t sleep_timeout_minutes = DISPLAY_SLEEP_MINUTES; + #endif static constexpr uint8_t sleep_timeout_min = 0; static constexpr uint8_t sleep_timeout_max = 99; - static uint8_t sleep_timeout_minutes; - static millis_t screen_timeout_millis; + static millis_t screen_timeout_ms; static void refresh_screen_timeout(); static void sleep_display(const bool sleep=true); #endif diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 52123d101b68..7347f219e0ab 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -618,10 +618,12 @@ void menu_configuration() { // // Set display backlight / sleep timeout // - #if LCD_BACKLIGHT_TIMEOUT_MINS - EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.backlight_timeout_minutes, ui.backlight_timeout_min, ui.backlight_timeout_max, ui.refresh_backlight_timeout); - #elif HAS_DISPLAY_SLEEP - EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.sleep_timeout_minutes, ui.sleep_timeout_min, ui.sleep_timeout_max, ui.refresh_screen_timeout); + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + #if HAS_BACKLIGHT_TIMEOUT + EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.backlight_timeout_minutes, ui.backlight_timeout_min, ui.backlight_timeout_max, ui.refresh_backlight_timeout); + #elif HAS_DISPLAY_SLEEP + EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.sleep_timeout_minutes, ui.sleep_timeout_min, ui.sleep_timeout_max, ui.refresh_screen_timeout); + #endif #endif #if ENABLED(FWRETRACT) diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 3c0b21ba8fd3..d325355002f5 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -308,7 +308,7 @@ bool Touch::get_point(int16_t * const x, int16_t * const y) { next_touch_ms = millis() + 100; safe_delay(20); } - next_sleep_ms = millis() + SEC_TO_MS(ui.sleep_timeout_minutes * 60); + next_sleep_ms = millis() + MIN_TO_MS(ui.sleep_timeout_minutes); } #endif // HAS_TOUCH_SLEEP diff --git a/Marlin/src/lcd/touch/touch_buttons.cpp b/Marlin/src/lcd/touch/touch_buttons.cpp index 7d31b21c04a6..652a043714d8 100644 --- a/Marlin/src/lcd/touch/touch_buttons.cpp +++ b/Marlin/src/lcd/touch/touch_buttons.cpp @@ -147,7 +147,7 @@ uint8_t TouchButtons::read_buttons() { WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif } - next_sleep_ms = millis() + SEC_TO_MS(ui.sleep_timeout_minutes * 60); + next_sleep_ms = millis() + MIN_TO_MS(ui.sleep_timeout_minutes); } #endif // HAS_TOUCH_SLEEP diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index f636b985e1be..b99ae8ddcda7 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -431,10 +431,12 @@ typedef struct SettingsDataStruct { // // Display Sleep // - #if LCD_BACKLIGHT_TIMEOUT_MINS - uint8_t backlight_timeout_minutes; // M255 S - #elif HAS_DISPLAY_SLEEP - uint8_t sleep_timeout_minutes; // M255 S + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + #if HAS_BACKLIGHT_TIMEOUT + uint8_t backlight_timeout_minutes; // M255 S + #elif HAS_DISPLAY_SLEEP + uint8_t sleep_timeout_minutes; // M255 S + #endif #endif // @@ -704,12 +706,8 @@ void MarlinSettings::postprocess() { // Moved as last update due to interference with Neopixel init TERN_(HAS_LCD_CONTRAST, ui.refresh_contrast()); TERN_(HAS_LCD_BRIGHTNESS, ui.refresh_brightness()); - - #if LCD_BACKLIGHT_TIMEOUT_MINS - ui.refresh_backlight_timeout(); - #elif HAS_DISPLAY_SLEEP - ui.refresh_screen_timeout(); - #endif + TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); + TERN_(HAS_DISPLAY_SLEEP, ui.refresh_screen_timeout()); } #if ALL(PRINTCOUNTER, EEPROM_SETTINGS) @@ -1249,10 +1247,12 @@ void MarlinSettings::postprocess() { // // LCD Backlight / Sleep Timeout // - #if LCD_BACKLIGHT_TIMEOUT_MINS - EEPROM_WRITE(ui.backlight_timeout_minutes); - #elif HAS_DISPLAY_SLEEP - EEPROM_WRITE(ui.sleep_timeout_minutes); + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + #if HAS_BACKLIGHT_TIMEOUT + EEPROM_WRITE(ui.backlight_timeout_minutes); + #elif HAS_DISPLAY_SLEEP + EEPROM_WRITE(ui.sleep_timeout_minutes); + #endif #endif // @@ -2294,10 +2294,12 @@ void MarlinSettings::postprocess() { // // LCD Backlight / Sleep Timeout // - #if LCD_BACKLIGHT_TIMEOUT_MINS - EEPROM_READ(ui.backlight_timeout_minutes); - #elif HAS_DISPLAY_SLEEP - EEPROM_READ(ui.sleep_timeout_minutes); + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + #if HAS_BACKLIGHT_TIMEOUT + EEPROM_READ(ui.backlight_timeout_minutes); + #elif HAS_DISPLAY_SLEEP + EEPROM_READ(ui.sleep_timeout_minutes); + #endif #endif // @@ -3451,10 +3453,12 @@ void MarlinSettings::reset() { // // LCD Backlight / Sleep Timeout // - #if LCD_BACKLIGHT_TIMEOUT_MINS - ui.backlight_timeout_minutes = LCD_BACKLIGHT_TIMEOUT_MINS; - #elif HAS_DISPLAY_SLEEP - ui.sleep_timeout_minutes = TERN(TOUCH_SCREEN, TOUCH_IDLE_SLEEP_MINS, DISPLAY_SLEEP_MINUTES); + #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) + #if HAS_BACKLIGHT_TIMEOUT + ui.backlight_timeout_minutes = LCD_BACKLIGHT_TIMEOUT_MINS; + #elif HAS_DISPLAY_SLEEP + ui.sleep_timeout_minutes = TERN(TOUCH_SCREEN, TOUCH_IDLE_SLEEP_MINS, DISPLAY_SLEEP_MINUTES); + #endif #endif // @@ -3827,7 +3831,7 @@ void MarlinSettings::reset() { // // Display Sleep // - TERN_(HAS_GCODE_M255, gcode.M255_report(forReplay)); + TERN_(EDITABLE_DISPLAY_TIMEOUT, gcode.M255_report(forReplay)); // // LCD Brightness diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index d174bfd11dbd..2acc1205b730 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -699,7 +699,7 @@ class Temperature { // Convert the given heater_id_t to idle array index static IdleIndex idle_index_for_id(const int8_t heater_id) { - TERN_(HAS_HEATED_BED, if (heater_id == H_BED) return IDLE_INDEX_BED); + OPTCODE(HAS_HEATED_BED, if (heater_id == H_BED) return IDLE_INDEX_BED) return (IdleIndex)_MAX(heater_id, 0); } @@ -1052,7 +1052,7 @@ class Temperature { } // Start watching the Bed to make sure it's really heating up - static void start_watching_bed() { TERN_(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())); } + static void start_watching_bed() { OPTCODE(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())) } static void setTargetBed(const celsius_t celsius) { #if PREHEAT_TIME_BED_MS > 0 @@ -1108,7 +1108,7 @@ class Temperature { start_watching_chamber(); } // Start watching the Chamber to make sure it's really heating up - static void start_watching_chamber() { TERN_(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())); } + static void start_watching_chamber() { OPTCODE(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())) } #endif #if HAS_TEMP_COOLER @@ -1158,7 +1158,7 @@ class Temperature { start_watching_cooler(); } // Start watching the Cooler to make sure it's really cooling down - static void start_watching_cooler() { TERN_(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())); } + static void start_watching_cooler() { OPTCODE(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())) } #endif /** @@ -1391,9 +1391,9 @@ class Temperature { // Convert the given heater_id_t to runaway state array index static RunawayIndex runaway_index_for_id(const int8_t heater_id) { - TERN_(THERMAL_PROTECTION_CHAMBER, if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER); - TERN_(THERMAL_PROTECTION_COOLER, if (heater_id == H_COOLER) return RUNAWAY_IND_COOLER); - TERN_(THERMAL_PROTECTION_BED, if (heater_id == H_BED) return RUNAWAY_IND_BED); + OPTCODE(THERMAL_PROTECTION_CHAMBER, if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER) + OPTCODE(THERMAL_PROTECTION_COOLER, if (heater_id == H_COOLER) return RUNAWAY_IND_COOLER) + OPTCODE(THERMAL_PROTECTION_BED, if (heater_id == H_BED) return RUNAWAY_IND_BED) return (RunawayIndex)_MAX(heater_id, 0); } diff --git a/ini/features.ini b/ini/features.ini index 3e50b19bc085..ed755f9ac001 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -330,7 +330,7 @@ SET_PROGRESS_MANUALLY = build_src_filter=+ HAS_PREHEAT = build_src_filter=+ HAS_LCD_CONTRAST = build_src_filter=+ -HAS_GCODE_M255 = build_src_filter=+ +EDITABLE_DISPLAY_TIMEOUT = build_src_filter=+ HAS_LCD_BRIGHTNESS = build_src_filter=+ HAS_SOUND = build_src_filter=+ HAS_MULTI_LANGUAGE = build_src_filter=+ From 775c6bb20ef1bc09632baaf4359efeea6e441451 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 13 Dec 2023 06:12:17 +0000 Subject: [PATCH 005/236] [cron] Bump distribution date (2023-12-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 00fbba610d31..acd87bb99443 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-12-12" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 3c5a423ec05a..7b1faa8884cc 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-12-12" + #define STRING_DISTRIBUTION_DATE "2023-12-13" #endif /** From fef74398e41a1b492792837941af55057eb694f5 Mon Sep 17 00:00:00 2001 From: jesterhead82 Date: Wed, 13 Dec 2023 08:44:11 +0100 Subject: [PATCH 006/236] =?UTF-8?q?=E2=9C=A8=20MARKFORGED=5FINVERSE=20(#26?= =?UTF-8?q?516)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 10 +++++++++- Marlin/src/module/planner.cpp | 12 ++++++------ Marlin/src/module/stepper.cpp | 8 ++++---- buildroot/tests/mks_robin_mini | 1 + 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4d0351bb493c..e62637f6462a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -892,8 +892,16 @@ //#define COREYX //#define COREZX //#define COREZY -//#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042 + +// +// MarkForged Kinematics +// See https://reprap.org/forum/read.php?152,504042 +// +//#define MARKFORGED_XY //#define MARKFORGED_YX +#if ANY(MARKFORGED_XY, MARKFORGED_YX) + //#define MARKFORGED_INVERSE // Enable for an inverted Markforged kinematics belt path +#endif // Enable for a belt style printer with endless "Z" motion //#define BELTPRINTER diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 8e9021b03069..70a1b105db74 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1990,11 +1990,11 @@ bool Planner::_populate_block( dm.c = (CORESIGN(dist.b - dist.c) > 0); // Motor C direction #endif #elif ENABLED(MARKFORGED_XY) - dm.a = (dist.a + dist.b > 0); // Motor A direction + dm.a = (dist.a TERN(MARKFORGED_INVERSE, -, +) dist.b > 0); // Motor A direction dm.b = (dist.b > 0); // Motor B direction #elif ENABLED(MARKFORGED_YX) dm.a = (dist.a > 0); // Motor A direction - dm.b = (dist.b + dist.a > 0); // Motor B direction + dm.b = (dist.b TERN(MARKFORGED_INVERSE, -, +) dist.a > 0); // Motor B direction #else XYZ_CODE( dm.x = (dist.a > 0), @@ -2062,9 +2062,9 @@ bool Planner::_populate_block( #elif CORE_IS_YZ ABS(dist.a), ABS(dist.b + dist.c), ABS(dist.b - dist.c) #elif ENABLED(MARKFORGED_XY) - ABS(dist.a + dist.b), ABS(dist.b), ABS(dist.c) + ABS(dist.a TERN(MARKFORGED_INVERSE, -, +) dist.b), ABS(dist.b), ABS(dist.c) #elif ENABLED(MARKFORGED_YX) - ABS(dist.a), ABS(dist.b + dist.a), ABS(dist.c) + ABS(dist.a), ABS(dist.b TERN(MARKFORGED_INVERSE, -, +) dist.a), ABS(dist.c) #elif IS_SCARA ABS(dist.a), ABS(dist.b), ABS(dist.c) #else // default non-h-bot planning @@ -2110,11 +2110,11 @@ bool Planner::_populate_block( dist_mm.c = CORESIGN(dist.b - dist.c) * mm_per_step[C_AXIS]; #endif #elif ENABLED(MARKFORGED_XY) - dist_mm.a = (dist.a - dist.b) * mm_per_step[A_AXIS]; + dist_mm.a = (dist.a TERN(MARKFORGED_INVERSE, +, -) dist.b) * mm_per_step[A_AXIS]; dist_mm.b = dist.b * mm_per_step[B_AXIS]; #elif ENABLED(MARKFORGED_YX) dist_mm.a = dist.a * mm_per_step[A_AXIS]; - dist_mm.b = (dist.b - dist.a) * mm_per_step[B_AXIS]; + dist_mm.b = (dist.b TERN(MARKFORGED_INVERSE, +, -) dist.a) * mm_per_step[B_AXIS]; #else XYZ_CODE( dist_mm.a = dist.a * mm_per_step[A_AXIS], diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index a6c628e081cc..c68db6bb89b4 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3287,9 +3287,9 @@ void Stepper::_set_position(const abce_long_t &spos) { // coreyz planning count_position.set(spos.a, spos.b + spos.c, CORESIGN(spos.b - spos.c)); #elif ENABLED(MARKFORGED_XY) - count_position.set(spos.a - spos.b, spos.b, spos.c); + count_position.set(spos.a TERN(MARKFORGED_INVERSE, +, -) spos.b, spos.b, spos.c); #elif ENABLED(MARKFORGED_YX) - count_position.set(spos.a, spos.b - spos.a, spos.c); + count_position.set(spos.a, spos.b TERN(MARKFORGED_INVERSE, +, -) spos.a, spos.c); #endif SECONDARY_AXIS_CODE( count_position.i = spos.i, @@ -3382,12 +3382,12 @@ void Stepper::endstop_triggered(const AxisEnum axis) { ) * double(0.5) #elif ENABLED(MARKFORGED_XY) axis == CORE_AXIS_1 - ? count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2] + ? count_position[CORE_AXIS_1] ENABLED(MARKFORGED_INVERSE, +, -) count_position[CORE_AXIS_2] : count_position[CORE_AXIS_2] #elif ENABLED(MARKFORGED_YX) axis == CORE_AXIS_1 ? count_position[CORE_AXIS_1] - : count_position[CORE_AXIS_2] - count_position[CORE_AXIS_1] + : count_position[CORE_AXIS_2] ENABLED(MARKFORGED_INVERSE, +, -) count_position[CORE_AXIS_1] #else // !IS_CORE count_position[axis] #endif diff --git a/buildroot/tests/mks_robin_mini b/buildroot/tests/mks_robin_mini index 29baee8818d6..902874ce474d 100755 --- a/buildroot/tests/mks_robin_mini +++ b/buildroot/tests/mks_robin_mini @@ -9,6 +9,7 @@ set -e use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_MINI EXTRUDERS 1 TEMP_SENSOR_1 0 +opt_enable MARKFORGED_XY MARKFORGED_INVERSE exec_test $1 $2 "MKS Robin mini" "$3" # cleanup From 8bce9dec906d59c3091e870d614f834c73aaeb89 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 14 Dec 2023 00:21:11 +0000 Subject: [PATCH 007/236] [cron] Bump distribution date (2023-12-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 acd87bb99443..52512a611302 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-12-13" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 7b1faa8884cc..80b1de278bb1 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-12-13" + #define STRING_DISTRIBUTION_DATE "2023-12-14" #endif /** From 75da3555ee0910f3d572f4b8176afecdc941524b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 Dec 2023 10:03:11 -0600 Subject: [PATCH 008/236] =?UTF-8?q?=F0=9F=94=A7=20Update=20CLASSIC=5FJERK?= =?UTF-8?q?=20conditionals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/calibrate/G28.cpp | 4 +-- Marlin/src/gcode/config/M200-M205.cpp | 10 +++---- Marlin/src/gcode/config/M92.cpp | 2 +- Marlin/src/gcode/host/M360.cpp | 4 +-- Marlin/src/inc/Conditionals_LCD.h | 14 ---------- Marlin/src/inc/Conditionals_adv.h | 15 +++++++++++ Marlin/src/inc/Conditionals_post.h | 5 ---- Marlin/src/inc/SanityCheck.h | 4 +-- Marlin/src/lcd/e3v2/common/limits.h | 2 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 26 +++++++++---------- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 10 +++---- Marlin/src/lcd/e3v2/proui/dwin.cpp | 14 +++++----- Marlin/src/lcd/e3v2/proui/dwin.h | 2 +- .../lcd/extui/mks_ui/draw_jerk_settings.cpp | 4 +-- .../extui/mks_ui/draw_machine_settings.cpp | 4 +-- .../src/lcd/extui/mks_ui/draw_number_key.cpp | 16 ++++++------ Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 4 +-- Marlin/src/lcd/menu/menu_advanced.cpp | 12 +++------ Marlin/src/module/planner.cpp | 12 ++++----- Marlin/src/module/planner.h | 6 ++--- Marlin/src/module/settings.cpp | 6 ++--- 21 files changed, 83 insertions(+), 93 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index dbdbdc5affee..98d0a401481c 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -155,7 +155,7 @@ planner.settings.max_acceleration_mm_per_s2[X_AXIS] = 100; planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = 100; TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = 100); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) motion_state.jerk_state = planner.max_jerk; planner.max_jerk.set(0, 0 OPTARG(DELTA, 0)); #endif @@ -167,7 +167,7 @@ planner.settings.max_acceleration_mm_per_s2[X_AXIS] = motion_state.acceleration.x; planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = motion_state.acceleration.y; TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = motion_state.acceleration.z); - TERN_(HAS_CLASSIC_JERK, planner.max_jerk = motion_state.jerk_state); + TERN_(CLASSIC_JERK, planner.max_jerk = motion_state.jerk_state); planner.refresh_acceleration_rates(); } diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index 06fbef631e75..7cdf4026b8ef 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -297,7 +297,7 @@ void GcodeSuite::M205() { if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units(); if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units(); #if HAS_JUNCTION_DEVIATION - #if HAS_CLASSIC_JERK && AXIS_COLLISION('J') + #if ENABLED(CLASSIC_JERK) && AXIS_COLLISION('J') #error "Can't set_max_jerk for 'J' axis because 'J' is used for Junction Deviation." #endif if (parser.seenval('J')) { @@ -310,7 +310,7 @@ void GcodeSuite::M205() { SERIAL_ERROR_MSG("?J out of range (0.01 to 0.3)"); } #endif - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) bool seenZ = false; LOGICAL_AXIS_CODE( if (parser.seenval('E')) planner.set_max_jerk(E_AXIS, parser.value_linear_units()), @@ -328,14 +328,14 @@ void GcodeSuite::M205() { if (seenZ && planner.max_jerk.z <= 0.1f) SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses."); #endif - #endif // HAS_CLASSIC_JERK + #endif // CLASSIC_JERK } void GcodeSuite::M205_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, F( "Advanced (" M205_MIN_SEG_TIME_STR " S T" TERN_(HAS_JUNCTION_DEVIATION, " J") - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) NUM_AXIS_GANG( " X", " Y", " Z", " " STR_I "", " " STR_J "", " " STR_K "", @@ -352,7 +352,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) { #if HAS_JUNCTION_DEVIATION , PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm) #endif - #if HAS_CLASSIC_JERK && NUM_AXES + #if ENABLED(CLASSIC_JERK) && NUM_AXES , LIST_N(DOUBLE(NUM_AXES), SP_X_STR, LINEAR_UNIT(planner.max_jerk.x), SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y), diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 67f55e2232b0..01b32118c825 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -55,7 +55,7 @@ void GcodeSuite::M92() { const float value = parser.value_per_axis_units((AxisEnum)(E_AXIS_N(target_extruder))); if (value < 20) { float factor = planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] / value; // increase e constants if M92 E14 is given for netfab. - #if HAS_CLASSIC_JERK && HAS_CLASSIC_E_JERK + #if ALL(CLASSIC_JERK, HAS_CLASSIC_E_JERK) planner.max_jerk.e *= factor; #endif planner.settings.max_feedrate_mm_s[E_AXIS_N(target_extruder)] *= factor; diff --git a/Marlin/src/gcode/host/M360.cpp b/Marlin/src/gcode/host/M360.cpp index 9649e99e17de..87aad88952f0 100644 --- a/Marlin/src/gcode/host/M360.cpp +++ b/Marlin/src/gcode/host/M360.cpp @@ -91,7 +91,7 @@ void GcodeSuite::M360() { // // XYZ Axis Jerk // - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) if (planner.max_jerk.x == planner.max_jerk.y) config_line(F("XY"), planner.max_jerk.x, FPSTR(JERK_STR)); else { @@ -182,7 +182,7 @@ void GcodeSuite::M360() { config_line(F("NumExtruder"), EXTRUDERS); #if HAS_EXTRUDERS EXTRUDER_LOOP() { - config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(HAS_CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK))); + config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK))); config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]); config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]); config_line_e(e, F("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e])); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 955b8fd960f4..37d56d4f1e56 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1615,20 +1615,6 @@ #undef DELTA_HOME_TO_SAFE_ZONE #endif -// This flag indicates some kind of jerk storage is needed -#if ANY(CLASSIC_JERK, IS_KINEMATIC) - #define HAS_CLASSIC_JERK 1 -#endif - -#if DISABLED(CLASSIC_JERK) - #define HAS_JUNCTION_DEVIATION 1 -#endif - -// E jerk exists with JD disabled (of course) but also when Linear Advance is disabled on Delta/SCARA -#if HAS_EXTRUDERS && (ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE))) - #define HAS_CLASSIC_E_JERK 1 -#endif - // // Serial Port Info // diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 755b251b1879..f62714df4b62 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -302,6 +302,21 @@ #endif #endif +// Use Junction Deviation for motion if Jerk is disabled +#if DISABLED(CLASSIC_JERK) + #define HAS_JUNCTION_DEVIATION 1 +#endif + +// E jerk exists with JD disabled (of course) but also when Linear Advance is disabled on Delta/SCARA +#if HAS_EXTRUDERS && (ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE))) + #define HAS_CLASSIC_E_JERK 1 +#endif + +// Linear advance uses Jerk since E is an isolated axis +#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE) + #define HAS_LINEAR_E_JERK 1 +#endif + /** * Temperature Sensors; define what sensor(s) we have. */ diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 09e020dab885..85b3a22cbf73 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -37,11 +37,6 @@ #define ADC_VREF_MV HAL_ADC_VREF_MV #endif -// Linear advance uses Jerk since E is an isolated axis -#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE) - #define HAS_LINEAR_E_JERK 1 -#endif - // Determine which type of 'EEPROM' is in use #if ENABLED(EEPROM_SETTINGS) // EEPROM type may be defined by compile flags, configs, HALs, or pins diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 2e1149e66874..1471d2d13c23 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1225,7 +1225,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L * Junction deviation is incompatible with kinematic systems. */ #if HAS_JUNCTION_DEVIATION && IS_KINEMATIC - #error "CLASSIC_JERK is required for DELTA, SCARA, and POLAR." + #error "CLASSIC_JERK is required for the kinematics of DELTA, SCARA, POLAR, etc." #endif /** @@ -1583,7 +1583,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #error "Only enable RESTORE_LEVELING_AFTER_G28 or ENABLE_LEVELING_AFTER_G28, but not both." #endif -#if HAS_MESH && HAS_CLASSIC_JERK +#if ALL(HAS_MESH, CLASSIC_JERK) static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling."); #endif #if HAS_MESH && DGUS_LCD_UI_IA_CREALITY && GRID_MAX_POINTS > 25 diff --git a/Marlin/src/lcd/e3v2/common/limits.h b/Marlin/src/lcd/e3v2/common/limits.h index da75d9c982c2..5debc3ffdb87 100644 --- a/Marlin/src/lcd/e3v2/common/limits.h +++ b/Marlin/src/lcd/e3v2/common/limits.h @@ -67,7 +67,7 @@ constexpr xyze_float_t min_acceleration_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_A #define MIN_JERK_EDIT_VALUE 0.1 #define DEFAULT_MAX_JERK_MULTIPLIER 2 -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) constexpr xyze_float_t min_jerk_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_JERK_EDIT_VALUE), default_jerk = LOGICAL_AXIS_ARRAY( DEFAULT_EJERK, diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 274390189107..c1e7a358c007 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -460,7 +460,7 @@ void drawBackFirst(const bool is_sel=true) { #define MOTION_CASE_RATE 1 #define MOTION_CASE_ACCEL 2 -#define MOTION_CASE_JERK (MOTION_CASE_ACCEL + ENABLED(HAS_CLASSIC_JERK)) +#define MOTION_CASE_JERK (MOTION_CASE_ACCEL + ENABLED(CLASSIC_JERK)) #define MOTION_CASE_STEPS (MOTION_CASE_JERK + 1) #define MOTION_CASE_TOTAL MOTION_CASE_STEPS @@ -1004,7 +1004,7 @@ void drawMotionMenu() { itemAreaCopy(173, 133, 228, 147, MOTION_CASE_RATE); // Max speed itemAreaCopy(173, 133, 200, 147, MOTION_CASE_ACCEL); // Max... itemAreaCopy(28, 149, 69, 161, MOTION_CASE_ACCEL, 30, 1); // ...Acceleration - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) itemAreaCopy(173, 133, 200, 147, MOTION_CASE_JERK); // Max... itemAreaCopy(1, 180, 28, 192, MOTION_CASE_JERK, 30, 1); // ... itemAreaCopy(202, 133, 228, 147, MOTION_CASE_JERK, 57); // ...Jerk @@ -1020,14 +1020,14 @@ void drawMotionMenu() { #ifdef USE_STRING_TITLES dwinDrawLabel(MOTION_CASE_RATE, F("Feedrate")); // "Feedrate" dwinDrawLabel(MOTION_CASE_ACCEL, GET_TEXT_F(MSG_ACCELERATION)); // "Acceleration" - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) dwinDrawLabel(MOTION_CASE_JERK, GET_TEXT_F(MSG_JERK)); // "Jerk" #endif dwinDrawLabel(MOTION_CASE_STEPS, GET_TEXT_F(MSG_STEPS_PER_MM)); // "Steps/mm" #else say_max_en(MOTION_CASE_RATE); say_speed_en(30, MOTION_CASE_RATE); // "Max Speed" say_max_accel_en(MOTION_CASE_ACCEL); // "Max Acceleration" - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) say_max_en(MOTION_CASE_JERK); say_jerk_en(MOTION_CASE_JERK); // "Max Jerk" #endif say_steps_per_mm_en(MOTION_CASE_STEPS); // "Steps-per-mm" @@ -1041,7 +1041,7 @@ void drawMotionMenu() { #define _MOTION_ICON(N) drawMenuLine(++i, ICON_MaxSpeed + (N) - 1) _MOTION_ICON(MOTION_CASE_RATE); drawMoreIcon(i); _MOTION_ICON(MOTION_CASE_ACCEL); drawMoreIcon(i); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) _MOTION_ICON(MOTION_CASE_JERK); drawMoreIcon(i); #endif _MOTION_ICON(MOTION_CASE_STEPS); drawMoreIcon(i); @@ -1597,7 +1597,7 @@ void hmiMaxAccelerationXYZE() { drawEditInteger4(select_acc.now, hmiValues.maxAcceleration, true); } -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) void hmiMaxJerkXYZE() { EncoderState encoder_diffState = encoderReceiveAnalyze(); @@ -1617,7 +1617,7 @@ void hmiMaxAccelerationXYZE() { drawEditFloat3(select_jerk.now, hmiValues.maxJerkScaled, true); } -#endif // HAS_CLASSIC_JERK +#endif // CLASSIC_JERK void hmiStepXYZE() { EncoderState encoder_diffState = encoderReceiveAnalyze(); @@ -3349,7 +3349,7 @@ void drawMaxAccelMenu() { #endif } -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) void drawMaxJerkMenu() { clearMainWindow(); @@ -3489,7 +3489,7 @@ void hmiMotion() { select_acc.reset(); drawMaxAccelMenu(); break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case MOTION_CASE_JERK: checkkey = ID_MaxJerk; select_jerk.reset(); @@ -3996,7 +3996,7 @@ void hmiMaxAcceleration() { dwinUpdateLCD(); } -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) // Max Jerk void hmiMaxJerk() { EncoderState encoder_diffState = get_encoder_state(); @@ -4025,7 +4025,7 @@ void hmiMaxAcceleration() { } dwinUpdateLCD(); } -#endif // HAS_CLASSIC_JERK +#endif // CLASSIC_JERK // Step void hmiStep() { @@ -4251,7 +4251,7 @@ void dwinHandleScreen() { #endif case ID_MaxSpeed: hmiMaxSpeed(); break; case ID_MaxAcceleration: hmiMaxAcceleration(); break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case ID_MaxJerk: hmiMaxJerk(); break; #endif case ID_Step: hmiStep(); break; @@ -4274,7 +4274,7 @@ void dwinHandleScreen() { case ID_PrintSpeed: hmiPrintSpeed(); break; case ID_MaxSpeedValue: hmiMaxFeedspeedXYZE(); break; case ID_MaxAccelerationValue: hmiMaxAccelerationXYZE(); break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case ID_MaxJerkValue: hmiMaxJerkXYZE(); break; #endif case ID_StepValue: hmiStepXYZE(); break; diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index be8605e3bba0..1cb2a2efedfb 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -2333,7 +2333,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #define MOTION_HOMEOFFSETS (MOTION_BACK + 1) #define MOTION_SPEED (MOTION_HOMEOFFSETS + 1) #define MOTION_ACCEL (MOTION_SPEED + 1) - #define MOTION_JERK (MOTION_ACCEL + ENABLED(HAS_CLASSIC_JERK)) + #define MOTION_JERK (MOTION_ACCEL + ENABLED(CLASSIC_JERK)) #define MOTION_STEPS (MOTION_JERK + 1) #define MOTION_FLOW (MOTION_STEPS + ENABLED(HAS_HOTEND)) #define MOTION_LA (MOTION_FLOW + ENABLED(LIN_ADVANCE)) @@ -2364,7 +2364,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra else drawMenu(ID_MaxAcceleration); break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case MOTION_JERK: if (draw) drawMenuItem(row, ICON_MaxJerk, GET_TEXT_F(MSG_JERK), nullptr, true); @@ -2553,7 +2553,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #endif } break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case ID_MaxJerk: #define JERK_BACK 0 @@ -4170,7 +4170,7 @@ FSTR_P JyersDWIN::getMenuTitle(const uint8_t menu) { case ID_HomeOffsets: return GET_TEXT_F(MSG_SET_HOME_OFFSETS); case ID_MaxSpeed: return GET_TEXT_F(MSG_MAX_SPEED); case ID_MaxAcceleration: return F("Max Acceleration"); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case ID_MaxJerk: return F("Max Jerk"); #endif case ID_Steps: return GET_TEXT_F(MSG_STEPS_PER_MM); @@ -4247,7 +4247,7 @@ uint8_t JyersDWIN::getMenuSize(const uint8_t menu) { case ID_HomeOffsets: return HOMEOFFSETS_TOTAL; case ID_MaxSpeed: return SPEED_TOTAL; case ID_MaxAcceleration: return ACCEL_TOTAL; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case ID_MaxJerk: return JERK_TOTAL; #endif case ID_Steps: return STEPS_TOTAL; diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 7c68c60f8195..8d54e0c582ec 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -236,7 +236,7 @@ Menu *filamentMenu = nullptr; Menu *temperatureMenu = nullptr; Menu *maxSpeedMenu = nullptr; Menu *maxAccelMenu = nullptr; -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) Menu *maxJerkMenu = nullptr; #endif Menu *stepsMenu = nullptr; @@ -2545,7 +2545,7 @@ void applyMaxAccel() { planner.set_max_acceleration(hmiValue.axis, menuData.valu void setMaxAccelE() { hmiValue.axis = E_AXIS; setIntOnClick(min_acceleration_edit_values.e, max_acceleration_edit_values.e, planner.settings.max_acceleration_mm_per_s2[E_AXIS], applyMaxAccel); } #endif -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) void applyMaxJerk() { planner.set_max_jerk(hmiValue.axis, menuData.value / MINUNITMULT); } #if HAS_X_AXIS void setMaxJerkX() { hmiValue.axis = X_AXIS, setFloatOnClick(min_jerk_edit_values.x, max_jerk_edit_values.x, UNITFDIGITS, planner.max_jerk.x, applyMaxJerk); } @@ -2880,7 +2880,7 @@ void onDrawAcc(MenuItem* menuitem, int8_t line) { } #endif -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) void onDrawJerk(MenuItem* menuitem, int8_t line) { if (hmiIsChinese()) { @@ -2941,7 +2941,7 @@ void onDrawAcc(MenuItem* menuitem, int8_t line) { #endif -#endif // HAS_CLASSIC_JERK +#endif // CLASSIC_JERK #if HAS_X_AXIS void onDrawStepsX(MenuItem* menuitem, int8_t line) { @@ -3451,7 +3451,7 @@ void drawMotionMenu() { BACK_ITEM(drawControlMenu); MENU_ITEM(ICON_MaxSpeed, MSG_SPEED, onDrawSpeed, drawMaxSpeedMenu); MENU_ITEM(ICON_MaxAccelerated, MSG_ACCELERATION, onDrawAcc, drawMaxAccelMenu); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) MENU_ITEM(ICON_MaxJerk, MSG_JERK, onDrawJerk, drawMaxJerkMenu); #elif HAS_JUNCTION_DEVIATION EDIT_ITEM(ICON_JDmm, MSG_JUNCTION_DEVIATION, onDrawPFloat3Menu, setJDmm, &planner.junction_deviation_mm); @@ -3616,7 +3616,7 @@ void drawMaxAccelMenu() { updateMenu(maxAccelMenu); } -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) void drawMaxJerkMenu() { checkkey = ID_Menu; @@ -3638,7 +3638,7 @@ void drawMaxAccelMenu() { updateMenu(maxJerkMenu); } -#endif // HAS_CLASSIC_JERK +#endif // CLASSIC_JERK void drawStepsMenu() { checkkey = ID_Menu; diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index cf4f9e264353..8706a18fac65 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -341,7 +341,7 @@ void drawFilamentManMenu(); void drawTemperatureMenu(); void drawMaxSpeedMenu(); void drawMaxAccelMenu(); -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) void drawMaxJerkMenu(); #endif void drawStepsMenu(); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp index 5b22103e8f2d..474f06939f8e 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if ALL(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK) +#if ALL(HAS_TFT_LVGL_UI, CLASSIC_JERK) #include "draw_ui.h" #include @@ -96,4 +96,4 @@ void lv_clear_jerk_settings() { lv_obj_del(scr); } -#endif // HAS_TFT_LVGL_UI && HAS_CLASSIC_JERK +#endif // HAS_TFT_LVGL_UI && CLASSIC_JERK diff --git a/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp index c81002e3e054..f6969783690e 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp @@ -46,7 +46,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { case ID_MACHINE_RETURN: draw_return_ui(); break; case ID_MACHINE_ACCELERATION: lv_draw_acceleration_settings(); break; case ID_MACHINE_FEEDRATE: lv_draw_max_feedrate_settings(); break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case ID_MACHINE_JERK: lv_draw_jerk_settings(); break; #endif } @@ -58,7 +58,7 @@ void lv_draw_machine_settings() { lv_screen_menu_item(scr, machine_menu.AccelerationConf, PARA_UI_POS_X, y, event_handler, ID_MACHINE_ACCELERATION, 0); y += PARA_UI_POS_Y; lv_screen_menu_item(scr, machine_menu.MaxFeedRateConf, PARA_UI_POS_X, y, event_handler, ID_MACHINE_FEEDRATE, 1); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) y += PARA_UI_POS_Y; lv_screen_menu_item(scr, machine_menu.JerkConf, PARA_UI_POS_X, y, event_handler, ID_MACHINE_JERK, 2); #endif diff --git a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp index 9bb93e333394..c39678ed0f88 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp @@ -118,22 +118,22 @@ static void disp_key_value() { break; case XJerk: - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) dtostrf(planner.max_jerk.x, 1, 1, public_buf_m); #endif break; case YJerk: - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) dtostrf(planner.max_jerk.y, 1, 1, public_buf_m); #endif break; case ZJerk: - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) dtostrf(planner.max_jerk.z, 1, 1, public_buf_m); #endif break; case EJerk: - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) dtostrf(planner.max_jerk.e, 1, 1, public_buf_m); #endif break; @@ -307,10 +307,10 @@ static void set_value_confirm() { case ZMaxFeedRate: planner.settings.max_feedrate_mm_s[Z_AXIS] = atof(key_value); break; case E0MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS] = atof(key_value); break; case E1MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); break; - case XJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.x = atof(key_value)); break; - case YJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.y = atof(key_value)); break; - case ZJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.z = atof(key_value)); break; - case EJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.e = atof(key_value)); break; + case XJerk: TERN_(CLASSIC_JERK, planner.max_jerk.x = atof(key_value)); break; + case YJerk: TERN_(CLASSIC_JERK, planner.max_jerk.y = atof(key_value)); break; + case ZJerk: TERN_(CLASSIC_JERK, planner.max_jerk.z = atof(key_value)); break; + case EJerk: TERN_(CLASSIC_JERK, planner.max_jerk.e = atof(key_value)); break; case Xstep: planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); planner.refresh_positioning(); break; case Ystep: planner.settings.axis_steps_per_mm[Y_AXIS] = atof(key_value); planner.refresh_positioning(); break; case Zstep: planner.settings.axis_steps_per_mm[Z_AXIS] = atof(key_value); planner.refresh_positioning(); break; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 5d44090a775c..13dbb5dee5ff 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -951,7 +951,7 @@ void clear_cur_ui() { case MAXFEEDRATE_UI: lv_clear_max_feedrate_settings(); break; case STEPS_UI: lv_clear_step_settings(); break; case ACCELERATION_UI: lv_clear_acceleration_settings(); break; - case JERK_UI: TERN_(HAS_CLASSIC_JERK, lv_clear_jerk_settings()); break; + case JERK_UI: TERN_(CLASSIC_JERK, lv_clear_jerk_settings()); break; case MOTORDIR_UI: break; case HOMESPEED_UI: break; case NOZZLE_CONFIG_UI: break; @@ -1061,7 +1061,7 @@ void draw_return_ui() { case MAXFEEDRATE_UI: lv_draw_max_feedrate_settings(); break; case STEPS_UI: lv_draw_step_settings(); break; case ACCELERATION_UI: lv_draw_acceleration_settings(); break; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) case JERK_UI: lv_draw_jerk_settings(); break; #endif case MOTORDIR_UI: break; diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 51fb55c9a471..95d965bdf998 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -587,18 +587,12 @@ void menu_backlash(); #endif - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) void menu_advanced_jerk() { START_MENU(); BACK_ITEM(MSG_ADVANCED_SETTINGS); - #if HAS_JUNCTION_DEVIATION - EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.001f, TERN(LIN_ADVANCE, 0.3f, 0.5f) - OPTARG(LIN_ADVANCE, planner.recalculate_max_e_jerk) - ); - #endif - constexpr xyze_float_t max_jerk_edit = #ifdef MAX_JERK_EDIT_VALUES MAX_JERK_EDIT_VALUES @@ -711,12 +705,12 @@ void menu_advanced_settings() { if (!is_busy) SUBMENU(MSG_INPUT_SHAPING, menu_advanced_input_shaping); #endif - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) // M205 - Max Jerk SUBMENU(MSG_JERK, menu_advanced_jerk); #elif HAS_JUNCTION_DEVIATION EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.001f, 0.3f - OPTARG(LIN_ADVANCE, planner.recalculate_max_e_jerk) + OPTARG(HAS_LINEAR_E_JERK, planner.recalculate_max_e_jerk) ); #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 70a1b105db74..61dff55caf94 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -155,7 +155,7 @@ float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step #endif #endif -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) TERN(HAS_LINEAR_E_JERK, xyz_pos_t, xyze_pos_t) Planner::max_jerk; #endif @@ -1574,7 +1574,7 @@ void Planner::check_axes_activity() { saved_motion_state.acceleration.z = settings.max_acceleration_mm_per_s2[Z_AXIS]; settings.max_acceleration_mm_per_s2[Z_AXIS] = 100; #endif - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) saved_motion_state.jerk_state = max_jerk; max_jerk.set(0, 0 OPTARG(DELTA, 0)); #endif @@ -1583,7 +1583,7 @@ void Planner::check_axes_activity() { settings.max_acceleration_mm_per_s2[X_AXIS] = saved_motion_state.acceleration.x; settings.max_acceleration_mm_per_s2[Y_AXIS] = saved_motion_state.acceleration.y; TERN_(DELTA, settings.max_acceleration_mm_per_s2[Z_AXIS] = saved_motion_state.acceleration.z); - TERN_(HAS_CLASSIC_JERK, max_jerk = saved_motion_state.jerk_state); + TERN_(CLASSIC_JERK, max_jerk = saved_motion_state.jerk_state); } refresh_acceleration_rates(); } @@ -2766,7 +2766,7 @@ bool Planner::_populate_block( #endif - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) /** * Adapted from Průša MKS firmware @@ -2863,7 +2863,7 @@ bool Planner::_populate_block( vmax_junction_sqr = sq(vmax_junction); // Go up or down to the new speed #endif - #endif // Classic Jerk Limiting + #endif // CLASSIC_JERK // Max entry speed of this block equals the max exit speed of the previous block. block->max_entry_speed_sqr = vmax_junction_sqr; @@ -3398,7 +3398,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { settings.max_feedrate_mm_s[axis] = inMaxFeedrateMMS; } -#if HAS_CLASSIC_JERK +#if ENABLED(CLASSIC_JERK) /** * For the specified 'axis' set the Maximum Jerk (instant change) to the given value (mm/s) diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 5c9830757790..e746071de9b3 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -355,7 +355,7 @@ typedef struct { #if ENABLED(IMPROVE_HOMING_RELIABILITY) struct motion_state_t { TERN(DELTA, xyz_ulong_t, xy_ulong_t) acceleration; - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) TERN(DELTA, xyz_float_t, xy_float_t) jerk_state; #endif }; @@ -477,7 +477,7 @@ class Planner { #endif #endif - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) // (mm/s^2) M205 XYZ(E) - The largest speed change requiring no acceleration. static TERN(HAS_LINEAR_E_JERK, xyz_pos_t, xyze_pos_t) max_jerk; #endif @@ -602,7 +602,7 @@ class Planner { static void set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS); // For an axis set the Maximum Jerk (instant change) in mm/s - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) static void set_max_jerk(const AxisEnum axis, float inMaxJerkMMS); #else static void set_max_jerk(const AxisEnum, const_float_t) {} diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index b99ae8ddcda7..fa7beee94b84 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -850,7 +850,7 @@ void MarlinSettings::postprocess() { { EEPROM_WRITE(planner.settings); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) EEPROM_WRITE(planner.max_jerk); #if HAS_LINEAR_E_JERK dummyf = float(DEFAULT_EJERK); @@ -1880,7 +1880,7 @@ void MarlinSettings::postprocess() { EEPROM_READ(planner.settings.min_feedrate_mm_s); EEPROM_READ(planner.settings.min_travel_feedrate_mm_s); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) EEPROM_READ(planner.max_jerk); #if HAS_LINEAR_E_JERK EEPROM_READ(dummyf); @@ -3094,7 +3094,7 @@ void MarlinSettings::reset() { planner.settings.min_feedrate_mm_s = feedRate_t(DEFAULT_MINIMUMFEEDRATE); planner.settings.min_travel_feedrate_mm_s = feedRate_t(DEFAULT_MINTRAVELFEEDRATE); - #if HAS_CLASSIC_JERK + #if ENABLED(CLASSIC_JERK) #if HAS_X_AXIS && !defined(DEFAULT_XJERK) #define DEFAULT_XJERK 0 #endif From b90133813a96ce839e17da039b2679601ee59afc Mon Sep 17 00:00:00 2001 From: Mihai <299015+mh-dm@users.noreply.github.com> Date: Thu, 14 Dec 2023 22:16:15 +0200 Subject: [PATCH 009/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20planner=20jerk=20l?= =?UTF-8?q?imits=20(#26529)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/config/M200-M205.cpp | 5 +- Marlin/src/gcode/motion/G4.cpp | 7 +- Marlin/src/module/planner.cpp | 192 ++++++++++---------------- Marlin/src/module/planner.h | 4 +- 4 files changed, 79 insertions(+), 129 deletions(-) diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index 7cdf4026b8ef..899f12099bbd 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -297,14 +297,11 @@ void GcodeSuite::M205() { if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units(); if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units(); #if HAS_JUNCTION_DEVIATION - #if ENABLED(CLASSIC_JERK) && AXIS_COLLISION('J') - #error "Can't set_max_jerk for 'J' axis because 'J' is used for Junction Deviation." - #endif if (parser.seenval('J')) { const float junc_dev = parser.value_linear_units(); if (WITHIN(junc_dev, 0.01f, 0.3f)) { planner.junction_deviation_mm = junc_dev; - TERN_(LIN_ADVANCE, planner.recalculate_max_e_jerk()); + TERN_(HAS_LINEAR_E_JERK, planner.recalculate_max_e_jerk()); } else SERIAL_ERROR_MSG("?J out of range (0.01 to 0.3)"); diff --git a/Marlin/src/gcode/motion/G4.cpp b/Marlin/src/gcode/motion/G4.cpp index ebaa6aabc062..3244c4ea4d51 100644 --- a/Marlin/src/gcode/motion/G4.cpp +++ b/Marlin/src/gcode/motion/G4.cpp @@ -38,7 +38,8 @@ void GcodeSuite::G4() { SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP); #endif - if (!ui.has_status()) LCD_MESSAGE(MSG_DWELL); - - dwell(dwell_ms); + if (dwell_ms) { + if (!ui.has_status()) LCD_MESSAGE(MSG_DWELL); + dwell(dwell_ms); + } } diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 61dff55caf94..64c47301f58a 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -153,9 +153,7 @@ float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step #if HAS_LINEAR_E_JERK float Planner::max_e_jerk[DISTINCT_E]; // Calculated from junction_deviation_mm #endif -#endif - -#if ENABLED(CLASSIC_JERK) +#else // CLASSIC_JERK TERN(HAS_LINEAR_E_JERK, xyz_pos_t, xyze_pos_t) Planner::max_jerk; #endif @@ -2374,42 +2372,42 @@ bool Planner::_populate_block( // Limit speed on extruders, if any #if HAS_EXTRUDERS - { - current_speed.e = dist_mm.e * inverse_secs; - #if HAS_MIXER_SYNC_CHANNEL - // Move all mixing extruders at the specified rate - if (mixer.get_current_vtool() == MIXER_AUTORETRACT_TOOL) - current_speed.e *= MIXING_STEPPERS; - #endif - - const feedRate_t cs = ABS(current_speed.e), - max_fr = settings.max_feedrate_mm_s[E_AXIS_N(extruder)] - * TERN(HAS_MIXER_SYNC_CHANNEL, MIXING_STEPPERS, 1); - - if (cs > max_fr) NOMORE(speed_factor, max_fr / cs); //respect max feedrate on any movement (doesn't matter if E axes only or not) - - #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - const feedRate_t max_vfr = volumetric_extruder_feedrate_limit[extruder] - * TERN(HAS_MIXER_SYNC_CHANNEL, MIXING_STEPPERS, 1); + { + current_speed.e = dist_mm.e * inverse_secs; + #if HAS_MIXER_SYNC_CHANNEL + // Move all mixing extruders at the specified rate + if (mixer.get_current_vtool() == MIXER_AUTORETRACT_TOOL) + current_speed.e *= MIXING_STEPPERS; + #endif - // TODO: Doesn't work properly for joined segments. Set MIN_STEPS_PER_SEGMENT 1 as workaround. + const feedRate_t cs = ABS(current_speed.e), + max_fr = settings.max_feedrate_mm_s[E_AXIS_N(extruder)] + * TERN(HAS_MIXER_SYNC_CHANNEL, MIXING_STEPPERS, 1); - if (block->steps.a || block->steps.b || block->steps.c) { + if (cs > max_fr) NOMORE(speed_factor, max_fr / cs); //respect max feedrate on any movement (doesn't matter if E axes only or not) - if (max_vfr > 0 && cs > max_vfr) { - NOMORE(speed_factor, max_vfr / cs); // respect volumetric extruder limit (if any) - /* <-- add a slash to enable - SERIAL_ECHOPGM("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f))); - SERIAL_ECHOPGM(" mm^3/s (", cs); - SERIAL_ECHOPGM(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f))); - SERIAL_ECHOPGM(" mm^3/s (", max_vfr); - SERIAL_ECHOLNPGM(" mm/s)"); - //*/ - } + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) + const feedRate_t max_vfr = volumetric_extruder_feedrate_limit[extruder] + * TERN(HAS_MIXER_SYNC_CHANNEL, MIXING_STEPPERS, 1); + + // TODO: Doesn't work properly for joined segments. Set MIN_STEPS_PER_SEGMENT 1 as workaround. + + if (block->steps.a || block->steps.b || block->steps.c) { + + if (max_vfr > 0 && cs > max_vfr) { + NOMORE(speed_factor, max_vfr / cs); // respect volumetric extruder limit (if any) + /* <-- add a slash to enable + SERIAL_ECHOPGM("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f))); + SERIAL_ECHOPGM(" mm^3/s (", cs); + SERIAL_ECHOPGM(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f))); + SERIAL_ECHOPGM(" mm^3/s (", max_vfr); + SERIAL_ECHOLNPGM(" mm/s)"); + //*/ } - #endif - } - #endif + } + #endif + } + #endif // HAS_EXTRUDERS #ifdef XY_FREQUENCY_LIMIT @@ -2492,7 +2490,7 @@ bool Planner::_populate_block( * * extruder_advance_K[extruder] : There is an advance factor set for this extruder. * - * dist.e > 0 : Extruder is running forward (e.g., for "Wipe while retracting" (Slic3r) or "Combing" (Cura) moves) + * dist.e > 0 : Extruder is running forward (e.g., for "Wipe while retracting" (Slic3r) or "Combing" (Cura) moves) */ use_advance_lead = esteps && extruder_advance_K[E_INDEX_N(extruder)] && dist.e > 0; @@ -2511,9 +2509,10 @@ bool Planner::_populate_block( else { // Scale E acceleration so that it will be possible to jump to the advance speed. const uint32_t max_accel_steps_per_s2 = MAX_E_JERK(extruder) / (extruder_advance_K[E_INDEX_N(extruder)] * e_D_ratio) * steps_per_mm; - if (TERN0(LA_DEBUG, accel > max_accel_steps_per_s2)) - SERIAL_ECHOLNPGM("Acceleration limited."); - NOMORE(accel, max_accel_steps_per_s2); + if (accel > max_accel_steps_per_s2) { + accel = max_accel_steps_per_s2; + if (ENABLED(LA_DEBUG)) SERIAL_ECHOLNPGM("Acceleration limited."); + } } } #endif @@ -2764,104 +2763,59 @@ bool Planner::_populate_block( prev_unit_vec = unit_vec; - #endif - - #if ENABLED(CLASSIC_JERK) + #else // CLASSIC_JERK /** - * Adapted from Průša MKS firmware + * Heavily modified. Originally adapted from Průša firmware. * https://github.com/prusa3d/Prusa-Firmware */ - // Exit speed limited by a jerk to full halt of a previous last segment - static float previous_safe_speed; - - // Start with a safe speed (from which the machine may halt to stop immediately). - float safe_speed = block->nominal_speed; - #ifndef TRAVEL_EXTRA_XYJERK - #define TRAVEL_EXTRA_XYJERK 0 + #define TRAVEL_EXTRA_XYJERK 0.0f #endif - const float extra_xyjerk = TERN0(HAS_EXTRUDERS, dist.e <= 0) ? TRAVEL_EXTRA_XYJERK : 0; - - uint8_t limited = 0; - TERN(HAS_LINEAR_E_JERK, LOOP_NUM_AXES, LOOP_LOGICAL_AXES)(i) { - const float jerk = ABS(current_speed[i]), // cs : Starting from zero, change in speed for this axis - maxj = (max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f)); // mj : The max jerk setting for this axis - if (jerk > maxj) { // cs > mj : New current speed too fast? - if (limited) { // limited already? - const float mjerk = block->nominal_speed * maxj; // ns*mj - if (jerk * safe_speed > mjerk) safe_speed = mjerk / jerk; // ns*mj/cs - } - else { - safe_speed *= maxj / jerk; // Initial limit: ns*mj/cs - ++limited; // Initially limited - } - } - } + const float extra_xyjerk = TERN0(HAS_EXTRUDERS, dist.e <= 0) ? TRAVEL_EXTRA_XYJERK : 0.0f; - float vmax_junction; - if (moves_queued && !UNEAR_ZERO(previous_nominal_speed)) { - // Estimate a maximum velocity allowed at a joint of two successive segments. - // If this maximum velocity allowed is lower than the minimum of the entry / exit safe velocities, - // then the machine is not coasting anymore and the safe entry / exit velocities shall be used. + if (!moves_queued || UNEAR_ZERO(previous_nominal_speed)) { + // Compute "safe" speed, limited by a jerk to/from full halt. - // Factor to multiply the previous / current nominal velocities to get componentwise limited velocities. - float v_factor = 1; - limited = 0; + float v_factor = 1.0f; + LOOP_LOGICAL_AXES(i) { + const float jerk = ABS(current_speed[i]), // Starting from zero, change in speed for this axis + maxj = max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f); // The max jerk setting for this axis + if (jerk * v_factor > maxj) v_factor = maxj / jerk; + } + vmax_junction_sqr = sq(block->nominal_speed * v_factor); + NOLESS(minimum_planner_speed_sqr, vmax_junction_sqr); + } + else { + // Compute the maximum velocity allowed at a joint of two successive segments. // The junction velocity will be shared between successive segments. Limit the junction velocity to their minimum. - // Pick the smaller of the nominal speeds. Higher speed shall not be achieved at the junction during coasting. - float smaller_speed_factor = 1.0f; + float vmax_junction, previous_speed_factor, current_speed_factor; if (block->nominal_speed < previous_nominal_speed) { vmax_junction = block->nominal_speed; - smaller_speed_factor = vmax_junction / previous_nominal_speed; + previous_speed_factor = vmax_junction / previous_nominal_speed; + current_speed_factor = 1.0f; } - else + else { vmax_junction = previous_nominal_speed; + previous_speed_factor = 1.0f; + current_speed_factor = vmax_junction / block->nominal_speed; + } // Now limit the jerk in all axes. - TERN(HAS_LINEAR_E_JERK, LOOP_NUM_AXES, LOOP_LOGICAL_AXES)(axis) { - // Limit an axis. We have to differentiate: coasting, reversal of an axis, full stop. - float v_exit = previous_speed[axis] * smaller_speed_factor, - v_entry = current_speed[axis]; - if (limited) { - v_exit *= v_factor; - v_entry *= v_factor; - } - - // Calculate jerk depending on whether the axis is coasting in the same direction or reversing. - const float jerk = (v_exit > v_entry) - ? // coasting axis reversal - ( (v_entry > 0 || v_exit < 0) ? (v_exit - v_entry) : _MAX(v_exit, -v_entry) ) - : // v_exit <= v_entry coasting axis reversal - ( (v_entry < 0 || v_exit > 0) ? (v_entry - v_exit) : _MAX(-v_exit, v_entry) ); - - const float maxj = (max_jerk[axis] + (axis == X_AXIS || axis == Y_AXIS ? extra_xyjerk : 0.0f)); - - if (jerk > maxj) { - v_factor *= maxj / jerk; - ++limited; - } + float v_factor = 1.0f; + LOOP_LOGICAL_AXES(i) { + // Scale per-axis velocities for the same vmax_junction. + const float v_exit = previous_speed[i] * previous_speed_factor, + v_entry = current_speed[i] * current_speed_factor; + + // Jerk is the per-axis velocity difference. + const float jerk = ABS(v_exit - v_entry), + maxj = max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f); + if (jerk * v_factor > maxj) v_factor = maxj / jerk; } - if (limited) vmax_junction *= v_factor; - // Now the transition velocity is known, which maximizes the shared exit / entry velocity while - // respecting the jerk factors, it may be possible, that applying separate safe exit / entry velocities will achieve faster prints. - const float vmax_junction_threshold = vmax_junction * 0.99f; - if (previous_safe_speed > vmax_junction_threshold && safe_speed > vmax_junction_threshold) - vmax_junction = safe_speed; + vmax_junction_sqr = sq(vmax_junction * v_factor); } - else - vmax_junction = safe_speed; - - previous_safe_speed = safe_speed; - - NOLESS(minimum_planner_speed_sqr, sq(safe_speed)); - - #if HAS_JUNCTION_DEVIATION - NOMORE(vmax_junction_sqr, sq(vmax_junction)); // Throttle down to max speed - #else - vmax_junction_sqr = sq(vmax_junction); // Go up or down to the new speed - #endif #endif // CLASSIC_JERK diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index e746071de9b3..726ccb4d3f81 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -475,9 +475,7 @@ class Planner { #if HAS_LINEAR_E_JERK static float max_e_jerk[DISTINCT_E]; // Calculated from junction_deviation_mm #endif - #endif - - #if ENABLED(CLASSIC_JERK) + #else // CLASSIC_JERK // (mm/s^2) M205 XYZ(E) - The largest speed change requiring no acceleration. static TERN(HAS_LINEAR_E_JERK, xyz_pos_t, xyze_pos_t) max_jerk; #endif From 7ab63cde62e35aa80f1c6fd65f35cb0bdc200b1d Mon Sep 17 00:00:00 2001 From: Bob Kuhn Date: Thu, 14 Dec 2023 17:37:40 -0600 Subject: [PATCH 010/236] =?UTF-8?q?=E2=9C=A8=20Creality=20E3=20Free-runs?= =?UTF-8?q?=20Silent=20Motherboard=20(#25636)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 21 +- Marlin/src/pins/esp32/pins_MM_JOKER.h | 2 +- Marlin/src/pins/pins.h | 2 + .../pins/stm32f1/pins_CREALITY_V24S1_301.h | 2 +- .../pins/stm32f4/pins_CREALITY_CR4NTXXC10.h | 261 +++++++++ .../pins/stm32f4/pins_FYSETC_SPIDER_KING407.h | 2 +- .../boards/marlin_STM32F401RE_freeruns.json | 65 +++ .../PeripheralPins.c | 252 +++++++++ .../MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h | 33 ++ .../hal_conf_custom.h | 495 ++++++++++++++++++ .../MARLIN_STM32F401RE_FREERUNS/ldscript.ld | 186 +++++++ .../MARLIN_STM32F401RE_FREERUNS/variant.cpp | 238 +++++++++ .../MARLIN_STM32F401RE_FREERUNS/variant.h | 154 ++++++ ini/stm32f4.ini | 27 + 14 files changed, 1727 insertions(+), 13 deletions(-) create mode 100644 Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h create mode 100644 buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index c55035e8f075..b51513bca9d6 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -454,16 +454,17 @@ #define BOARD_ARTILLERY_RUBY 5238 // Artillery Ruby (STM32F401RC) #define BOARD_FYSETC_SPIDER_V2_2 5239 // FYSETC Spider V2.2 (STM32F446VE) #define BOARD_CREALITY_V24S1_301F4 5240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4 -#define BOARD_OPULO_LUMEN_REV4 5241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG) -#define BOARD_FYSETC_SPIDER_KING407 5242 // FYSETC Spider King407 (STM32F407ZG) -#define BOARD_MKS_SKIPR_V1 5243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE) -#define BOARD_TRONXY_V10 5244 // TRONXY V10 (STM32F446ZE) -#define BOARD_CREALITY_F401RE 5245 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1 -#define BOARD_BLACKPILL_CUSTOM 5246 // Custom board based on STM32F401CDU6. -#define BOARD_I3DBEEZ9_V1 5247 // I3DBEEZ9 V1 (STM32F407ZG) -#define BOARD_MELLOW_FLY_E3_V2 5248 // Mellow Fly E3 V2 (STM32F407VG) -#define BOARD_FYSETC_CHEETAH_V30 5249 // FYSETC Cheetah V3.0 (STM32F446RC) -#define BOARD_BLACKBEEZMINI_V1 5250 // BlackBeezMini V1 (STM32F401CCU6) +#define BOARD_CREALITY_CR4NTXXC10 5241 // Creality E3 Free-runs Silent Motherboard (STM32F401RET6) +#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG) +#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG) +#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE) +#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE) +#define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1 +#define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6. +#define BOARD_I3DBEEZ9_V1 5248 // I3DBEEZ9 V1 (STM32F407ZG) +#define BOARD_MELLOW_FLY_E3_V2 5249 // Mellow Fly E3 V2 (STM32F407VG) +#define BOARD_FYSETC_CHEETAH_V30 5250 // FYSETC Cheetah V3.0 (STM32F446RC) +#define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6) // // ARM Cortex-M7 diff --git a/Marlin/src/pins/esp32/pins_MM_JOKER.h b/Marlin/src/pins/esp32/pins_MM_JOKER.h index 184a94c01b30..52ed543c33fd 100644 --- a/Marlin/src/pins/esp32/pins_MM_JOKER.h +++ b/Marlin/src/pins/esp32/pins_MM_JOKER.h @@ -220,7 +220,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/pins.h b/Marlin/src/pins/pins.h index 28ae5e8d42f8..842a79c320e4 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -796,6 +796,8 @@ #include "stm32f4/pins_ARTILLERY_RUBY.h" // STM32F4 env:Artillery_Ruby #elif MB(CREALITY_V24S1_301F4) #include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_nobootloader env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink +#elif MB(CREALITY_CR4NTXXC10) + #include "stm32f4/pins_CREALITY_CR4NTXXC10.h" // STM32F4 env:STM32F401RE_freeruns env:STM32F401RE_freeruns_jlink env:STM32F401RE_freeruns_stlink #elif MB(OPULO_LUMEN_REV4) #include "stm32f4/pins_OPULO_LUMEN_REV4.h" // STM32F4 env:Opulo_Lumen_REV4 #elif MB(FYSETC_SPIDER_KING407) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h index ce942ba5450e..a99143bad976 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h @@ -89,7 +89,7 @@ #define SPINDLE_LASER_PWM_PIN PC0 // Bed FET #define SPINDLE_LASER_ENA_PIN PC0 // FET 1 #define SPINDLE_DIR_PIN PC0 // FET 4 - #define LASER_SOFT_PWM_PIN PC0 + //#define LASER_SOFT_PWM_PIN PC0 #endif #include "pins_CREALITY_V4.h" diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h new file mode 100644 index 000000000000..77be5777535a --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -0,0 +1,261 @@ +/** + * 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 . + * + */ + +/** + * Creality CREALITY_CR4NTXXC10 (STM32F401RET6) board pin assignments + * + * Sold as "E3 Free-runs Silent Motherboard" + */ +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 + #error "CR4NT220622C10 only supports one hotend / E-stepper." +#endif + +#if !AXIS_DRIVER_TYPE_X(TMC2209) || !AXIS_DRIVER_TYPE_Y(TMC2209) || !AXIS_DRIVER_TYPE_Z(TMC2209) || !AXIS_DRIVER_TYPE_E0(TMC2209) + #error "This board has onboard TMC2209 drivers for X, Y, Z, and E0." +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "CR4NT220622C10" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "Ender-3 Series" +#endif +#define BOARD_WEBSITE_URL "www.creality.com" + +#define BOARD_NO_NATIVE_USB +//#undef DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. +//#define DISABLE_JTAG + +// +// 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 +// +#define SERVO0_PIN PB0 // BLTouch PWM-OUT PIN (TOUCH pins in the schematic have changed) + +// +// Limit Switches +// +#define X_STOP_PIN PA5 +#define Y_STOP_PIN PA6 + +#if ENABLED(BLTOUCH) + #define Z_MIN_PIN PB1 // BLTouch IN PIN (TOUCH pins in the schematic have changed) + #define Z_MAX_PIN PA7 +#else + #define Z_STOP_PIN PA7 // Z-axis limit switch +#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 +// +#define X_ENABLE_PIN PC3 +#define X_STEP_PIN PC2 +#define X_DIR_PIN PB9 + +#define Y_ENABLE_PIN PC3 +#define Y_STEP_PIN PB8 +#define Y_DIR_PIN PB7 + +#define Z_ENABLE_PIN PC3 +#define Z_STEP_PIN PB6 +#define Z_DIR_PIN PB5 + +#define E0_ENABLE_PIN PC3 +#define E0_STEP_PIN PB4 +#define E0_DIR_PIN PB3 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC5 // TH1 +#define TEMP_BED_PIN PC4 // TB1 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PA1 // HEATER1 +#define HEATER_BED_PIN PB10 // HOT BED + +#ifndef FAN0_PIN + #define FAN0_PIN PA0 // FAN +#endif +#if PIN_EXISTS(FAN0) + #define FAN_SOFT_PWM +#endif + +#if HAS_TMC_UART + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 + + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + #define X_HARDWARE_SERIAL Serial6 + #define Y_HARDWARE_SERIAL Serial6 + #define Z_HARDWARE_SERIAL Serial6 + #define E0_HARDWARE_SERIAL Serial6 + + #ifndef X_SLAVE_ADDRESS + #define X_SLAVE_ADDRESS 0 + #endif + #ifndef Y_SLAVE_ADDRESS + #define Y_SLAVE_ADDRESS 1 + #endif + #ifndef Z_SLAVE_ADDRESS + #define Z_SLAVE_ADDRESS 2 + #endif + #ifndef E0_SLAVE_ADDRESS + #define E0_SLAVE_ADDRESS 3 + #endif + + // Software serial + + #define X_SERIAL_TX_PIN PC6 + #define X_SERIAL_RX_PIN PC7 + + #define Y_SERIAL_TX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_RX_PIN X_SERIAL_RX_PIN + + #define Z_SERIAL_TX_PIN X_SERIAL_TX_PIN + #define Z_SERIAL_RX_PIN X_SERIAL_RX_PIN + + #define E0_SERIAL_TX_PIN X_SERIAL_TX_PIN + #define E0_SERIAL_RX_PIN X_SERIAL_RX_PIN + + #define E1_SERIAL_TX_PIN X_SERIAL_TX_PIN + #define E1_SERIAL_RX_PIN X_SERIAL_RX_PIN + + #define X_DIAG_PIN PC13 + #define Y_DIAG_PIN PC14 + #define Z_DIAG_PIN PC15 + #define E0_DIAG_PIN PA15 + +#endif // HAS_TMC_UART + +// +// SD Card +// +#define SD_DETECT_PIN PC1 +#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 ENABLED(CR10_STOCKDISPLAY) + + #if ENABLED(RET6_12864_LCD) + // RET6 12864 LCD + #define LCD_PINS_RS PB12 + #define LCD_PINS_EN PB15 + #define LCD_PINS_D4 PB13 + + #define BTN_ENC PB2 + #define BTN_EN1 PA2 + #define BTN_EN2 PB14 + + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN PC0 + #endif + + #elif ENABLED(VET6_12864_LCD) + // VET6 12864 LCD + #define LCD_PINS_RS PA4 + //#define LCD_PINS_EN PA7 + #define LCD_PINS_D4 PA5 + + #define BTN_ENC PC5 + #define BTN_EN1 PB10 + #define BTN_EN2 PA6 + + #else + #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the CREALITY_CR4NTXXC10 controller." + #endif + +#elif ENABLED(DWIN_CREALITY_LCD) + + // RET6 DWIN ENCODER LCD + #define BTN_ENC PB14 + #define BTN_EN1 PB15 + #define BTN_EN2 PB12 + + //#define LCD_LED_PIN PB2 + #ifndef BEEPER_PIN + #define BEEPER_PIN PB13 + #undef SPEAKER + #endif + +#elif ENABLED(DWIN_VET6_CREALITY_LCD) + + // VET6 DWIN ENCODER LCD + #define BTN_ENC PA6 + //#define BTN_EN1 PA7 + #define BTN_EN2 PA4 + + #define BEEPER_PIN PA5 + +#endif + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if HAS_CUTTER + //#undef HEATER_0_PIN + //#undef HEATER_BED_PIN + //#undef FAN0_PIN + #define SPINDLE_LASER_ENA_PIN PC0 // FET 1 + #define SPINDLE_LASER_PWM_PIN PC0 // Bed FET + #define SPINDLE_DIR_PIN PC0 // FET 4 + //#define LASER_SOFT_PWM_PIN PC0 +#endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h index c79a4f5eb545..bfe4469084f0 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h @@ -309,7 +309,7 @@ #define LCD_SDSS EXP2_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json b/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json new file mode 100644 index 000000000000..3a8848e93418 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json @@ -0,0 +1,65 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F401xx", + "f_cpu": "84000000L", + "hwids": [ + [ + "0x1EAF", + "0x0003" + ], + [ + "0x0483", + "0x3748" + ] + ], + "ldscript": "ldscript.ld", + "mcu": "stm32f401ret6", + "variant": "MARLIN_STM32F401RE_FREERUNS" + }, + "debug": { + "jlink_device": "STM32F401RE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F40x.svd", + "tools": { + "stlink": { + "server": { + "arguments": [ + "-f", + "scripts/interface/stlink.cfg", + "-c", + "transport select hla_swd", + "-f", + "scripts/target/stm32f4x.cfg", + "-c", + "reset_config none" + ], + "executable": "bin/openocd", + "package": "tool-openocd" + } + } + } + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32F401RE (96k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 98304, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink" + ], + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f401re.html", + "vendor": "Generic" +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PeripheralPins.c new file mode 100644 index 000000000000..418ef5aa7abc --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PeripheralPins.c @@ -0,0 +1,252 @@ +/* + ******************************************************************************* + * Copyright (c) 2019, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + * Automatically generated from STM32F401R[(B-C)|(D-E)]Tx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: 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, 0, 0)}, // ADC1_IN0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + {NC, NP, 0} +}; +#endif + +//*** No DAC *** + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C2)}, + {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)}, + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_0, 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, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {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, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {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_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {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_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_11, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {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)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_3, 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)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_2, 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)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {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)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {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)}, + {NC, NP, 0} +}; +#endif + +//*** No CAN *** + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB_OTG_FS[] = { +#ifndef ARDUINO_CoreBoard_F401RC + {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS + {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID +#endif + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; +#endif + +//*** No USB_OTG_HS *** + +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 + {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 + {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 + {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h new file mode 100644 index 000000000000..f5db451e6f19 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h @@ -0,0 +1,33 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_SOF = PA_8, + USB_OTG_FS_VBUS = PA_9, + USB_OTG_FS_ID = PA_10, + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h new file mode 100644 index 000000000000..808b5588ed5c --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h @@ -0,0 +1,495 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf.h + * @brief HAL configuration file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2017 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 + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_CUSTOM +#define __STM32F4xx_HAL_CONF_CUSTOM + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ + /** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_EXTI_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED +//#define HAL_USART_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#ifndef HSE_VALUE +#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#ifndef HSE_STARTUP_TIMEOUT +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#ifndef HSI_VALUE +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#ifndef LSI_VALUE +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#ifndef LSE_VALUE +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#ifndef LSE_STARTUP_TIMEOUT +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#ifndef EXTERNAL_CLOCK_VALUE +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U +#endif +#if !defined (INSTRUCTION_CACHE_ENABLE) +#define INSTRUCTION_CACHE_ENABLE 1U +#endif +#if !defined (DATA_CACHE_ENABLE) +#define DATA_CACHE_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ + +/* DP83848_PHY_ADDRESS Address*/ +#define DP83848_PHY_ADDRESS 0x01U +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ +#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver + * Activated: CRC code is present inside driver + * Deactivated: CRC code cleaned from driver + */ +#ifndef USE_SPI_CRC +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED +#include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED +#include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_CUSTOM_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld new file mode 100644 index 000000000000..f34e389fb103 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld @@ -0,0 +1,186 @@ +/* +***************************************************************************** +** +** File : ldscript.ld +** +** Abstract : Linker script for STM32F401RETx Device with +** 512KByte FLASH, 96KByte 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) 2014 Ac6 +** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of Ac6 nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20017FFB; /* 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 +{ +FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K +} + +/* 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): + { + . = 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 */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _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 + + /* 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 + + + + /* 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_STM32F401RE_FREERUNS/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.cpp new file mode 100644 index 000000000000..d603ad6ef1ab --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.cpp @@ -0,0 +1,238 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, // Digital pin 0 + PA_1, // Digital pin 1 + PA_2, // Digital pin 2 + PA_3, // Digital pin 3 + PA_4, // Digital pin 4 + PA_5, // Digital pin 5 + PA_6, // Digital pin 6 + PA_7, // Digital pin 7 + PA_8, // Digital pin 8 + PA_9, // Digital pin 9 + PA_10, // Digital pin 10 + PA_11, // Digital pin 11 + PA_12, // Digital pin 12 + PA_13, // Digital pin 13 + PA_14, // Digital pin 14 + PA_15, // Digital pin 15 + + PB_0, // Digital pin 16 + PB_1, // Digital pin 17 + PB_2, // Digital pin 18 + PB_3, // Digital pin 19 + PB_4, // Digital pin 20 + PB_5, // Digital pin 21 + PB_6, // Digital pin 22 + PB_7, // Digital pin 23 + PB_8, // Digital pin 24 + PB_9, // Digital pin 25 + PB_10, // Digital pin 26 + PB_12, // Digital pin 27 + PB_13, // Digital pin 28 + PB_14, // Digital pin 29 + PB_15, // Digital pin 30 + + PC_0, // Digital pin 31 + PC_1, // Digital pin 32 + PC_2, // Digital pin 33 + PC_3, // Digital pin 34 + PC_4, // Digital pin 35 + PC_5, // Digital pin 36 + PC_6, // Digital pin 37 + PC_7, // Digital pin 38 + PC_8, // Digital pin 39 + PC_9, // Digital pin 40 + PC_10, // Digital pin 41 + PC_11, // Digital pin 42 + PC_12, // Digital pin 43 + PC_13, // Digital pin 44 + PC_14, // Digital pin 45 + PC_15, // Digital pin 46 + + PD_2, // Digital pin 47 + + PH_0, // Digital pin 48, used by the external oscillator + PH_1 // Digital pin 49, used by the external oscillator +}; + +// 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 + 31, // A10, PC0 + 32, // A11, PC1 + 33, // A12, PC2 + 34, // A13, PC3 + 35, // A14, PC4 + 36 // A15, PC5 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ + +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ +static uint8_t SetSysClock_PLL_HSE(uint8_t bypass) +{ + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct; + + /* The voltage scaling allows optimizing the power consumption when the device is + clocked below the maximum system frequency, to update the voltage scaling value + regarding system frequency refer to product datasheet. */ + __HAL_RCC_PWR_CLK_ENABLE(); + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2); + + // Enable HSE oscillator and activate PLL with HSE as source + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + if (bypass == 0) { + RCC_OscInitStruct.HSEState = RCC_HSE_ON; // External 8 MHz xtal on OSC_IN/OSC_OUT + } else { + RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; // External 8 MHz clock on OSC_IN + } + + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = HSE_VALUE / 1000000L; // Expects an 8 MHz external clock by default. Redefine HSE_VALUE if not + RCC_OscInitStruct.PLL.PLLN = 336; // VCO output clock = 336 MHz (1 MHz * 336) + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4; // PLLCLK = 84 MHz (336 MHz / 4) + RCC_OscInitStruct.PLL.PLLQ = 7; // USB clock = 48 MHz (336 MHz / 7) --> OK for USB + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { + return 0; // FAIL + } + + // Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; // 84 MHz + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; // 84 MHz + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; // 42 MHz + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; // 84 MHz + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { + return 0; // FAIL + } + + /* Output clock on MCO1 pin(PA8) for debugging purpose */ + /* + if (bypass == 0) + HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_2); // 4 MHz + else + HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1); // 8 MHz + */ + + return 1; // OK +} + +/******************************************************************************/ +/* PLL (clocked by HSI) used as System clock source */ +/******************************************************************************/ +uint8_t SetSysClock_PLL_HSI(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct; + + /* The voltage scaling allows optimizing the power consumption when the device is + clocked below the maximum system frequency, to update the voltage scaling value + regarding system frequency refer to product datasheet. */ + __HAL_RCC_PWR_CLK_ENABLE(); + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2); + + // Enable HSI oscillator and activate PLL with HSI as source + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSEState = RCC_HSE_OFF; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; + RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16) + RCC_OscInitStruct.PLL.PLLN = 336; // VCO output clock = 336 MHz (1 MHz * 336) + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4; // PLLCLK = 84 MHz (336 MHz / 4) + RCC_OscInitStruct.PLL.PLLQ = 7; // USB clock = 48 MHz (336 MHz / 7) --> freq is ok but not precise enough + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { + return 0; // FAIL + } + + /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers */ + RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; // 84 MHz + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; // 84 MHz + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; // 42 MHz + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; // 84 MHz + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { + return 0; // FAIL + } + + /* Output clock on MCO1 pin(PA8) for debugging purpose */ + //HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1); // 16 MHz + + return 1; // OK +} + +WEAK void SystemClock_Config(void) +{ + /* 1- If fail try to start with HSE and external xtal */ + if (SetSysClock_PLL_HSE(0) == 0) { + /* 2- Try to start with HSE and external clock */ + if (SetSysClock_PLL_HSE(1) == 0) { + /* 3- If fail start with HSI clock */ + if (SetSysClock_PLL_HSI() == 0) { + Error_Handler(); + } + } + } + /* Output clock on MCO2 pin(PC9) for debugging purpose */ + //HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h new file mode 100644 index 000000000000..b5c5a65a7426 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h @@ -0,0 +1,154 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + + +// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | +// |---------|--------|-----------|----------|------------------------|-----------| +#define PA0 0 // | 0 | A0 | | | | | +#define PA1 1 // | 1 | A1 | | | | | +#define PA2 2 // | 2 | A2 | USART2_TX | | | | +#define PA3 3 // | 3 | A3 | USART2_RX | | | | +#define PA4 4 // | 4 | A4 | | | SPI1_SS, (SPI3_SS) | | +#define PA5 5 // | 5 | A5 | | | SPI1_SCK | | +#define PA6 6 // | 6 | A6 | | | SPI1_MISO | | +#define PA7 7 // | 7 | A7 | | | SPI1_MOSI | | +#define PA8 8 // | 8 | | | TWI3_SCL | | | +#define PA9 9 // | 9 | | USART1_TX | | | | +#define PA10 10 // | 10 | | USART1_RX | | | | +#define PA11 11 // | 11 | | USART6_TX | | | | +#define PA12 12 // | 12 | | USART6_RX | | | | +#define PA13 13 // | 13 | | | | | SWD_SWDIO | +#define PA14 14 // | 14 | | | | | SWD_SWCLK | +#define PA15 15 // | 15 | | | | SPI3_SS, (SPI1_SS) | | +// |---------|--------|-----------|----------|------------------------|-----------| +#define PB0 16 // | 16 | A8 | | | | | +#define PB1 17 // | 17 | A9 | | | | | +#define PB2 18 // | 18 | | | | | BOOT1 | +#define PB3 19 // | 19 | | | TWI2_SDA | SPI3_SCK, (SPI1_SCK) | | +#define PB4 20 // | 20 | | | TWI3_SDA | SPI3_MISO, (SPI1_MISO) | | +#define PB5 21 // | 21 | | | | SPI3_MOSI, (SPI1_MOSI) | | +#define PB6 22 // | 22 | | USART1_TX | TWI1_SCL | | | +#define PB7 23 // | 23 | | USART1_RX | TWI1_SDA | | | +#define PB8 24 // | 24 | | | TWI1_SCL | | | +#define PB9 25 // | 25 | | | TWI1_SDA | SPI2_SS | | +#define PB10 26 // | 26 | | | TWI2_SCL | SPI2_SCK | | +#define PB12 27 // | 27 | | | | SPI2_SS | | +#define PB13 28 // | 28 | | | | SPI2_SCK | | +#define PB14 29 // | 29 | | | | SPI2_MISO | | +#define PB15 30 // | 30 | | | | SPI2_MOSI | | +// |---------|--------|-----------|----------|------------------------|-----------| +#define PC0 31 // | 31 | A10 | | | | | +#define PC1 32 // | 32 | A11 | | | | | +#define PC2 33 // | 33 | A12 | | | SPI2_MISO | | +#define PC3 34 // | 34 | A13 | | | SPI2_MOSI | | +#define PC4 35 // | 35 | A14 | | | | | +#define PC5 36 // | 36 | A15 | | | | | +#define PC6 37 // | 37 | | USART6_TX | | | | +#define PC7 38 // | 38 | | USART6_RX | | | | +#define PC8 39 // | 39 | | | | | | +#define PC9 40 // | 40 | | | TWI3_SDA | | | +#define PC10 41 // | 41 | | | | SPI3_SCK | | +#define PC11 42 // | 42 | | | | SPI3_MISO | | +#define PC12 43 // | 43 | | | | SPI3_MOSI | | +#define PC13 44 // | 44 | | | | | | +#define PC14 45 // | 45 | | | | | OSC32_IN | +#define PC15 46 // | 46 | | | | | OSC32_OUT | +// |---------|--------|-----------|----------|------------------------|-----------| +#define PD2 47 // | 47 | | | | | | +// |---------|--------|-----------|----------|------------------------|-----------| +#define PH0 48 // | 48 | | | | | OSC_IN | +#define PH1 49 // | 49 | | | | | OSC_OUT | +// |---------|--------|-----------|----------|------------------------|-----------| + +// This must be a literal +#define NUM_DIGITAL_PINS 50 +#define NUM_ANALOG_INPUTS 16 + +// SPI definitions +#define PIN_SPI_SS PA4 +#define PIN_SPI_SS1 PA4 +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 + + +// Timer Definitions +#define TIMER_TONE TIM2 +#define TIMER_SERVO TIM5 +#define TIMER_SERIAL TIM11 + +// UART Definitions +//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below +#define ENABLE_HWSERIAL2 +#define ENABLE_HWSERIAL6 + + +// Define here Serial instance number to map on Serial generic name (if not already used by SerialUSB) +#define SERIAL_UART_INSTANCE 1 //1 for Serial = Serial1 (USART1) + +// Default pin used for 'Serial' instance +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +// Used when the user instantiates a hardware Serial using its peripheral name. +// Example: HardwareSerial mySerial(USART3); +// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. +#define PIN_SERIAL1_RX PA10 +#define PIN_SERIAL1_TX PA9 +#define PIN_SERIAL2_RX PA3 +#define PIN_SERIAL2_TX PA2 +#define PIN_SERIAL6_RX PC7 +#define PIN_SERIAL6_TX PC6 + +#ifdef __cplusplus +} // extern "C" +#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. + #define SERIAL_PORT_MONITOR Serial + #define SERIAL_PORT_HARDWARE Serial1 + #define SERIAL_PORT_HARDWARE_OPEN Serial2 +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 60ccee94d89b..84d26553e08c 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -737,6 +737,33 @@ extends = env:STM32F401RE_creality debug_tool = stlink upload_protocol = stlink +# +# STM32F401RE_freeruns Creality E3 Free-runs Silent Motherboard +# +[env:STM32F401RE_freeruns] +extends = stm32_variant +board = genericSTM32F401RE +board_build.variant = marlin_STM32F401RE_freeruns +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RE -DSTM32F4 + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 + -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC +extra_scripts = ${stm32_variant.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/random-bin.py +monitor_speed = 115200 + +[env:STM32F401RE_freeruns_jlink] +extends = env:STM32F401RE_freeruns +debug_tool = jlink +upload_protocol = jlink + +[env:STM32F401RE_freeruns_stlink] +extends = env:STM32F401RE_freeruns +debug_tool = stlink +upload_protocol = stlink + # # BigTree SKR mini E3 V3.0.1 (STM32F401RCT6 ARM Cortex-M4) # From 68ab7f6bb7d93ed24054b033334c5821ea4e4cbf Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 15 Dec 2023 00:21:58 +0000 Subject: [PATCH 011/236] [cron] Bump distribution date (2023-12-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 52512a611302..0aa31f056cac 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-12-14" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 80b1de278bb1..225e323ded73 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-12-14" + #define STRING_DISTRIBUTION_DATE "2023-12-15" #endif /** From 00298e6681bfdc6231eeb5624dda1eebbd7fe075 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 15 Dec 2023 20:23:59 -0600 Subject: [PATCH 012/236] =?UTF-8?q?=F0=9F=94=A7=20Update=20fan=200=20confl?= =?UTF-8?q?ict=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25568 --- 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 1471d2d13c23..3be670a222a1 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3744,7 +3744,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive." #error "SPINDLE_LASER_PWM_PIN conflicts with E6_AUTO_FAN_PIN." #elif _PIN_CONFLICT(E7_AUTO_FAN) #error "SPINDLE_LASER_PWM_PIN conflicts with E7_AUTO_FAN_PIN." - #elif _PIN_CONFLICT(FAN) + #elif _PIN_CONFLICT(FAN0) #error "SPINDLE_LASER_PWM_PIN conflicts with FAN0_PIN." #elif _PIN_CONFLICT(FAN1) #error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN." From 3f9c2f89fc61819331ec332eff1df939f47d82b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 15 Dec 2023 23:40:26 -0600 Subject: [PATCH 013/236] =?UTF-8?q?=F0=9F=94=A7=20Fix=20IDEX=20home=20chec?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25780 --- 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 3be670a222a1..2bde7f6f4542 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1822,7 +1822,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS." #elif X_HOME_TO_MAX - #error "DUAL_X_CARRIAGE requires X_HOME_DIR 1." + #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1." #endif #endif From 145ab7b1ec99f24d8e6a5e9857e1e4a08e459b7d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 16 Dec 2023 06:05:48 +0000 Subject: [PATCH 014/236] [cron] Bump distribution date (2023-12-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 0aa31f056cac..aa0701e65492 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-12-15" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 225e323ded73..2a367c10ca4c 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-12-15" + #define STRING_DISTRIBUTION_DATE "2023-12-16" #endif /** From 4a89ef6273c6b0fafd3132900863e5a1f332b579 Mon Sep 17 00:00:00 2001 From: geijt <3473304+geijt@users.noreply.github.com> Date: Sun, 17 Dec 2023 23:33:46 +0100 Subject: [PATCH 015/236] Fix Creality E3 "Free-runs" (#26533) Followup to #25636 --- Marlin/src/inc/Conditionals_adv.h | 2 +- .../pins/stm32f4/pins_CREALITY_CR4NTXXC10.h | 20 +++++++++---------- .../MARLIN_STM32F401RE_FREERUNS/ldscript.ld | 10 +++++----- ini/stm32f4.ini | 3 ++- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index f62714df4b62..f1caf52c7374 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1277,7 +1277,7 @@ #if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT) #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101) #define LCD_SERIAL_PORT 1 - #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) + #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, CREALITY_CR4NTXXC10, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) #define LCD_SERIAL_PORT 2 #else #define LCD_SERIAL_PORT 3 diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h index 77be5777535a..0a6f3e3059bf 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -100,15 +100,15 @@ #define X_STEP_PIN PC2 #define X_DIR_PIN PB9 -#define Y_ENABLE_PIN PC3 +#define Y_ENABLE_PIN X_ENABLE_PIN #define Y_STEP_PIN PB8 #define Y_DIR_PIN PB7 -#define Z_ENABLE_PIN PC3 +#define Z_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN PB6 #define Z_DIR_PIN PB5 -#define E0_ENABLE_PIN PC3 +#define E0_ENABLE_PIN X_ENABLE_PIN #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB3 @@ -142,21 +142,21 @@ * If undefined software serial is used according to the pins below */ #define X_HARDWARE_SERIAL Serial6 - #define Y_HARDWARE_SERIAL Serial6 - #define Z_HARDWARE_SERIAL Serial6 - #define E0_HARDWARE_SERIAL Serial6 + #define Y_HARDWARE_SERIAL X_HARDWARE_SERIAL + #define Z_HARDWARE_SERIAL X_HARDWARE_SERIAL + #define E0_HARDWARE_SERIAL X_HARDWARE_SERIAL #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #define X_SLAVE_ADDRESS 0 #endif #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 1 + #define Y_SLAVE_ADDRESS 1 #endif #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 2 + #define Z_SLAVE_ADDRESS 2 #endif #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #define E0_SLAVE_ADDRESS 3 #endif // Software serial diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld index f34e389fb103..2c57307813d4 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld @@ -51,17 +51,17 @@ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ -_estack = 0x20017FFB; /* end of RAM */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* 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 */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE } /* Define output sections */ diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 84d26553e08c..3f3347194334 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -746,9 +746,10 @@ board = genericSTM32F401RE board_build.variant = marlin_STM32F401RE_freeruns board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 +board_build.rename = firmware-{date}-{time}.bin build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RE -DSTM32F4 -DSS_TIMER=4 -DTIMER_SERVO=TIM5 - -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 + -DTRANSFER_CLOCK_DIV=8 build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC extra_scripts = ${stm32_variant.extra_scripts} pre:buildroot/share/PlatformIO/scripts/random-bin.py From 0ede16cd5ab75278e6b4a599ee451ba4bb5ac739 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 18 Dec 2023 00:22:22 +0000 Subject: [PATCH 016/236] [cron] Bump distribution date (2023-12-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 aa0701e65492..a096d32aa93f 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-12-16" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 2a367c10ca4c..bfdf5c7c2b1b 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-12-16" + #define STRING_DISTRIBUTION_DATE "2023-12-18" #endif /** From 67d7562609986fae14d80036ad1e7a7f3aaa49d0 Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Wed, 20 Dec 2023 02:56:47 +0100 Subject: [PATCH 017/236] =?UTF-8?q?=F0=9F=90=9B=E2=9A=A1=EF=B8=8F=20FT=5FM?= =?UTF-8?q?OTION=20improvements=20(#26074)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Scott Lahteine --- Marlin/Configuration_adv.h | 84 ++- Marlin/src/gcode/bedlevel/G35.cpp | 4 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 1 + Marlin/src/gcode/bedlevel/mbl/G29.cpp | 1 + Marlin/src/gcode/calibrate/G34_M422.cpp | 1 + Marlin/src/gcode/feature/ft_motion/M493.cpp | 107 ++- Marlin/src/gcode/probe/G38.cpp | 1 + Marlin/src/inc/Conditionals_adv.h | 2 +- Marlin/src/lcd/language/language_en.h | 6 +- Marlin/src/lcd/menu/menu_motion.cpp | 23 +- Marlin/src/module/ft_motion.cpp | 701 ++++++++++---------- Marlin/src/module/ft_motion.h | 69 +- Marlin/src/module/ft_types.h | 29 +- Marlin/src/module/motion.cpp | 19 - Marlin/src/module/stepper.cpp | 244 +++---- Marlin/src/module/stepper.h | 7 +- 16 files changed, 654 insertions(+), 645 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8b4fa1ab7ca1..72aee115884d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1121,42 +1121,62 @@ #if ENABLED(FT_MOTION) #define FTM_DEFAULT_MODE ftMotionMode_DISABLED // 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. + #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_X 0.1f // Zeta used by input shapers for X axis + #define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis + + #define FTM_SHAPING_V_TOL_X 0.05f // Vibration tolerance used by EI input shapers for X axis + #define FTM_SHAPING_V_TOL_Y 0.05f // Vibration tolerance used by EI input shapers for Y axis + + //#define FT_MOTION_MENU // Provide a MarlinUI menu to set M493 parameters /** * Advanced configuration */ - #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; - #define FTM_WINDOW_SIZE 200 // Window size for trajectory generation. - #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. - - //#define FT_MOTION_MENU // Provide a MarlinUI menu to set M493 parameters. + #define FTM_UNIFIED_BWS // DON'T DISABLE unless you use Ulendo FBS (not implemented) + #if ENABLED(FTM_UNIFIED_BWS) + #define FTM_BW_SIZE 100 // Unified Window and Batch size with a ratio of 2 + #else + #define FTM_WINDOW_SIZE 200 // Custom Window size for trajectory generation needed by Ulendo FBS + #define FTM_BATCH_SIZE 100 // Custom Batch size for trajectory generation needed by Ulendo FBS + #endif + + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (Reciprocal of FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (Reciprocal of FTM_FS) + + // These values may be configured to adjust the 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() + + #if DISABLED(COREXY) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update + + // Use this to adjust the time required to consume the command buffer. + // Try increasing this value if stepper motion is choppy. + #define FTM_STEPPERCMD_BUFF_SIZE 3000 // Size of the stepper command buffers + // (FTM_STEPS_PER_LOOP * FTM_POINTS_PER_LOOP) is a good start + // If you run out of memory, fall back to 3000 and increase progressively + #else + // CoreXY motion needs a larger buffer size. These values are based on our testing. + #define FTM_STEPPER_FS 30000 + #define FTM_STEPPERCMD_BUFF_SIZE 6000 + #endif + + #define FTM_STEPS_PER_UNIT_TIME (FTM_STEPPER_FS / FTM_FS) // Interpolated stepper commands per unit time + #define FTM_CTS_COMPARE_VAL (FTM_STEPS_PER_UNIT_TIME / 2) // Comparison value used in interpolation algorithm + #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_RATIO (FTM_FS / FTM_MIN_SHAPE_FREQ) // Factor for use in FTM_ZMAX. DON'T CHANGE. + #define FTM_ZMAX (FTM_RATIO * 2) // Maximum delays for shaping functions (even numbers only!) + // Calculate as: + // ZV : FTM_RATIO / 2 + // ZVD, MZV : FTM_RATIO + // 2HEI : FTM_RATIO * 3 / 2 + // 3HEI : FTM_RATIO * 2 #endif /** diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 1b2f115cdfb7..224dd2a0aa2d 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -57,9 +57,9 @@ * 41 - Counter-Clockwise M4 * 50 - Clockwise M5 * 51 - Counter-Clockwise M5 - * - */ + **/ void GcodeSuite::G35() { + DEBUG_SECTION(log_G35, "G35", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) log_machine_info(); diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index d6d648c12560..acd920c7290d 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -225,6 +225,7 @@ class G29_State { * There's no extra effect if you have a fixed Z probe. */ G29_TYPE GcodeSuite::G29() { + DEBUG_SECTION(log_G29, "G29", DEBUGGING(LEVELING)); // Leveling state is persistent when done manually with multiple G29 commands diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index c5e02b91f9bd..b3f03d03ba43 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -64,6 +64,7 @@ inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" * S5 Reset and disable mesh */ void GcodeSuite::G29() { + DEBUG_SECTION(log_G29, "G29", true); // G29 Q is also available if debugging diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index f76df4316cd6..af2c6a5f6505 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -79,6 +79,7 @@ * R Flag to recalculate points based on current probe offsets */ void GcodeSuite::G34() { + DEBUG_SECTION(log_G34, "G34", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) log_machine_info(); diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index f6e6a1261d46..fd95a3b7baf8 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -26,6 +26,7 @@ #include "../../gcode.h" #include "../../../module/ft_motion.h" +#include "../../../module/stepper.h" void say_shaping() { // FT Enabled @@ -39,6 +40,8 @@ void say_shaping() { default: break; case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break; case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break; + case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break; + case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break; case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break; case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break; case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break; @@ -155,20 +158,19 @@ void GcodeSuite::M493() { if (!parser.seen_any()) flag.report_h = true; - else - planner.synchronize(); // Parse 'S' mode parameter. if (parser.seenval('S')) { - const ftMotionMode_t oldmm = ftMotion.cfg.mode, - newmm = (ftMotionMode_t)parser.value_byte(); + const ftMotionMode_t newmm = (ftMotionMode_t)parser.value_byte(); - if (newmm != oldmm) { + if (newmm != ftMotion.cfg.mode) { switch (newmm) { default: SERIAL_ECHOLNPGM("?Invalid control mode [S] value."); return; #if HAS_X_AXIS case ftMotionMode_ZV: case ftMotionMode_ZVD: + case ftMotionMode_ZVDD: + case ftMotionMode_ZVDDD: case ftMotionMode_EI: case ftMotionMode_2HEI: case ftMotionMode_3HEI: @@ -177,11 +179,10 @@ void GcodeSuite::M493() { //case ftMotionMode_DISCTF: flag.update_n = flag.update_a = true; #endif - case ftMotionMode_DISABLED: + case ftMotionMode_DISABLED: flag.reset_ft = true; case ftMotionMode_ENABLED: ftMotion.cfg.mode = newmm; flag.report_h = true; - if (oldmm == ftMotionMode_DISABLED) flag.reset_ft = true; break; } } @@ -193,6 +194,7 @@ void GcodeSuite::M493() { if (parser.seen('P')) { const bool val = parser.value_bool(); ftMotion.cfg.linearAdvEna = val; + flag.report_h = true; SERIAL_ECHO_TERNARY(val, "Linear Advance ", "en", "dis", "abled.\n"); } @@ -216,22 +218,16 @@ void GcodeSuite::M493() { if (ftMotion.cfg.modeHasShaper()) { const dynFreqMode_t val = dynFreqMode_t(parser.value_byte()); switch (val) { - case dynFreqMode_DISABLED: - ftMotion.cfg.dynFreqMode = val; - flag.report_h = true; - break; #if HAS_DYNAMIC_FREQ_MM case dynFreqMode_Z_BASED: - ftMotion.cfg.dynFreqMode = val; - flag.report_h = true; - break; #endif #if HAS_DYNAMIC_FREQ_G case dynFreqMode_MASS_BASED: - ftMotion.cfg.dynFreqMode = val; - flag.report_h = true; - break; #endif + case dynFreqMode_DISABLED: + ftMotion.cfg.dynFreqMode = val; + flag.report_h = true; + break; default: SERIAL_ECHOLNPGM("?Invalid Dynamic Frequency Mode [D] value."); break; @@ -279,6 +275,36 @@ void GcodeSuite::M493() { } #endif + // Parse zeta parameter (X axis). + if (parser.seenval('I')) { + const float val = parser.value_float(); + if (ftMotion.cfg.modeHasShaper()) { + if (WITHIN(val, 0.01f, 1.0f)) { + ftMotion.cfg.zeta[0] = val; + flag.update_n = flag.update_a = true; + } + else + SERIAL_ECHOLNPGM("Invalid X zeta [", AS_CHAR('I'), "] value."); // Zeta out of range. + } + else + SERIAL_ECHOLNPGM("Wrong mode for zeta parameter."); + } + + // Parse vtol parameter (X axis). + if (parser.seenval('Q')) { + const float val = parser.value_float(); + if (ftMotion.cfg.modeHasShaper() && IS_EI_MODE(ftMotion.cfg.mode)) { + if (WITHIN(val, 0.00f, 1.0f)) { + ftMotion.cfg.vtol[0] = val; + flag.update_a = true; + } + else + SERIAL_ECHOLNPGM("Invalid X vtol [", AS_CHAR('Q'), "] value."); // VTol out of range. + } + else + SERIAL_ECHOLNPGM("Wrong mode for vtol parameter."); + } + #endif // HAS_X_AXIS #if HAS_Y_AXIS @@ -310,15 +336,50 @@ void GcodeSuite::M493() { } #endif + // Parse zeta parameter (Y axis). + if (parser.seenval('J')) { + const float val = parser.value_float(); + if (ftMotion.cfg.modeHasShaper()) { + if (WITHIN(val, 0.01f, 1.0f)) { + ftMotion.cfg.zeta[1] = val; + flag.update_n = flag.update_a = true; + } + else + SERIAL_ECHOLNPGM("Invalid Y zeta [", AS_CHAR('J'), "] value."); // Zeta Out of range + } + else + SERIAL_ECHOLNPGM("Wrong mode for zeta parameter."); + } + + // Parse vtol parameter (Y axis). + if (parser.seenval('R')) { + const float val = parser.value_float(); + if (ftMotion.cfg.modeHasShaper() && IS_EI_MODE(ftMotion.cfg.mode)) { + if (WITHIN(val, 0.00f, 1.0f)) { + ftMotion.cfg.vtol[1] = val; + flag.update_a = true; + } + else + SERIAL_ECHOLNPGM("Invalid Y vtol [", AS_CHAR('R'), "] value."); // VTol out of range. + } + else + SERIAL_ECHOLNPGM("Wrong mode for vtol parameter."); + } + #endif // HAS_Y_AXIS - #if HAS_X_AXIS - if (flag.update_n) ftMotion.refreshShapingN(); - if (flag.update_a) ftMotion.updateShapingA(); - #endif - if (flag.reset_ft) ftMotion.reset(); - if (flag.report_h) say_shaping(); + planner.synchronize(); + if (flag.update_n) ftMotion.refreshShapingN(); + + if (flag.update_a) ftMotion.updateShapingA(); + + if (flag.reset_ft) { + stepper.ftMotion_syncPosition(); + ftMotion.reset(); + } + + if (flag.report_h) say_shaping(); } #endif // FT_MOTION diff --git a/Marlin/src/gcode/probe/G38.cpp b/Marlin/src/gcode/probe/G38.cpp index 5b138fdaf6dd..1f22cc84ed5c 100644 --- a/Marlin/src/gcode/probe/G38.cpp +++ b/Marlin/src/gcode/probe/G38.cpp @@ -105,6 +105,7 @@ inline bool G38_run_probe() { * G38.5 - Probe away from workpiece, stop on contact break */ void GcodeSuite::G38(const int8_t subcode) { + // Get X Y Z E F get_destination_from_command(); diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index f1caf52c7374..89a57f274d54 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1144,7 +1144,7 @@ #elif HAS_DRIVER(A4988) #define MINIMUM_STEPPER_POST_DIR_DELAY 200 #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE - #define MINIMUM_STEPPER_POST_DIR_DELAY 60 + #define MINIMUM_STEPPER_POST_DIR_DELAY 70 #else #define MINIMUM_STEPPER_POST_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire #endif diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 8c9dd08d07da..7945b26d5b72 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -802,6 +802,8 @@ namespace LanguageNarrow_en { LSTR MSG_FTM_MODE = _UxGT("Motion Mode:"); LSTR MSG_FTM_ZV = _UxGT("ZV"); LSTR MSG_FTM_ZVD = _UxGT("ZVD"); + LSTR MSG_FTM_ZVDD = _UxGT("ZVDD"); + LSTR MSG_FTM_ZVDDD = _UxGT("ZVDDD"); LSTR MSG_FTM_EI = _UxGT("EI"); LSTR MSG_FTM_2HEI = _UxGT("2HEI"); LSTR MSG_FTM_3HEI = _UxGT("3HEI"); @@ -813,8 +815,8 @@ namespace LanguageNarrow_en { LSTR MSG_FTM_MASS_BASED = _UxGT("Mass-based"); LSTR MSG_FTM_BASE_FREQ_N = _UxGT("@ Base Freq."); LSTR MSG_FTM_DFREQ_K_N = _UxGT("@ Dyn. Freq."); - LSTR MSG_FTM_ZETA = _UxGT("Damping"); - LSTR MSG_FTM_VTOL = _UxGT("Vib. Level"); + LSTR MSG_FTM_ZETA_N = _UxGT("@ Damping"); + LSTR MSG_FTM_VTOL_N = _UxGT("@ Vib. Level"); LSTR MSG_LEVEL_X_AXIS = _UxGT("Level X Axis"); LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrate"); diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 35adf1211f04..239d03d9777a 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -342,6 +342,8 @@ void menu_move() { #if HAS_X_AXIS if (mode != ftMotionMode_ZV) ACTION_ITEM(MSG_FTM_ZV, []{ ftm_menu_setShaping(ftMotionMode_ZV); }); if (mode != ftMotionMode_ZVD) ACTION_ITEM(MSG_FTM_ZVD, []{ ftm_menu_setShaping(ftMotionMode_ZVD); }); + if (mode != ftMotionMode_ZVDD) ACTION_ITEM(MSG_FTM_ZVDD, []{ ftm_menu_setShaping(ftMotionMode_ZVDD); }); + if (mode != ftMotionMode_ZVDDD) ACTION_ITEM(MSG_FTM_ZVDDD,[]{ ftm_menu_setShaping(ftMotionMode_ZVDDD); }); if (mode != ftMotionMode_EI) ACTION_ITEM(MSG_FTM_EI, []{ ftm_menu_setShaping(ftMotionMode_EI); }); if (mode != ftMotionMode_2HEI) ACTION_ITEM(MSG_FTM_2HEI, []{ ftm_menu_setShaping(ftMotionMode_2HEI); }); if (mode != ftMotionMode_3HEI) ACTION_ITEM(MSG_FTM_3HEI, []{ ftm_menu_setShaping(ftMotionMode_3HEI); }); @@ -384,6 +386,8 @@ void menu_move() { case ftMotionMode_ENABLED: ftmode = GET_TEXT_F(MSG_LCD_ON); break; case ftMotionMode_ZV: ftmode = GET_TEXT_F(MSG_FTM_ZV); break; case ftMotionMode_ZVD: ftmode = GET_TEXT_F(MSG_FTM_ZVD); break; + case ftMotionMode_ZVDD: ftmode = GET_TEXT_F(MSG_FTM_ZVDD); break; + case ftMotionMode_ZVDDD: ftmode = GET_TEXT_F(MSG_FTM_ZVDDD);break; case ftMotionMode_EI: ftmode = GET_TEXT_F(MSG_FTM_EI); break; case ftMotionMode_2HEI: ftmode = GET_TEXT_F(MSG_FTM_2HEI); break; case ftMotionMode_3HEI: ftmode = GET_TEXT_F(MSG_FTM_3HEI); break; @@ -416,10 +420,21 @@ void menu_move() { EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_FTM_BASE_FREQ_N, &c.baseFreq[Y_AXIS], FTM_MIN_SHAPE_FREQ, (FTM_FS) / 2, ftMotion.refreshShapingN); #endif - EDIT_ITEM_FAST(float42_52, MSG_FTM_ZETA, &c.zeta, 0.0f, 1.0f, ftMotion.refreshShapingN); + #if HAS_X_AXIS + EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_FTM_ZETA_N, &c.zeta[0], 0.0f, 1.0f, ftMotion.refreshShapingN); + #endif + #if HAS_Y_AXIS + EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_FTM_ZETA_N, &c.zeta[1], 0.0f, 1.0f, ftMotion.refreshShapingN); + #endif - if (WITHIN(c.mode, ftMotionMode_EI, ftMotionMode_3HEI)) - EDIT_ITEM_FAST(float42_52, MSG_FTM_VTOL, &c.vtol, 0.0f, 1.0f, ftMotion.refreshShapingN); + if (IS_EI_MODE(c.mode)) { + #if HAS_X_AXIS + EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_FTM_VTOL_N, &c.vtol[0], 0.0f, 1.0f, ftMotion.refreshShapingN); + #endif + #if HAS_Y_AXIS + EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_FTM_VTOL_N, &c.vtol[1], 0.0f, 1.0f, ftMotion.refreshShapingN); + #endif + } #if HAS_DYNAMIC_FREQ SUBMENU(MSG_FTM_DYN_MODE, menu_ftm_dyn_mode); @@ -437,7 +452,7 @@ void menu_move() { #if HAS_EXTRUDERS EDIT_ITEM(bool, MSG_LINEAR_ADVANCE, &c.linearAdvEna); - EDIT_ITEM(float42_52, MSG_ADVANCE_K, &c.linearAdvK, 0, 10); + if (c.linearAdvEna) EDIT_ITEM(float42_52, MSG_ADVANCE_K, &c.linearAdvK, 0, 10); #endif END_MENU(); diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index ad37e8a9b3da..a2049db3b63f 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -32,6 +32,8 @@ FTMotion ftMotion; #if !HAS_X_AXIS static_assert(FTM_DEFAULT_MODE == ftMotionMode_ZV, "ftMotionMode_ZV requires at least one linear axis."); static_assert(FTM_DEFAULT_MODE == ftMotionMode_ZVD, "ftMotionMode_ZVD requires at least one linear axis."); + static_assert(FTM_DEFAULT_MODE == ftMotionMode_ZVDD, "ftMotionMode_ZVD requires at least one linear axis."); + static_assert(FTM_DEFAULT_MODE == ftMotionMode_ZVDDD, "ftMotionMode_ZVD requires at least one linear axis."); static_assert(FTM_DEFAULT_MODE == ftMotionMode_EI, "ftMotionMode_EI requires at least one linear axis."); static_assert(FTM_DEFAULT_MODE == ftMotionMode_2HEI, "ftMotionMode_2HEI requires at least one linear axis."); static_assert(FTM_DEFAULT_MODE == ftMotionMode_3HEI, "ftMotionMode_3HEI requires at least one linear axis."); @@ -52,9 +54,7 @@ FTMotion ftMotion; ft_config_t FTMotion::cfg; bool FTMotion::busy; // = false -ft_command_t FTMotion::stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Buffer of stepper commands. -hal_timer_t FTMotion::stepperCmdBuff_StepRelativeTi[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Buffer of the stepper command timing. -uint8_t FTMotion::stepperCmdBuff_ApplyDir[FTM_STEPPERCMD_DIR_SIZE] = {0U}; // Buffer of whether DIR needs to be updated. +ft_command_t FTMotion::stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Stepper commands buffer. uint32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper command write to the buffer. FTMotion::stepperCmdBuff_consumeIdx = 0; // Index of next stepper command read from the buffer. @@ -62,10 +62,10 @@ bool FTMotion::sts_stepperBusy = false; // The stepper buffer has items // Private variables. // NOTE: These are sized for Ulendo FBS use. -xyze_trajectory_t FTMotion::traj; // = {0.0f} Storage for fixed-time-based trajectory. -xyze_trajectoryMod_t FTMotion::trajMod; // = {0.0f} Storage for modified fixed-time-based trajectory. + xyze_trajectory_t FTMotion::traj; // = {0.0f} Storage for fixed-time-based trajectory. + xyze_trajectoryMod_t FTMotion::trajMod; // = {0.0f} Storage for modified fixed-time-based trajectory. + xyze_trajectoryWin_t FTMotion::trajWin; // = {0.0f} Storage for fixed time trajectory window. -block_t* FTMotion::current_block_cpy = nullptr; // Pointer to current block being processed. bool FTMotion::blockProcRdy = false, // Indicates a block is ready to be processed. FTMotion::blockProcRdy_z1 = false, // Storage for the previous indicator. FTMotion::blockProcDn = false; // Indicates current block is done being processed. @@ -76,7 +76,7 @@ bool FTMotion::batchRdy = false; // Indicates a batch of the fixe bool FTMotion::batchRdyForInterp = false; // Indicates the batch is done being post processed, // if applicable, and is ready to be converted to step commands. bool FTMotion::runoutEna = false; // True if runout of the block hasn't been done and is allowed. -bool FTMotion::runout = false; // Indicates if runout is in progress. +bool FTMotion::blockDataIsRunout = false; // Indicates the last loaded block variables are for a runout. // Trapezoid data variables. xyze_pos_t FTMotion::startPosn, // (mm) Start position of block @@ -98,15 +98,13 @@ uint32_t FTMotion::max_intervals; // Total number of data points t // Make vector variables. uint32_t FTMotion::makeVector_idx = 0, // Index of fixed time trajectory generation of the overall block. FTMotion::makeVector_idx_z1 = 0, // Storage for the previously calculated index above. - FTMotion::makeVector_batchIdx = FTM_BATCH_SIZE; // Index of fixed time trajectory generation within the batch. + FTMotion::makeVector_batchIdx = 0; // Index of fixed time trajectory generation within the batch. // Interpolation variables. xyze_long_t FTMotion::steps = { 0 }; // Step count accumulator. -xyze_stepDir_t FTMotion::dirState = LOGICAL_AXIS_ARRAY_1(stepDirState_NOT_SET); // Memory of the currently set step direction of the axis. uint32_t FTMotion::interpIdx = 0, // Index of current data point being interpolated. FTMotion::interpIdx_z1 = 0; // Storage for the previously calculated index above. -hal_timer_t FTMotion::nextStepTicks = FTM_MIN_TICKS; // Accumulator for the next step time (in ticks). // Shaping variables. #if HAS_X_AXIS @@ -125,8 +123,6 @@ hal_timer_t FTMotion::nextStepTicks = FTM_MIN_TICKS; // Accumulator for the nex float FTMotion::e_advanced_z1 = 0.0f; // (ms) Unit delay of advanced extruder position. #endif -constexpr uint32_t last_batchIdx = (FTM_WINDOW_SIZE) - (FTM_BATCH_SIZE); - //-----------------------------------------------------------------// // Function definitions. //-----------------------------------------------------------------// @@ -134,8 +130,7 @@ constexpr uint32_t last_batchIdx = (FTM_WINDOW_SIZE) - (FTM_BATCH_SIZE); // Public functions. // Sets controller states to begin processing a block. -void FTMotion::startBlockProc(block_t * const current_block) { - current_block_cpy = current_block; +void FTMotion::startBlockProc() { blockProcRdy = true; blockProcDn = false; runoutEna = true; @@ -144,30 +139,16 @@ void FTMotion::startBlockProc(block_t * const current_block) { // Move any free data points to the stepper buffer even if a full batch isn't ready. void FTMotion::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 > last_batchIdx) - for (uint32_t i = makeVector_batchIdx; i < (FTM_WINDOW_SIZE); i++) { - LOGICAL_AXIS_CODE( - traj.e[i] = traj.e[makeVector_batchIdx - 1], - traj.x[i] = traj.x[makeVector_batchIdx - 1], - traj.y[i] = traj.y[makeVector_batchIdx - 1], - traj.z[i] = traj.z[makeVector_batchIdx - 1], - traj.i[i] = traj.i[makeVector_batchIdx - 1], - traj.j[i] = traj.j[makeVector_batchIdx - 1], - traj.k[i] = traj.k[makeVector_batchIdx - 1], - traj.u[i] = traj.u[makeVector_batchIdx - 1], - traj.v[i] = traj.v[makeVector_batchIdx - 1], - traj.w[i] = traj.w[makeVector_batchIdx - 1] - ); - } + if (!runoutEna) return; - makeVector_batchIdx = last_batchIdx; - batchRdy = true; - runout = true; - } - runoutEna = false; + startPosn = endPosn_prevBlock; + ratio.reset(); + + max_intervals = cfg.modeHasShaper() ? shaper_intervals : 0; + if (max_intervals <= TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, min_max_intervals - (FTM_BATCH_SIZE))) max_intervals = min_max_intervals; + max_intervals += TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_WINDOW_SIZE) - makeVector_batchIdx; + blockProcRdy = blockDataIsRunout = true; + runoutEna = blockProcDn = false; } // Controller main, to be invoked from non-isr task. @@ -184,81 +165,63 @@ void FTMotion::loop() { 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 && !runout) stepper.ftMotion_BlockQueueUpdate(); + if (!blockProcRdy) stepper.ftMotion_blockQueueUpdate(); if (blockProcRdy) { - if (!blockProcRdy_z1) loadBlockData(current_block_cpy); // One-shot. + if (!blockProcRdy_z1) { // One-shot. + if (!blockDataIsRunout) loadBlockData(stepper.current_block); + else blockDataIsRunout = false; + } while (!blockProcDn && !batchRdy && (makeVector_idx - makeVector_idx_z1 < (FTM_POINTS_PER_LOOP))) makeVector(); } - if (runout && !batchRdy) { // The lower half of the window has been runout. - // Runout the upper half of the window: the upper half has been shifted into the lower - // half. Fill out the upper half so another batch can be processed. - for (uint32_t i = last_batchIdx; i < (FTM_WINDOW_SIZE) - 1; i++) { - LOGICAL_AXIS_CODE( - traj.e[i] = traj.e[(FTM_WINDOW_SIZE) - 1], - traj.x[i] = traj.x[(FTM_WINDOW_SIZE) - 1], - traj.y[i] = traj.y[(FTM_WINDOW_SIZE) - 1], - traj.z[i] = traj.z[(FTM_WINDOW_SIZE) - 1], - traj.i[i] = traj.i[(FTM_WINDOW_SIZE) - 1], - traj.j[i] = traj.j[(FTM_WINDOW_SIZE) - 1], - traj.k[i] = traj.k[(FTM_WINDOW_SIZE) - 1], - traj.u[i] = traj.u[(FTM_WINDOW_SIZE) - 1], - traj.v[i] = traj.v[(FTM_WINDOW_SIZE) - 1], - traj.w[i] = traj.w[(FTM_WINDOW_SIZE) - 1] - ); - } - batchRdy = true; - runout = false; - } - // FBS / post processing. if (batchRdy && !batchRdyForInterp) { // Call Ulendo FBS here. - // Copy the uncompensated vectors. (XY done, other axes uncompensated) - LOGICAL_AXIS_CODE( - memcpy(trajMod.e, &traj.e[FTM_BATCH_SIZE], sizeof(trajMod.e)), - memcpy(trajMod.x, &traj.x[FTM_BATCH_SIZE], sizeof(trajMod.x)), - memcpy(trajMod.y, &traj.y[FTM_BATCH_SIZE], sizeof(trajMod.y)), - memcpy(trajMod.z, &traj.z[FTM_BATCH_SIZE], sizeof(trajMod.z)), - memcpy(trajMod.i, &traj.i[FTM_BATCH_SIZE], sizeof(trajMod.i)), - memcpy(trajMod.j, &traj.j[FTM_BATCH_SIZE], sizeof(trajMod.j)), - memcpy(trajMod.k, &traj.k[FTM_BATCH_SIZE], sizeof(trajMod.k)), - memcpy(trajMod.u, &traj.u[FTM_BATCH_SIZE], sizeof(trajMod.u)), - memcpy(trajMod.v, &traj.v[FTM_BATCH_SIZE], sizeof(trajMod.v)), - memcpy(trajMod.w, &traj.w[FTM_BATCH_SIZE], sizeof(trajMod.w)) - ); - - // Shift the time series back in the window for (shaped) X and Y - TERN_(HAS_X_AXIS, memcpy(traj.x, &traj.x[FTM_BATCH_SIZE], sizeof(traj.x) / 2)); - TERN_(HAS_Y_AXIS, memcpy(traj.y, &traj.y[FTM_BATCH_SIZE], sizeof(traj.y) / 2)); + #if ENABLED(FTM_UNIFIED_BWS) + trajMod = traj; // Copy the uncompensated vectors. + traj = trajWin; // Move the window to traj + #else + // Copy the uncompensated vectors. + #define TCOPY(A) memcpy(trajMod.A, traj.A, sizeof(trajMod.A)) + LOGICAL_AXIS_CODE( + TCOPY(e), + TCOPY(x), TCOPY(y), TCOPY(z), + TCOPY(i), TCOPY(j), TCOPY(k), + TCOPY(u), TCOPY(v), TCOPY(w) + ); - // Z...W and E Disabled! Uncompensated so the lower half is not used. - //TERN_(HAS_Z_AXIS, memcpy(&traj.z[0], &traj.z[FTM_BATCH_SIZE], sizeof(traj.z) / 2)); + // Shift the time series back in the window + #define TSHIFT(A) memcpy(traj.A, trajWin.A, sizeof(trajWin.A)) + LOGICAL_AXIS_CODE( + TSHIFT(e), + TSHIFT(x), TSHIFT(y), TSHIFT(z), + TSHIFT(i), TSHIFT(j), TSHIFT(k), + TSHIFT(u), TSHIFT(v), TSHIFT(w) + ); + #endif // ... data is ready in trajMod. batchRdyForInterp = true; - batchRdy = false; // Clear so that makeVector() may resume generating points. - - } // if (batchRdy && !batchRdyForInterp) + batchRdy = false; // Clear so makeVector() can resume generating points. + } // Interpolation. while ( batchRdyForInterp - && ( stepperCmdBuffItems() < ((FTM_STEPPERCMD_BUFF_SIZE) - (FTM_STEPS_PER_UNIT_TIME)) ) - && ( (interpIdx - interpIdx_z1) < (FTM_STEPS_PER_LOOP) ) + && ( stepperCmdBuffItems() < (FTM_STEPPERCMD_BUFF_SIZE) - (FTM_STEPS_PER_UNIT_TIME) ) + && ( interpIdx - interpIdx_z1 < (FTM_STEPS_PER_LOOP) ) ) { convertToSteps(interpIdx); - if (++interpIdx == FTM_BATCH_SIZE) { + if (++interpIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE)) { batchRdyForInterp = false; interpIdx = 0; } @@ -277,76 +240,153 @@ void FTMotion::loop() { // Refresh the gains used by shaping functions. // To be called on init or mode or zeta change. - void FTMotion::Shaping::updateShapingA(const_float_t zeta/*=cfg.zeta*/, const_float_t vtol/*=cfg.vtol*/) { + void FTMotion::Shaping::updateShapingA(float zeta[]/*=cfg.zeta*/, float vtol[]/*=cfg.vtol*/) { - const float K = exp(-zeta * M_PI / sqrt(1.0f - sq(zeta))), - K2 = sq(K); + const float Kx = exp(-zeta[0] * M_PI / sqrt(1.0f - sq(zeta[0]))), + Ky = exp(-zeta[1] * M_PI / sqrt(1.0f - sq(zeta[1]))), + Kx2 = sq(Kx), + Ky2 = sq(Ky); switch (cfg.mode) { case ftMotionMode_ZV: max_i = 1U; - x.Ai[0] = 1.0f / (1.0f + K); - x.Ai[1] = x.Ai[0] * K; + x.Ai[0] = 1.0f / (1.0f + Kx); + x.Ai[1] = x.Ai[0] * Kx; + + y.Ai[0] = 1.0f / (1.0f + Ky); + y.Ai[1] = y.Ai[0] * Ky; break; case ftMotionMode_ZVD: 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; + x.Ai[0] = 1.0f / (1.0f + 2.0f * Kx + Kx2); + x.Ai[1] = x.Ai[0] * 2.0f * Kx; + x.Ai[2] = x.Ai[0] * Kx2; + + y.Ai[0] = 1.0f / (1.0f + 2.0f * Ky + Ky2); + y.Ai[1] = y.Ai[0] * 2.0f * Ky; + y.Ai[2] = y.Ai[0] * Ky2; + break; + + case ftMotionMode_ZVDD: + max_i = 3U; + x.Ai[0] = 1.0f / (1.0f + 3.0f * Kx + 3.0f * Kx2 + cu(Kx)); + x.Ai[1] = x.Ai[0] * 3.0f * Kx; + x.Ai[2] = x.Ai[0] * 3.0f * Kx2; + x.Ai[3] = x.Ai[0] * cu(Kx); + + y.Ai[0] = 1.0f / (1.0f + 3.0f * Ky + 3.0f * Ky2 + cu(Ky)); + y.Ai[1] = y.Ai[0] * 3.0f * Ky; + y.Ai[2] = y.Ai[0] * 3.0f * Ky2; + y.Ai[3] = y.Ai[0] * cu(Ky); + break; + + case ftMotionMode_ZVDDD: + max_i = 4U; + x.Ai[0] = 1.0f / (1.0f + 4.0f * Kx + 6.0f * Kx2 + 4.0f * cu(Kx) + sq(Kx2)); + x.Ai[1] = x.Ai[0] * 4.0f * Kx; + x.Ai[2] = x.Ai[0] * 6.0f * Kx2; + x.Ai[3] = x.Ai[0] * 4.0f * cu(Kx); + x.Ai[4] = x.Ai[0] * sq(Kx2); + + y.Ai[0] = 1.0f / (1.0f + 4.0f * Ky + 6.0f * Ky2 + 4.0f * cu(Ky) + sq(Ky2)); + y.Ai[1] = y.Ai[0] * 4.0f * Ky; + y.Ai[2] = y.Ai[0] * 6.0f * Ky2; + y.Ai[3] = y.Ai[0] * 4.0f * cu(Ky); + y.Ai[4] = y.Ai[0] * sq(Ky2); break; case ftMotionMode_EI: { 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; + x.Ai[0] = 0.25f * (1.0f + vtol[0]); + x.Ai[1] = 0.50f * (1.0f - vtol[0]) * Kx; + x.Ai[2] = x.Ai[0] * Kx2; + + y.Ai[0] = 0.25f * (1.0f + vtol[1]); + y.Ai[1] = 0.50f * (1.0f - vtol[1]) * Ky; + y.Ai[2] = y.Ai[0] * Ky2; + + const float X_adj = 1.0f / (x.Ai[0] + x.Ai[1] + x.Ai[2]); + const float Y_adj = 1.0f / (y.Ai[0] + y.Ai[1] + y.Ai[2]); + for (uint32_t i = 0U; i < 3U; i++) { + x.Ai[i] *= X_adj; + y.Ai[i] *= Y_adj; + } + } + break; case ftMotionMode_2HEI: { 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; + const float vtolx2 = sq(vtol[0]); + const float X = pow(vtolx2 * (sqrt(1.0f - vtolx2) + 1.0f), 1.0f / 3.0f); + x.Ai[0] = (3.0f * sq(X) + 2.0f * X + 3.0f * vtolx2) / (16.0f * X); + x.Ai[1] = (0.5f - x.Ai[0]) * Kx; + x.Ai[2] = x.Ai[1] * Kx; + x.Ai[3] = x.Ai[0] * cu(Kx); + + const float vtoly2 = sq(vtol[1]); + const float Y = pow(vtoly2 * (sqrt(1.0f - vtoly2) + 1.0f), 1.0f / 3.0f); + y.Ai[0] = (3.0f * sq(Y) + 2.0f * Y + 3.0f * vtoly2) / (16.0f * Y); + y.Ai[1] = (0.5f - y.Ai[0]) * Ky; + y.Ai[2] = y.Ai[1] * Ky; + y.Ai[3] = y.Ai[0] * cu(Ky); + + const float X_adj = 1.0f / (x.Ai[0] + x.Ai[1] + x.Ai[2] + x.Ai[3]); + const float Y_adj = 1.0f / (y.Ai[0] + y.Ai[1] + y.Ai[2] + y.Ai[3]); + for (uint32_t i = 0U; i < 4U; i++) { + x.Ai[i] *= X_adj; + y.Ai[i] *= Y_adj; + } + } + break; case ftMotionMode_3HEI: { 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; + x.Ai[0] = 0.0625f * ( 1.0f + 3.0f * vtol[0] + 2.0f * sqrt( 2.0f * ( vtol[0] + 1.0f ) * vtol[0] ) ); + x.Ai[1] = 0.25f * ( 1.0f - vtol[0] ) * Kx; + x.Ai[2] = ( 0.5f * ( 1.0f + vtol[0] ) - 2.0f * x.Ai[0] ) * Kx2; + x.Ai[3] = x.Ai[1] * Kx2; + x.Ai[4] = x.Ai[0] * sq(Kx2); + + y.Ai[0] = 0.0625f * (1.0f + 3.0f * vtol[1] + 2.0f * sqrt(2.0f * (vtol[1] + 1.0f) * vtol[1])); + y.Ai[1] = 0.25f * (1.0f - vtol[1]) * Ky; + y.Ai[2] = (0.5f * (1.0f + vtol[1]) - 2.0f * y.Ai[0]) * Ky2; + y.Ai[3] = y.Ai[1] * Ky2; + y.Ai[4] = y.Ai[0] * sq(Ky2); + + const float X_adj = 1.0f / (x.Ai[0] + x.Ai[1] + x.Ai[2] + x.Ai[3] + x.Ai[4]); + const float Y_adj = 1.0f / (y.Ai[0] + y.Ai[1] + y.Ai[2] + y.Ai[3] + y.Ai[4]); + for (uint32_t i = 0U; i < 5U; i++) { + x.Ai[i] *= X_adj; + y.Ai[i] *= Y_adj; + } + } + break; case ftMotionMode_MZV: { 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; + const float Bx = 1.4142135623730950488016887242097f * Kx; + x.Ai[0] = 1.0f / (1.0f + Bx + Kx2); + x.Ai[1] = x.Ai[0] * Bx; + x.Ai[2] = x.Ai[0] * Kx2; + + const float By = 1.4142135623730950488016887242097f * Ky; + y.Ai[0] = 1.0f / (1.0f + By + Ky2); + y.Ai[1] = y.Ai[0] * By; + y.Ai[2] = y.Ai[0] * Ky2; + } + break; default: - for (uint32_t i = 0U; i < 5U; i++) x.Ai[i] = 0.0f; + ZERO(x.Ai); + ZERO(y.Ai); 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 + } - void FTMotion::updateShapingA(const_float_t zeta/*=cfg.zeta*/, const_float_t vtol/*=cfg.vtol*/) { + void FTMotion::updateShapingA(float zeta[]/*=cfg.zeta*/, float vtol[]/*=cfg.vtol*/) { shaping.updateShapingA(zeta, vtol); } @@ -364,11 +404,13 @@ void FTMotion::loop() { Ni[1] = round((0.5f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; break; + case ftMotionMode_ZVDD: case ftMotionMode_2HEI: Ni[1] = round((0.5f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; Ni[3] = Ni[2] + Ni[1]; break; + case ftMotionMode_ZVDDD: case ftMotionMode_3HEI: Ni[1] = round((0.5f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; @@ -383,10 +425,14 @@ void FTMotion::loop() { } } - void FTMotion::updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), const_float_t zeta/*=cfg.zeta*/) { - const float df = sqrt(1.0f - sq(zeta)); - shaping.x.updateShapingN(xf, df); - TERN_(HAS_Y_AXIS, shaping.y.updateShapingN(yf, df)); + void FTMotion::updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), float zeta[]/*=cfg.zeta*/) { + const float xdf = sqrt(1.0f - sq(zeta[0])); + shaping.x.updateShapingN(xf, xdf); + + #if HAS_Y_AXIS + const float ydf = sqrt(1.0f - sq(zeta[1])); + shaping.y.updateShapingN(yf, ydf); + #endif } #endif // HAS_X_AXIS @@ -396,27 +442,24 @@ void FTMotion::reset() { stepperCmdBuff_produceIdx = stepperCmdBuff_consumeIdx = 0; - traj.reset(); // Reset trajectory history - trajMod.reset(); // Reset modified trajectory history + traj.reset(); + trajWin.reset(); blockProcRdy = blockProcRdy_z1 = blockProcDn = false; batchRdy = batchRdyForInterp = false; runoutEna = false; - runout = false; endPosn_prevBlock.reset(); makeVector_idx = makeVector_idx_z1 = 0; - makeVector_batchIdx = FTM_BATCH_SIZE; + makeVector_batchIdx = 0; steps.reset(); interpIdx = interpIdx_z1 = 0; - dirState = LOGICAL_AXIS_ARRAY_1(stepDirState_NOT_SET); - nextStepTicks = FTM_MIN_TICKS; #if HAS_X_AXIS - for (uint32_t i = 0U; i < (FTM_ZMAX); i++) - shaping.x.d_zi[i] = TERN_(HAS_Y_AXIS, shaping.y.d_zi[i] =) 0.0f; + ZERO(shaping.x.d_zi); + TERN_(HAS_Y_AXIS, ZERO(shaping.y.d_zi)); shaping.zi_idx = 0; #endif @@ -445,40 +488,26 @@ void FTMotion::loadBlockData(block_t * const current_block) { const float totalLength = current_block->millimeters, oneOverLength = 1.0f / totalLength; - const AxisBits direction = current_block->direction_bits; - startPosn = endPosn_prevBlock; xyze_pos_t moveDist = LOGICAL_AXIS_ARRAY( - current_block->steps.e / planner.settings.axis_steps_per_mm[E_AXIS_N(current_block->extruder)], - current_block->steps.x / planner.settings.axis_steps_per_mm[X_AXIS], - current_block->steps.y / planner.settings.axis_steps_per_mm[Y_AXIS], - current_block->steps.z / planner.settings.axis_steps_per_mm[Z_AXIS], - current_block->steps.i / planner.settings.axis_steps_per_mm[I_AXIS], - current_block->steps.j / planner.settings.axis_steps_per_mm[J_AXIS], - current_block->steps.k / planner.settings.axis_steps_per_mm[K_AXIS], - current_block->steps.u / planner.settings.axis_steps_per_mm[U_AXIS], - current_block->steps.v / planner.settings.axis_steps_per_mm[V_AXIS], - current_block->steps.w / planner.settings.axis_steps_per_mm[W_AXIS] - ); - - LOGICAL_AXIS_CODE( - if (!direction.e) moveDist.e *= -1.0f, - if (!direction.x) moveDist.x *= -1.0f, - if (!direction.y) moveDist.y *= -1.0f, - if (!direction.z) moveDist.z *= -1.0f, - if (!direction.i) moveDist.i *= -1.0f, - if (!direction.j) moveDist.j *= -1.0f, - if (!direction.k) moveDist.k *= -1.0f, - if (!direction.u) moveDist.u *= -1.0f, - if (!direction.v) moveDist.v *= -1.0f, - if (!direction.w) moveDist.w *= -1.0f + current_block->steps.e * planner.mm_per_step[E_AXIS_N(current_block->extruder)] * (current_block->direction_bits.e ? 1 : -1), + current_block->steps.x * planner.mm_per_step[X_AXIS] * (current_block->direction_bits.x ? 1 : -1), + current_block->steps.y * planner.mm_per_step[Y_AXIS] * (current_block->direction_bits.y ? 1 : -1), + current_block->steps.z * planner.mm_per_step[Z_AXIS] * (current_block->direction_bits.z ? 1 : -1), + current_block->steps.i * planner.mm_per_step[I_AXIS] * (current_block->direction_bits.i ? 1 : -1), + current_block->steps.j * planner.mm_per_step[J_AXIS] * (current_block->direction_bits.j ? 1 : -1), + current_block->steps.k * planner.mm_per_step[K_AXIS] * (current_block->direction_bits.k ? 1 : -1), + current_block->steps.u * planner.mm_per_step[U_AXIS] * (current_block->direction_bits.u ? 1 : -1), + current_block->steps.v * planner.mm_per_step[V_AXIS] * (current_block->direction_bits.v ? 1 : -1), + current_block->steps.w * planner.mm_per_step[W_AXIS] * (current_block->direction_bits.w ? 1 : -1) ); ratio = moveDist * oneOverLength; + /* Keep for comprehension 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 + f_s = spm * current_block->initial_rate, // (steps/s) Start feedrate + 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 @@ -499,25 +528,46 @@ void FTMotion::loadBlockData(block_t * const current_block) { 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 + */ + + const float spm = totalLength / current_block->step_event_count, + f_s = spm * current_block->initial_rate, + f_e = spm * current_block->final_rate; + + const float accel = current_block->acceleration, + oneOverAccel = 1.0f / accel; + + float F_n = current_block->nominal_speed; + const float ldiff = totalLength + 0.5f * oneOverAccel * (sq(f_s) + sq(f_e)); + + float T2 = ldiff / F_n - oneOverAccel * F_n; + if (T2 < 0.0f) { + T2 = 0.0f; + F_n = SQRT(ldiff * accel); + } - 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 - // + const float T1 = (F_n - f_s) * oneOverAccel, + T3 = (F_n - f_e) * oneOverAccel; + + 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 : (mm/s) Starting feedrate + * f_e : (mm/s) Ending feedrate + * T1_P : (sec) Time spent accelerating + * T2_P : (sec) Time spent coasting + * T3_P : (sec) Time spent decelerating + * f_s * T1_P : (mm) Distance traveled during the accel phase + * f_e * T3_P : (mm) 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 @@ -531,77 +581,69 @@ void FTMotion::loadBlockData(block_t * const current_block) { // 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; + // Accel + Coasting + Decel datapoints + max_intervals = N1 + N2 + N3; endPosn_prevBlock += moveDist; } // Generate data points of the trajectory. void FTMotion::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 + 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 + dist = (f_s * tau) + (0.5f * accel_P * sq(tau)); // (mm) Distance traveled for acceleration phase since start of block + accel_k = accel_P; // (mm/s^2) Acceleration K factor from Accel phase } - else if (makeVector_idx >= N1 && makeVector_idx < (N1 + N2)) { + else if (makeVector_idx < (N1 + N2)) { // Coasting phase - dist = s_1e + F_P * (tau - N1 * (FTM_TS)); // (mm) Distance traveled for coasting phase + dist = s_1e + F_P * (tau - N1 * (FTM_TS)); // (mm) Distance traveled for coasting phase since start of block //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 + 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 since start of block + accel_k = decel_P; // (mm/s^2) Acceleration K factor from Decel phase } - NUM_AXIS_CODE( - traj.x[makeVector_batchIdx] = startPosn.x + ratio.x * dist, - traj.y[makeVector_batchIdx] = startPosn.y + ratio.y * dist, - traj.z[makeVector_batchIdx] = startPosn.z + ratio.z * dist, - traj.i[makeVector_batchIdx] = startPosn.i + ratio.i * dist, - traj.j[makeVector_batchIdx] = startPosn.j + ratio.j * dist, - traj.k[makeVector_batchIdx] = startPosn.k + ratio.k * dist, - traj.u[makeVector_batchIdx] = startPosn.u + ratio.u * dist, - traj.v[makeVector_batchIdx] = startPosn.v + ratio.v * dist, - traj.w[makeVector_batchIdx] = startPosn.w + ratio.w * dist + LOGICAL_AXIS_CODE( + trajWin.e[makeVector_batchIdx] = startPosn.e + ratio.e * dist, + trajWin.x[makeVector_batchIdx] = startPosn.x + ratio.x * dist, + trajWin.y[makeVector_batchIdx] = startPosn.y + ratio.y * dist, + trajWin.z[makeVector_batchIdx] = startPosn.z + ratio.z * dist, + trajWin.i[makeVector_batchIdx] = startPosn.i + ratio.i * dist, + trajWin.j[makeVector_batchIdx] = startPosn.j + ratio.j * dist, + trajWin.k[makeVector_batchIdx] = startPosn.k + ratio.k * dist, + trajWin.u[makeVector_batchIdx] = startPosn.u + ratio.u * dist, + trajWin.v[makeVector_batchIdx] = startPosn.v + ratio.v * dist, + trajWin.w[makeVector_batchIdx] = startPosn.w + ratio.w * dist ); #if HAS_EXTRUDERS - const float new_raw_z1 = startPosn.e + ratio.e * dist; if (cfg.linearAdvEna) { - float dedt_adj = (new_raw_z1 - e_raw_z1) * (FTM_FS); + float dedt_adj = (trajWin.e[makeVector_batchIdx] - e_raw_z1) * (FTM_FS); if (ratio.e > 0.0f) dedt_adj += accel_k * cfg.linearAdvK; + e_raw_z1 = trajWin.e[makeVector_batchIdx]; e_advanced_z1 += dedt_adj * (FTM_TS); - traj.e[makeVector_batchIdx] = e_advanced_z1; - - e_raw_z1 = new_raw_z1; - } - else { - traj.e[makeVector_batchIdx] = new_raw_z1; - // Alternatively: ed[makeVector_batchIdx] = startPosn.e + (ratio.e * dist) / (N1 + N2 + N3); + trajWin.e[makeVector_batchIdx] = e_advanced_z1; } #endif // Update shaping parameters if needed. - #if HAS_DYNAMIC_FREQ_MM - static float zd_z1 = 0.0f; - #endif + switch (cfg.dynFreqMode) { #if HAS_DYNAMIC_FREQ_MM case dynFreqMode_Z_BASED: - if (traj.z[makeVector_batchIdx] != zd_z1) { // Only update if Z changed. - const float xf = cfg.baseFreq[X_AXIS] + cfg.dynFreqK[X_AXIS] * traj.z[makeVector_batchIdx], - yf = cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * traj.z[makeVector_batchIdx]; - updateShapingN(_MAX(xf, FTM_MIN_SHAPE_FREQ), _MAX(yf, FTM_MIN_SHAPE_FREQ)); - zd_z1 = traj.z[makeVector_batchIdx]; + if (trajWin.z[makeVector_batchIdx] != 0.0f) { // Only update if Z changed. + const float xf = cfg.baseFreq[X_AXIS] + cfg.dynFreqK[X_AXIS] * trajWin.z[makeVector_batchIdx] + OPTARG(HAS_Y_AXIS, yf = cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * trajWin.z[makeVector_batchIdx]); + updateShapingN(_MAX(xf, FTM_MIN_SHAPE_FREQ) OPTARG(HAS_Y_AXIS, _MAX(yf, FTM_MIN_SHAPE_FREQ))); } break; #endif @@ -610,8 +652,8 @@ void FTMotion::makeVector() { 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[X_AXIS] + cfg.dynFreqK[X_AXIS] * traj.e[makeVector_batchIdx] - OPTARG(HAS_Y_AXIS, cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * traj.e[makeVector_batchIdx]) ); + updateShapingN( cfg.baseFreq[X_AXIS] + cfg.dynFreqK[X_AXIS] * trajWin.e[makeVector_batchIdx] + OPTARG(HAS_Y_AXIS, cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * trajWin.e[makeVector_batchIdx]) ); break; #endif @@ -621,18 +663,18 @@ void FTMotion::makeVector() { // Apply shaping if in mode. #if HAS_X_AXIS if (cfg.modeHasShaper()) { - shaping.x.d_zi[shaping.zi_idx] = traj.x[makeVector_batchIdx]; - traj.x[makeVector_batchIdx] *= shaping.x.Ai[0]; + shaping.x.d_zi[shaping.zi_idx] = trajWin.x[makeVector_batchIdx]; + trajWin.x[makeVector_batchIdx] *= shaping.x.Ai[0]; #if HAS_Y_AXIS - shaping.y.d_zi[shaping.zi_idx] = traj.y[makeVector_batchIdx]; - traj.y[makeVector_batchIdx] *= shaping.y.Ai[0]; + shaping.y.d_zi[shaping.zi_idx] = trajWin.y[makeVector_batchIdx]; + trajWin.y[makeVector_batchIdx] *= shaping.y.Ai[0]; #endif for (uint32_t i = 1U; i <= shaping.max_i; i++) { const uint32_t udiffx = shaping.zi_idx - shaping.x.Ni[i]; - traj.x[makeVector_batchIdx] += shaping.x.Ai[i] * shaping.x.d_zi[shaping.x.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffx : udiffx]; + trajWin.x[makeVector_batchIdx] += shaping.x.Ai[i] * shaping.x.d_zi[shaping.x.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffx : udiffx]; #if HAS_Y_AXIS const uint32_t udiffy = shaping.zi_idx - shaping.y.Ni[i]; - traj.y[makeVector_batchIdx] += shaping.y.Ai[i] * shaping.y.d_zi[shaping.y.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffy : udiffy]; + trajWin.y[makeVector_batchIdx] += shaping.y.Ai[i] * shaping.y.d_zi[shaping.y.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffy : udiffy]; #endif } if (++shaping.zi_idx == (FTM_ZMAX)) shaping.zi_idx = 0; @@ -640,18 +682,38 @@ void FTMotion::makeVector() { #endif // Filled up the queue with regular and shaped steps - if (++makeVector_batchIdx == (FTM_WINDOW_SIZE)) { - makeVector_batchIdx = last_batchIdx; + if (++makeVector_batchIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, (FTM_WINDOW_SIZE - FTM_BATCH_SIZE))) { + makeVector_batchIdx = 0; batchRdy = true; } - if (makeVector_idx == max_intervals) { + if (++makeVector_idx == max_intervals) { blockProcDn = true; blockProcRdy = false; makeVector_idx = 0; } - else - makeVector_idx++; +} + +/** + * Convert to steps + * - Commands are written in a bitmask with step and dir as single bits. + * - Tests for delta are moved outside the loop. + * - Two functions are used for command computation with an array of function pointers. + */ +static void (*command_set[NUM_AXES TERN0(HAS_EXTRUDERS, +1)])(int32_t&, int32_t&, ft_command_t&, int32_t, int32_t); + +static void command_set_pos(int32_t &e, int32_t &s, ft_command_t &b, int32_t bd, int32_t bs) { + if (e < FTM_CTS_COMPARE_VAL) return; + s++; + b |= bd | bs; + e -= FTM_STEPS_PER_UNIT_TIME; +} + +static void command_set_neg(int32_t &e, int32_t &s, ft_command_t &b, int32_t bd, int32_t bs) { + if (e > -(FTM_CTS_COMPARE_VAL)) return; + s--; + b |= bs; + e += FTM_STEPS_PER_UNIT_TIME; } // Interpolates single data point to stepper commands. @@ -660,154 +722,61 @@ void FTMotion::convertToSteps(const uint32_t idx) { //#define STEPS_ROUNDING #if ENABLED(STEPS_ROUNDING) - const xyze_float_t steps_tar = LOGICAL_AXIS_ARRAY( - trajMod.e[idx] * planner.settings.axis_steps_per_mm[E_AXIS_N(current_block->extruder)] + (trajMod.e[idx] < 0.0f ? -0.5f : 0.5f), // May be eliminated if guaranteed positive. - trajMod.x[idx] * planner.settings.axis_steps_per_mm[X_AXIS] + (trajMod.x[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.y[idx] * planner.settings.axis_steps_per_mm[Y_AXIS] + (trajMod.y[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.z[idx] * planner.settings.axis_steps_per_mm[Z_AXIS] + (trajMod.z[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.i[idx] * planner.settings.axis_steps_per_mm[I_AXIS] + (trajMod.i[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.j[idx] * planner.settings.axis_steps_per_mm[J_AXIS] + (trajMod.j[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.k[idx] * planner.settings.axis_steps_per_mm[K_AXIS] + (trajMod.k[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.u[idx] * planner.settings.axis_steps_per_mm[U_AXIS] + (trajMod.u[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.v[idx] * planner.settings.axis_steps_per_mm[V_AXIS] + (trajMod.v[idx] < 0.0f ? -0.5f : 0.5f), - trajMod.w[idx] * planner.settings.axis_steps_per_mm[W_AXIS] + (trajMod.w[idx] < 0.0f ? -0.5f : 0.5f), + #define TOSTEPS(A,B) int32_t(trajMod.A[idx] * planner.settings.axis_steps_per_mm[B] + (trajMod.A[idx] < 0.0f ? -0.5f : 0.5f)) + const xyze_long_t steps_tar = LOGICAL_AXIS_ARRAY( + TOSTEPS(e, E_AXIS_N(current_block->extruder)), // May be eliminated if guaranteed positive. + TOSTEPS(x, X_AXIS), TOSTEPS(y, Y_AXIS), TOSTEPS(z, Z_AXIS), + TOSTEPS(i, I_AXIS), TOSTEPS(j, J_AXIS), TOSTEPS(k, K_AXIS), + TOSTEPS(u, U_AXIS), TOSTEPS(v, V_AXIS), TOSTEPS(w, W_AXIS) ); - xyze_long_t delta = xyze_long_t(steps_tar) - steps; - //const xyze_long_t delta = LOGICAL_AXIS_ARRAY( - // int32_t(steps_tar.e) - steps.e, - // int32_t(steps_tar.x) - steps.x, - // int32_t(steps_tar.y) - steps.y, - // int32_t(steps_tar.z) - steps.z, - // int32_t(steps_tar.i) - steps.i, - // int32_t(steps_tar.j) - steps.j, - // int32_t(steps_tar.k) - steps.k, - // int32_t(steps_tar.u) - steps.u, - // int32_t(steps_tar.v) - steps.v, - // int32_t(steps_tar.w) - steps.w - //); + xyze_long_t delta = steps_tar - steps; #else + #define TOSTEPS(A,B) int32_t(trajMod.A[idx] * planner.settings.axis_steps_per_mm[B]) - steps.A xyze_long_t delta = LOGICAL_AXIS_ARRAY( - int32_t(trajMod.e[idx] * planner.settings.axis_steps_per_mm[E_AXIS_N(current_block->extruder)]) - steps.e, - int32_t(trajMod.x[idx] * planner.settings.axis_steps_per_mm[X_AXIS]) - steps.x, - int32_t(trajMod.y[idx] * planner.settings.axis_steps_per_mm[Y_AXIS]) - steps.y, - int32_t(trajMod.z[idx] * planner.settings.axis_steps_per_mm[Z_AXIS]) - steps.z, - int32_t(trajMod.i[idx] * planner.settings.axis_steps_per_mm[I_AXIS]) - steps.i, - int32_t(trajMod.j[idx] * planner.settings.axis_steps_per_mm[J_AXIS]) - steps.j, - int32_t(trajMod.k[idx] * planner.settings.axis_steps_per_mm[K_AXIS]) - steps.k, - int32_t(trajMod.u[idx] * planner.settings.axis_steps_per_mm[U_AXIS]) - steps.u, - int32_t(trajMod.v[idx] * planner.settings.axis_steps_per_mm[V_AXIS]) - steps.v, - int32_t(trajMod.w[idx] * planner.settings.axis_steps_per_mm[W_AXIS]) - steps.w + TOSTEPS(e, E_AXIS_N(current_block->extruder)), + TOSTEPS(x, X_AXIS), TOSTEPS(y, Y_AXIS), TOSTEPS(z, Z_AXIS), + TOSTEPS(i, I_AXIS), TOSTEPS(j, J_AXIS), TOSTEPS(k, K_AXIS), + TOSTEPS(u, U_AXIS), TOSTEPS(v, V_AXIS), TOSTEPS(w, W_AXIS) ); #endif - bool any_dirChange = (false - LOGICAL_AXIS_GANG( - || (delta.e > 0 && dirState.e != stepDirState_POS) || (delta.e < 0 && dirState.e != stepDirState_NEG), - || (delta.x > 0 && dirState.x != stepDirState_POS) || (delta.x < 0 && dirState.x != stepDirState_NEG), - || (delta.y > 0 && dirState.y != stepDirState_POS) || (delta.y < 0 && dirState.y != stepDirState_NEG), - || (delta.z > 0 && dirState.z != stepDirState_POS) || (delta.z < 0 && dirState.z != stepDirState_NEG), - || (delta.i > 0 && dirState.i != stepDirState_POS) || (delta.i < 0 && dirState.i != stepDirState_NEG), - || (delta.j > 0 && dirState.j != stepDirState_POS) || (delta.j < 0 && dirState.j != stepDirState_NEG), - || (delta.k > 0 && dirState.k != stepDirState_POS) || (delta.k < 0 && dirState.k != stepDirState_NEG), - || (delta.u > 0 && dirState.u != stepDirState_POS) || (delta.u < 0 && dirState.u != stepDirState_NEG), - || (delta.v > 0 && dirState.v != stepDirState_POS) || (delta.v < 0 && dirState.v != stepDirState_NEG), - || (delta.w > 0 && dirState.w != stepDirState_POS) || (delta.w < 0 && dirState.w != stepDirState_NEG) - ) + LOGICAL_AXIS_CODE( + command_set[E_AXIS_N(current_block->extruder)] = delta.e >= 0 ? command_set_pos : command_set_neg, + command_set[X_AXIS] = delta.x >= 0 ? command_set_pos : command_set_neg, + command_set[Y_AXIS] = delta.y >= 0 ? command_set_pos : command_set_neg, + command_set[Z_AXIS] = delta.z >= 0 ? command_set_pos : command_set_neg, + command_set[I_AXIS] = delta.i >= 0 ? command_set_pos : command_set_neg, + command_set[J_AXIS] = delta.j >= 0 ? command_set_pos : command_set_neg, + command_set[K_AXIS] = delta.k >= 0 ? command_set_pos : command_set_neg, + command_set[U_AXIS] = delta.u >= 0 ? command_set_pos : command_set_neg, + command_set[V_AXIS] = delta.v >= 0 ? command_set_pos : command_set_neg, + command_set[W_AXIS] = delta.w >= 0 ? command_set_pos : command_set_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; - - // Commands are written in a bitmask with step and dir as single bits - auto COMMAND_SET = [&](auto &d, auto &e, auto &s, auto &b, auto bd, auto bs) { - if (d >= 0) { - if (e + d < (FTM_CTS_COMPARE_VAL)) { - e += d; - } - else { - s++; - b |= bd | bs; - e += d - (FTM_STEPS_PER_UNIT_TIME); - anyStep = true; - } - } - else { - if ((e + d) > -(FTM_CTS_COMPARE_VAL)) { - e += d; - } - else { - s--; - b |= bs; - e += d + (FTM_STEPS_PER_UNIT_TIME); - anyStep = true; - } - } - }; - // Init all step/dir bits to 0 (defaulting to reverse/negative motion) stepperCmdBuff[stepperCmdBuff_produceIdx] = 0; + err_P += delta; + // Set up step/dir bits for all axes LOGICAL_AXIS_CODE( - COMMAND_SET(delta.e, err_P.e, steps.e, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_E), _BV(FT_BIT_STEP_E)), - COMMAND_SET(delta.x, err_P.x, steps.x, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_X), _BV(FT_BIT_STEP_X)), - COMMAND_SET(delta.y, err_P.y, steps.y, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_Y), _BV(FT_BIT_STEP_Y)), - COMMAND_SET(delta.z, err_P.z, steps.z, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_Z), _BV(FT_BIT_STEP_Z)), - COMMAND_SET(delta.i, err_P.i, steps.i, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_I), _BV(FT_BIT_STEP_I)), - COMMAND_SET(delta.j, err_P.j, steps.j, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_J), _BV(FT_BIT_STEP_J)), - COMMAND_SET(delta.k, err_P.k, steps.k, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_K), _BV(FT_BIT_STEP_K)), - COMMAND_SET(delta.u, err_P.u, steps.u, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_U), _BV(FT_BIT_STEP_U)), - COMMAND_SET(delta.v, err_P.v, steps.v, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_V), _BV(FT_BIT_STEP_V)), - COMMAND_SET(delta.w, err_P.w, steps.w, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_W), _BV(FT_BIT_STEP_W)), + command_set[E_AXIS_N(current_block->extruder)](err_P.e, steps.e, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_E), _BV(FT_BIT_STEP_E)), + command_set[X_AXIS](err_P.x, steps.x, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_X), _BV(FT_BIT_STEP_X)), + command_set[Y_AXIS](err_P.y, steps.y, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_Y), _BV(FT_BIT_STEP_Y)), + command_set[Z_AXIS](err_P.z, steps.z, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_Z), _BV(FT_BIT_STEP_Z)), + command_set[I_AXIS](err_P.i, steps.i, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_I), _BV(FT_BIT_STEP_I)), + command_set[J_AXIS](err_P.j, steps.j, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_J), _BV(FT_BIT_STEP_J)), + command_set[K_AXIS](err_P.k, steps.k, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_K), _BV(FT_BIT_STEP_K)), + command_set[U_AXIS](err_P.u, steps.u, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_U), _BV(FT_BIT_STEP_U)), + command_set[V_AXIS](err_P.v, steps.v, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_V), _BV(FT_BIT_STEP_V)), + command_set[W_AXIS](err_P.w, steps.w, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_W), _BV(FT_BIT_STEP_W)), ); - 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); - - auto DIR_SET = [&](auto &d, auto &c, auto &b, auto bd) { - if (d > 0) { b |= bd; c = stepDirState_POS; } else { c = stepDirState_NEG; } - }; - - LOGICAL_AXIS_CODE( - DIR_SET(delta.e, dirState.e, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_E)), - DIR_SET(delta.x, dirState.x, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_X)), - DIR_SET(delta.y, dirState.y, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_Y)), - DIR_SET(delta.z, dirState.z, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_Z)), - DIR_SET(delta.i, dirState.i, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_I)), - DIR_SET(delta.j, dirState.j, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_J)), - DIR_SET(delta.k, dirState.k, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_K)), - DIR_SET(delta.u, dirState.u, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_U)), - DIR_SET(delta.v, dirState.v, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_V)), - DIR_SET(delta.w, dirState.w, stepperCmdBuff[stepperCmdBuff_produceIdx], _BV(FT_BIT_DIR_W)), - ); - - any_dirChange = false; - } - else { // ...no direction change. - CBI(stepperCmdBuff_ApplyDir[dir_index], dir_bit); - } + if (++stepperCmdBuff_produceIdx == (FTM_STEPPERCMD_BUFF_SIZE)) + stepperCmdBuff_produceIdx = 0; - if (stepperCmdBuff_produceIdx == (FTM_STEPPERCMD_BUFF_SIZE) - 1) - stepperCmdBuff_produceIdx = 0; - else - stepperCmdBuff_produceIdx++; - - nextStepTicks = FTM_MIN_TICKS; - } } // FTM_STEPS_PER_UNIT_TIME loop } diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h index 3f620b2f5419..cea754088138 100644 --- a/Marlin/src/module/ft_motion.h +++ b/Marlin/src/module/ft_motion.h @@ -26,8 +26,6 @@ #include "ft_types.h" -#define FTM_STEPPERCMD_DIR_SIZE ((FTM_STEPPERCMD_BUFF_SIZE + 7) / 8) - #if HAS_X_AXIS && (HAS_Z_AXIS || HAS_EXTRUDERS) #define HAS_DYNAMIC_FREQ 1 #if HAS_Z_AXIS @@ -39,28 +37,30 @@ #endif typedef struct FTConfig { - ftMotionMode_t mode = FTM_DEFAULT_MODE; // Mode / active compensation mode configuration. + ftMotionMode_t mode = FTM_DEFAULT_MODE; // Mode / active compensation mode configuration. bool modeHasShaper() { return WITHIN(mode, 10U, 19U); } #if HAS_X_AXIS - float baseFreq[1 + ENABLED(HAS_Y_AXIS)] = // Base frequency. [Hz] + float baseFreq[1 + ENABLED(HAS_Y_AXIS)] = // Base frequency. [Hz] { FTM_SHAPING_DEFAULT_X_FREQ OPTARG(HAS_Y_AXIS, FTM_SHAPING_DEFAULT_Y_FREQ) }; + + float zeta[1 + ENABLED(HAS_Y_AXIS)] = // Damping factor + { FTM_SHAPING_ZETA_X OPTARG(HAS_Y_AXIS, FTM_SHAPING_ZETA_Y) }; + float vtol[1 + ENABLED(HAS_Y_AXIS)] = // Vibration Level + { FTM_SHAPING_V_TOL_X OPTARG(HAS_Y_AXIS, FTM_SHAPING_V_TOL_Y) }; #endif - float zeta = FTM_SHAPING_ZETA; // Damping factor - float vtol = FTM_SHAPING_V_TOL; // Vibration Level - - #if HAS_DYNAMIC_FREQ - dynFreqMode_t dynFreqMode = FTM_DEFAULT_DYNFREQ_MODE; // Dynamic frequency mode configuration. - float dynFreqK[1 + ENABLED(HAS_Y_AXIS)] = { 0.0f }; // Scaling / gain for dynamic frequency. [Hz/mm] or [Hz/g] +#if HAS_DYNAMIC_FREQ + dynFreqMode_t dynFreqMode = FTM_DEFAULT_DYNFREQ_MODE; // Dynamic frequency mode configuration. + float dynFreqK[1 + ENABLED(HAS_Y_AXIS)] = { 0.0f }; // Scaling / gain for dynamic frequency. [Hz/mm] or [Hz/g] #else static constexpr dynFreqMode_t dynFreqMode = dynFreqMode_DISABLED; #endif #if HAS_EXTRUDERS - bool linearAdvEna = FTM_LINEAR_ADV_DEFAULT_ENA; // Linear advance enable configuration. - float linearAdvK = FTM_LINEAR_ADV_DEFAULT_K; // Linear advance gain. + bool linearAdvEna = FTM_LINEAR_ADV_DEFAULT_ENA; // Linear advance enable configuration. + float linearAdvK = FTM_LINEAR_ADV_DEFAULT_K; // Linear advance gain. #endif } ft_config_t; @@ -78,8 +78,11 @@ class FTMotion { TERN_(HAS_X_AXIS, cfg.baseFreq[X_AXIS] = FTM_SHAPING_DEFAULT_X_FREQ); TERN_(HAS_Y_AXIS, cfg.baseFreq[Y_AXIS] = FTM_SHAPING_DEFAULT_Y_FREQ); - cfg.zeta = FTM_SHAPING_ZETA; // Damping factor - cfg.vtol = FTM_SHAPING_V_TOL; // Vibration Level + TERN_(HAS_X_AXIS, cfg.zeta[X_AXIS] = FTM_SHAPING_ZETA_X); + TERN_(HAS_Y_AXIS, cfg.zeta[Y_AXIS] = FTM_SHAPING_ZETA_Y); + + TERN_(HAS_X_AXIS, cfg.vtol[X_AXIS] = FTM_SHAPING_V_TOL_X); + TERN_(HAS_Y_AXIS, cfg.vtol[Y_AXIS] = FTM_SHAPING_V_TOL_Y); #if HAS_DYNAMIC_FREQ cfg.dynFreqMode = FTM_DEFAULT_DYNFREQ_MODE; @@ -99,47 +102,45 @@ class FTMotion { reset(); } - 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. - stepperCmdBuff_consumeIdx; // Index of next stepper command read from the buffer. + static ft_command_t stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of stepper commands. + 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. + static bool sts_stepperBusy; // The stepper buffer has items and is in use. // Public methods static void init(); - 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. + static void startBlockProc(); // 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=cfg.zeta, const_float_t vtol=cfg.vtol); + static void updateShapingA(float zeta[]=cfg.zeta, float vtol[]=cfg.vtol); // 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=cfg.zeta); + static void updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), float zeta[]=cfg.zeta); static void refreshShapingN() { updateShapingN(cfg.baseFreq[X_AXIS] OPTARG(HAS_Y_AXIS, cfg.baseFreq[Y_AXIS])); } #endif - static void reset(); // Resets all states of the fixed time conversion to defaults. + static void reset(); // Reset all states of the fixed time conversion to defaults. private: static xyze_trajectory_t traj; static xyze_trajectoryMod_t trajMod; + static xyze_trajectoryWin_t trajWin; - static block_t *current_block_cpy; static bool blockProcRdy, blockProcRdy_z1, blockProcDn; static bool batchRdy, batchRdyForInterp; static bool runoutEna; - static bool runout; + static bool blockDataIsRunout; // Trapezoid data variables. static xyze_pos_t startPosn, // (mm) Start position of block @@ -154,6 +155,11 @@ class FTMotion { static uint32_t N1, N2, N3; static uint32_t max_intervals; + static constexpr uint32_t _ftm_size = TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE), + _ftm_wind = TERN(FTM_UNIFIED_BWS, 2, ceil((FTM_WINDOW_SIZE) / _ftm_size)), + shaper_intervals = _ftm_size * ceil((FTM_ZMAX) / _ftm_size), + min_max_intervals = _ftm_size * _ftm_wind; + // Make vector variables. static uint32_t makeVector_idx, makeVector_idx_z1, @@ -164,9 +170,6 @@ class FTMotion { interpIdx_z1; static xyze_long_t steps; - static xyze_stepDir_t dirState; - - static hal_timer_t nextStepTicks; // Shaping variables. #if HAS_X_AXIS @@ -188,7 +191,7 @@ class FTMotion { axis_shaping_t y; #endif - void updateShapingA(const_float_t zeta=cfg.zeta, const_float_t vtol=cfg.vtol); + void updateShapingA(float zeta[]=cfg.zeta, float vtol[]=cfg.vtol); } shaping_t; diff --git a/Marlin/src/module/ft_types.h b/Marlin/src/module/ft_types.h index 6b708677d19c..06680488754f 100644 --- a/Marlin/src/module/ft_types.h +++ b/Marlin/src/module/ft_types.h @@ -29,10 +29,12 @@ typedef enum FXDTICtrlMode : uint8_t { //ftMotionMode_ULENDO_FBS = 2U, ftMotionMode_ZV = 10U, ftMotionMode_ZVD = 11U, - ftMotionMode_EI = 12U, - ftMotionMode_2HEI = 13U, - ftMotionMode_3HEI = 14U, - ftMotionMode_MZV = 15U, + ftMotionMode_ZVDD = 12U, + ftMotionMode_ZVDDD = 13U, + ftMotionMode_EI = 14U, + ftMotionMode_2HEI = 15U, + ftMotionMode_3HEI = 16U, + ftMotionMode_MZV = 17U, //ftMotionMode_DISCTF = 20U } ftMotionMode_t; @@ -42,16 +44,17 @@ enum dynFreqMode_t : uint8_t { dynFreqMode_MASS_BASED = 2U }; -enum stepDirState_t : uint8_t { - stepDirState_NOT_SET = 0U, - stepDirState_POS = 1U, - stepDirState_NEG = 2U -}; - -typedef struct XYZEarray xyze_trajectory_t; -typedef struct XYZEarray xyze_trajectoryMod_t; +#define IS_EI_MODE(N) WITHIN(N, ftMotionMode_EI, ftMotionMode_3HEI) -typedef struct XYZEval xyze_stepDir_t; +#if ENABLED(FTM_UNIFIED_BWS) + typedef struct XYZEarray xyze_trajectory_t; + typedef struct XYZEarray xyze_trajectoryMod_t; + typedef struct XYZEarray xyze_trajectoryWin_t; +#else + typedef struct XYZEarray xyze_trajectory_t; + typedef struct XYZEarray xyze_trajectoryMod_t; + typedef struct XYZEarray xyze_trajectoryWin_t; +#endif enum { LIST_N(DOUBLE(LOGICAL_AXES), diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 74ba41ccf699..2259eedf41d4 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -33,10 +33,6 @@ #include "../lcd/marlinui.h" #include "../inc/MarlinConfig.h" -#if ENABLED(FT_MOTION) - #include "ft_motion.h" -#endif - #if IS_SCARA #include "../libs/buzzer.h" #include "../lcd/marlinui.h" @@ -2095,21 +2091,6 @@ void prepare_line_to_destination() { void homeaxis(const AxisEnum axis) { - #if ENABLED(FT_MOTION) - // Disable ft-motion for homing - struct OnExit { - ftMotionMode_t oldmm; - OnExit() { - oldmm = ftMotion.cfg.mode; - ftMotion.cfg.mode = ftMotionMode_DISABLED; - } - ~OnExit() { - ftMotion.cfg.mode = oldmm; - ftMotion.init(); - } - } on_exit; - #endif - #if ANY(MORGAN_SCARA, MP_SCARA) // Only Z homing (with probe) is permitted if (axis != Z_AXIS) { BUZZ(100, 880); return; } diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index c68db6bb89b4..862b2728042d 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1492,11 +1492,6 @@ void Stepper::isr() { uint8_t max_loops = 10; #if ENABLED(FT_MOTION) - static bool ftMotion_stepCmdRdy = false; // Indicates a step command was loaded from the - // buffers and is ready to be output. - static bool ftMotion_applyDir = false; // Indicates the DIR output should be set. - static ft_command_t ftMotion_stepCmd = 0U; // Storage for the step command to be output. - static uint32_t ftMotion_nextAuxISR = 0U; // Storage for the next ISR of the auxilliary tasks. const bool using_ftMotion = ftMotion.cfg.mode; #else constexpr bool using_ftMotion = false; @@ -1508,57 +1503,19 @@ void Stepper::isr() { // Enable ISRs to reduce USART processing latency hal.isr_on(); - hal_timer_t interval; + hal_timer_t interval = 0; #if ENABLED(FT_MOTION) if (using_ftMotion) { if (!nextMainISR) { - if (abort_current_block) { - ftMotion_stepCmdRdy = false; // If a command was ready, cancel it. - ftMotion.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 (ftMotion_stepCmdRdy) { - ftMotion_stepper(ftMotion_applyDir, ftMotion_stepCmd); - ftMotion_stepCmdRdy = false; - } - // Check if there is data in the buffers. - if (ftMotion.stepperCmdBuff_produceIdx != ftMotion.stepperCmdBuff_consumeIdx) { - - ftMotion.sts_stepperBusy = true; - - // "Pop" one command from the command buffer. - ftMotion_stepCmd = ftMotion.stepperCmdBuff[ftMotion.stepperCmdBuff_consumeIdx]; - const uint8_t dir_index = ftMotion.stepperCmdBuff_consumeIdx >> 3, - dir_bit = ftMotion.stepperCmdBuff_consumeIdx & 0x7; - ftMotion_applyDir = TEST(ftMotion.stepperCmdBuff_ApplyDir[dir_index], dir_bit); - nextMainISR = ftMotion.stepperCmdBuff_StepRelativeTi[ftMotion.stepperCmdBuff_consumeIdx]; - ftMotion_stepCmdRdy = true; - - if (++ftMotion.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE)) - ftMotion.stepperCmdBuff_consumeIdx = 0; - - } - else { // Buffer empty. - ftMotion.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 auxiliary functions. - if (!ftMotion_nextAuxISR) { + nextMainISR = FTM_MIN_TICKS; + ftMotion_stepper(); endstops.update(); TERN_(BABYSTEPPING, if (babystep.has_steps()) babystepping_isr()); - ftMotion_refreshAxisDidMove(); - ftMotion_nextAuxISR = 0.0025f * (STEPPER_TIMER_RATE); } - - interval = _MIN(nextMainISR, ftMotion_nextAuxISR); + interval = nextMainISR; nextMainISR -= interval; - ftMotion_nextAuxISR -= interval; } #endif @@ -3365,6 +3322,28 @@ void Stepper::set_axis_position(const AxisEnum a, const int32_t &v) { #endif } +#if ENABLED(FT_MOTION) + + void Stepper::ftMotion_syncPosition() { + //planner.synchronize(); planner already synchronized in M493 + + #ifdef __AVR__ + // Protect the access to the position. Only required for AVR, as + // any 32bit CPU offers atomic access to 32bit variables + const bool was_enabled = suspend(); + #endif + + // Update stepper positions from the planner + count_position = planner.position; + + #ifdef __AVR__ + // Reenable Stepper ISR + if (was_enabled) wake_up(); + #endif + } + +#endif // FT_MOTION + // Signal endstops were triggered - This function can be called from // an ISR context (Temperature, Stepper or limits ISR), so we must // be very careful here. If the interrupt being preempted was the @@ -3459,65 +3438,70 @@ void Stepper::report_positions() { #if ENABLED(FT_MOTION) // Set stepper I/O for fixed time controller. - void Stepper::ftMotion_stepper(const bool applyDir, const ft_command_t command) { + void Stepper::ftMotion_stepper() { + + // Check if the buffer is empty. + ftMotion.sts_stepperBusy = (ftMotion.stepperCmdBuff_produceIdx != ftMotion.stepperCmdBuff_consumeIdx); + if (!ftMotion.sts_stepperBusy) return; + + // "Pop" one command from current motion buffer + // Use one byte to restore one stepper command in the format: + // |X_step|X_direction|Y_step|Y_direction|Z_step|Z_direction|E_step|E_direction| + const ft_command_t command = ftMotion.stepperCmdBuff[ftMotion.stepperCmdBuff_consumeIdx]; + if (++ftMotion.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE)) ftMotion.stepperCmdBuff_consumeIdx = 0U; + + if (abort_current_block) return; USING_TIMED_PULSE(); - const xyze_bool_t axis_step = LOGICAL_AXIS_ARRAY( + axis_did_move = LOGICAL_AXIS_ARRAY( TEST(command, FT_BIT_STEP_E), TEST(command, FT_BIT_STEP_X), TEST(command, FT_BIT_STEP_Y), TEST(command, FT_BIT_STEP_Z), TEST(command, FT_BIT_STEP_I), TEST(command, FT_BIT_STEP_J), TEST(command, FT_BIT_STEP_K), TEST(command, FT_BIT_STEP_U), TEST(command, FT_BIT_STEP_V), TEST(command, FT_BIT_STEP_W) ); + last_direction_bits = LOGICAL_AXIS_ARRAY( + axis_did_move.e ? TEST(command, FT_BIT_DIR_E) : last_direction_bits.e, + axis_did_move.x ? TEST(command, FT_BIT_DIR_X) : last_direction_bits.x, + axis_did_move.y ? TEST(command, FT_BIT_DIR_Y) : last_direction_bits.y, + axis_did_move.z ? TEST(command, FT_BIT_DIR_Z) : last_direction_bits.z, + axis_did_move.i ? TEST(command, FT_BIT_DIR_I) : last_direction_bits.i, + axis_did_move.j ? TEST(command, FT_BIT_DIR_J) : last_direction_bits.j, + axis_did_move.k ? TEST(command, FT_BIT_DIR_K) : last_direction_bits.k, + axis_did_move.u ? TEST(command, FT_BIT_DIR_U) : last_direction_bits.u, + axis_did_move.v ? TEST(command, FT_BIT_DIR_V) : last_direction_bits.v, + axis_did_move.w ? TEST(command, FT_BIT_DIR_W) : last_direction_bits.w + ); + // Apply directions (which will apply to the entire linear move) - AxisBits axis_dir = last_direction_bits; - if (applyDir) { - axis_dir = LOGICAL_AXIS_ARRAY( - TEST(command, FT_BIT_DIR_E), - TEST(command, FT_BIT_DIR_X), TEST(command, FT_BIT_DIR_Y), TEST(command, FT_BIT_DIR_Z), - TEST(command, FT_BIT_DIR_I), TEST(command, FT_BIT_DIR_J), TEST(command, FT_BIT_DIR_K), - TEST(command, FT_BIT_DIR_U), TEST(command, FT_BIT_DIR_V), TEST(command, FT_BIT_DIR_W) - ); - LOGICAL_AXIS_CODE( - E_APPLY_DIR(axis_dir.e, false), - X_APPLY_DIR(axis_dir.x, false), Y_APPLY_DIR(axis_dir.y, false), Z_APPLY_DIR(axis_dir.z, false), - I_APPLY_DIR(axis_dir.i, false), J_APPLY_DIR(axis_dir.j, false), K_APPLY_DIR(axis_dir.k, false), - U_APPLY_DIR(axis_dir.u, false), V_APPLY_DIR(axis_dir.v, false), W_APPLY_DIR(axis_dir.w, false) - ); - last_direction_bits = axis_dir; - DIR_WAIT_AFTER(); - } + LOGICAL_AXIS_CODE( + E_APPLY_DIR(last_direction_bits.e, false), + X_APPLY_DIR(last_direction_bits.x, false), Y_APPLY_DIR(last_direction_bits.y, false), Z_APPLY_DIR(last_direction_bits.z, false), + I_APPLY_DIR(last_direction_bits.i, false), J_APPLY_DIR(last_direction_bits.j, false), K_APPLY_DIR(last_direction_bits.k, false), + U_APPLY_DIR(last_direction_bits.u, false), V_APPLY_DIR(last_direction_bits.v, false), W_APPLY_DIR(last_direction_bits.w, false) + ); + + DIR_WAIT_AFTER(); // Start a step pulse LOGICAL_AXIS_CODE( - if (axis_step.e) E_APPLY_STEP(STEP_STATE_E, false), - if (axis_step.x) X_APPLY_STEP(STEP_STATE_X, false), if (axis_step.y) Y_APPLY_STEP(STEP_STATE_Y, false), - if (axis_step.z) Z_APPLY_STEP(STEP_STATE_Z, false), if (axis_step.i) I_APPLY_STEP(STEP_STATE_I, false), - if (axis_step.j) J_APPLY_STEP(STEP_STATE_J, false), if (axis_step.k) K_APPLY_STEP(STEP_STATE_K, false), - if (axis_step.u) U_APPLY_STEP(STEP_STATE_U, false), if (axis_step.v) V_APPLY_STEP(STEP_STATE_V, false), - if (axis_step.w) W_APPLY_STEP(STEP_STATE_W, false) + E_APPLY_STEP(axis_did_move.e, false), + X_APPLY_STEP(axis_did_move.x, false), Y_APPLY_STEP(axis_did_move.y, false), Z_APPLY_STEP(axis_did_move.z, false), + I_APPLY_STEP(axis_did_move.i, false), J_APPLY_STEP(axis_did_move.j, false), K_APPLY_STEP(axis_did_move.k, false), + U_APPLY_STEP(axis_did_move.u, false), V_APPLY_STEP(axis_did_move.v, false), W_APPLY_STEP(axis_did_move.w, false) ); // Begin waiting for the minimum pulse duration START_TIMED_PULSE(); - // Update axis direction adders - count_direction = LOGICAL_AXIS_ARRAY( - int8_t(axis_dir.e ? 1 : -1), - int8_t(axis_dir.x ? 1 : -1), int8_t(axis_dir.y ? 1 : -1), int8_t(axis_dir.z ? 1 : -1), - int8_t(axis_dir.i ? 1 : -1), int8_t(axis_dir.j ? 1 : -1), int8_t(axis_dir.k ? 1 : -1), - int8_t(axis_dir.u ? 1 : -1), int8_t(axis_dir.v ? 1 : -1), int8_t(axis_dir.w ? 1 : -1) - ); - - // Update stepper counts - required for various operations + // Update step counts LOGICAL_AXIS_CODE( - if (axis_step.e) count_position.e += count_direction.e, - if (axis_step.x) count_position.x += count_direction.x, if (axis_step.y) count_position.y += count_direction.y, - if (axis_step.z) count_position.z += count_direction.z, if (axis_step.i) count_position.i += count_direction.i, - if (axis_step.j) count_position.j += count_direction.j, if (axis_step.k) count_position.k += count_direction.k, - if (axis_step.u) count_position.u += count_direction.u, if (axis_step.v) count_position.v += count_direction.v, - if (axis_step.w) count_position.w += count_direction.w + if (axis_did_move.e) count_position.e += last_direction_bits.e ? 1 : -1, if (axis_did_move.x) count_position.x += last_direction_bits.x ? 1 : -1, + if (axis_did_move.y) count_position.y += last_direction_bits.y ? 1 : -1, if (axis_did_move.z) count_position.z += last_direction_bits.z ? 1 : -1, + if (axis_did_move.i) count_position.i += last_direction_bits.i ? 1 : -1, if (axis_did_move.j) count_position.j += last_direction_bits.j ? 1 : -1, + if (axis_did_move.k) count_position.k += last_direction_bits.k ? 1 : -1, if (axis_did_move.u) count_position.u += last_direction_bits.u ? 1 : -1, + if (axis_did_move.v) count_position.v += last_direction_bits.v ? 1 : -1, if (axis_did_move.w) count_position.w += last_direction_bits.w ? 1 : -1 ); #if HAS_EXTRUDERS @@ -3532,10 +3516,10 @@ void Stepper::report_positions() { // Only wait for axes without edge stepping const bool any_wait = false LOGICAL_AXIS_GANG( - || (!e_axis_has_dedge && axis_step.e), - || (!AXIS_HAS_DEDGE(X) && axis_step.x), || (!AXIS_HAS_DEDGE(Y) && axis_step.y), || (!AXIS_HAS_DEDGE(Z) && axis_step.z), - || (!AXIS_HAS_DEDGE(I) && axis_step.i), || (!AXIS_HAS_DEDGE(J) && axis_step.j), || (!AXIS_HAS_DEDGE(K) && axis_step.k), - || (!AXIS_HAS_DEDGE(U) && axis_step.u), || (!AXIS_HAS_DEDGE(V) && axis_step.v), || (!AXIS_HAS_DEDGE(W) && axis_step.w) + || (!e_axis_has_dedge && axis_did_move.e), + || (!AXIS_HAS_DEDGE(X) && axis_did_move.x), || (!AXIS_HAS_DEDGE(Y) && axis_did_move.y), || (!AXIS_HAS_DEDGE(Z) && axis_did_move.z), + || (!AXIS_HAS_DEDGE(I) && axis_did_move.i), || (!AXIS_HAS_DEDGE(J) && axis_did_move.j), || (!AXIS_HAS_DEDGE(K) && axis_did_move.k), + || (!AXIS_HAS_DEDGE(U) && axis_did_move.u), || (!AXIS_HAS_DEDGE(V) && axis_did_move.v), || (!AXIS_HAS_DEDGE(W) && axis_did_move.w) ); // Allow pulses to be registered by stepper drivers @@ -3543,80 +3527,46 @@ void Stepper::report_positions() { // Stop pulses. Axes with DEDGE will do nothing, assuming STEP_STATE_* is HIGH LOGICAL_AXIS_CODE( - if (axis_step.e) E_APPLY_STEP(!STEP_STATE_E, false), - if (axis_step.x) X_APPLY_STEP(!STEP_STATE_X, false), if (axis_step.y) Y_APPLY_STEP(!STEP_STATE_Y, false), - if (axis_step.z) Z_APPLY_STEP(!STEP_STATE_Z, false), if (axis_step.i) I_APPLY_STEP(!STEP_STATE_I, false), - if (axis_step.j) J_APPLY_STEP(!STEP_STATE_J, false), if (axis_step.k) K_APPLY_STEP(!STEP_STATE_K, false), - if (axis_step.u) U_APPLY_STEP(!STEP_STATE_U, false), if (axis_step.v) V_APPLY_STEP(!STEP_STATE_V, false), - if (axis_step.w) W_APPLY_STEP(!STEP_STATE_W, false) + E_APPLY_STEP(!STEP_STATE_E, false), + X_APPLY_STEP(!STEP_STATE_X, false), Y_APPLY_STEP(!STEP_STATE_Y, false), Z_APPLY_STEP(!STEP_STATE_Z, false), + I_APPLY_STEP(!STEP_STATE_I, false), J_APPLY_STEP(!STEP_STATE_J, false), K_APPLY_STEP(!STEP_STATE_K, false), + U_APPLY_STEP(!STEP_STATE_U, false), V_APPLY_STEP(!STEP_STATE_V, false), W_APPLY_STEP(!STEP_STATE_W, false) ); } // Stepper::ftMotion_stepper - void Stepper::ftMotion_BlockQueueUpdate() { + void Stepper::ftMotion_blockQueueUpdate() { if (current_block) { // If the current block is not done processing, return right away if (!ftMotion.getBlockProcDn()) return; axis_did_move.reset(); - current_block = nullptr; - discard_current_block(); + planner.release_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 - } + // Check the buffer for a new block + current_block = planner.get_current_block(); - // 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; - - ftMotion.startBlockProc(current_block); + if (current_block) { + // Sync block? Sync the stepper counts and return + while (current_block->is_sync()) { + TERN_(LASER_FEATURE, if (!(current_block->is_fan_sync() || current_block->is_pwr_sync()))) _set_position(current_block->position); + + planner.release_current_block(); - } - else { - ftMotion.runoutBlock(); - return; // No queued blocks + // Try to get a new block + if (!(current_block = planner.get_current_block())) + return; // No queued blocks. } - } // if (!current_block) - - } // Stepper::ftMotion_BlockQueueUpdate() - - // Debounces the axis move indication to account for potential - // delay between the block information and the stepper commands - void Stepper::ftMotion_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. - - AxisBits didmove; - static abce_ulong_t debounce{0}; - auto debounce_axis = [&](const AxisEnum axis) { - if (current_block->steps[axis]) debounce[axis] = (AXIS_DID_MOVE_DEB) * 400; // divide by 0.0025f */ - if (debounce[axis]) { didmove.bset(axis); debounce[axis]--; } - }; - #define _DEBOUNCE(N) debounce_axis(AxisEnum(N)); + ftMotion.startBlockProc(); + return; + } - if (current_block) { REPEAT(LOGICAL_AXES, _DEBOUNCE); } + ftMotion.runoutBlock(); - axis_did_move = didmove; - } + } // Stepper::ftMotion_blockQueueUpdate() #endif // FT_MOTION diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 2ccc9e7be9f8..99fd2d293609 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -655,7 +655,9 @@ class Stepper { #if ENABLED(FT_MOTION) // Manage the planner - static void ftMotion_BlockQueueUpdate(); + static void ftMotion_blockQueueUpdate(); + // Set current position in steps when reset flag is set in M493 and planner already synchronized + static void ftMotion_syncPosition(); #endif #if HAS_ZV_SHAPING @@ -694,8 +696,7 @@ class Stepper { #endif #if ENABLED(FT_MOTION) - static void ftMotion_stepper(const bool applyDir, const ft_command_t command); - static void ftMotion_refreshAxisDidMove(); + static void ftMotion_stepper(); #endif }; From f69effd2eb595fce676a2af625b8626686b814fd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 19 Dec 2023 20:57:26 -0600 Subject: [PATCH 018/236] =?UTF-8?q?=F0=9F=9A=B8=20Just=20"warn"=20on=20SD?= =?UTF-8?q?=20fail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/cardreader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 175e4e5c05bc..ae7415548213 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -487,9 +487,9 @@ void CardReader::mount() { #endif ) SERIAL_ECHO_MSG(STR_SD_INIT_FAIL); else if (!volume.init(driver)) - SERIAL_ERROR_MSG(STR_SD_VOL_INIT_FAIL); + SERIAL_WARN_MSG(STR_SD_VOL_INIT_FAIL); else if (!root.openRoot(&volume)) - SERIAL_ERROR_MSG(STR_SD_OPENROOT_FAIL); + SERIAL_WARN_MSG(STR_SD_OPENROOT_FAIL); else { flag.mounted = true; SERIAL_ECHO_MSG(STR_SD_CARD_OK); From 738584d342768311845bebf8bc45494db2418eb6 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 20 Dec 2023 06:06:01 +0000 Subject: [PATCH 019/236] [cron] Bump distribution date (2023-12-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 a096d32aa93f..4c10607eefa1 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-12-18" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 bfdf5c7c2b1b..e21fe4c6e94e 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-12-18" + #define STRING_DISTRIBUTION_DATE "2023-12-20" #endif /** From eeacf76cfd1e936c44f53e05efb05fbac946996a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 20 Dec 2023 22:07:59 -0600 Subject: [PATCH 020/236] =?UTF-8?q?=F0=9F=94=A7=20config.ini=20/=20JSON=20?= =?UTF-8?q?dump=20by=20@section=20(#26556)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/schema.py | 21 +- .../share/PlatformIO/scripts/signature.py | 375 ++++++++++++------ 2 files changed, 278 insertions(+), 118 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/schema.py b/buildroot/share/PlatformIO/scripts/schema.py index 80ba70a29812..381ee57a9543 100755 --- a/buildroot/share/PlatformIO/scripts/schema.py +++ b/buildroot/share/PlatformIO/scripts/schema.py @@ -80,7 +80,26 @@ def load_boards(): return '' # -# Extract a schema from the current configuration files +# Extract the current configuration files in the form of a structured schema. +# Contains the full schema for the configuration files, not just the enabled options, +# Contains the current values of the options, not just data structure, so "schema" is a slight misnomer. +# +# The returned object is a nested dictionary with the following indexing: +# +# - schema[filekey][section][define_name] = define_info +# +# Where the define_info contains the following keyed fields: +# - section = The @section the define is in +# - name = The name of the define +# - enabled = True if the define is enabled (not commented out) +# - line = The line number of the define +# - sid = A serial ID for the define +# - value = The value of the define, if it has one +# - type = The type of the define, if it has one +# - requires = The conditions that must be met for the define to be enabled +# - comment = The comment for the define, if it has one +# - units = The units for the define, if it has one +# - options = The options for the define, if it has one # def extract(): # Load board names from boards.h diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index ab1a46bae523..d2502db35861 100755 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -8,24 +8,54 @@ from datetime import datetime from pathlib import Path -# -# Return all macro names in a header as an array, so we can take -# the intersection with the preprocessor output, giving a decent -# reflection of all enabled options that (probably) came from the -# configuration files. We end up with the actual configured state, -# better than what the config files say. You can then use the -# resulting config.ini to produce more exact configuration files. -# -def extract_defines(filepath): +''' +Return all enabled #define items from a given C header file in a dictionary. +A "#define" in a multi-line comment could produce a false positive if it's not +preceded by a non-space character (like * in a multi-line comment). + +Output: +Each entry is a dictionary with a 'name' and a 'section' key. We end up with: + { MOTHERBOARD: { name: "MOTHERBOARD", section: "hardware" }, ... } + +The 'name' key might get dropped as redundant, but it's useful for debugging. + +Because the option names are the keys, only the last occurrence is retained. +Use the Schema class for a more complete list of options, soon with full parsing. + +This list is used to filter what is actually a config-defined option versus +defines from elsewhere. + +While the Schema class parses the configurations on its own, this script will +get the preprocessor output and get the intersection of the enabled options from +our crude scraping method and the actual compiler output. +We end up with the actual configured state, +better than what the config files say. You can then use the +a decent reflection of all enabled options that (probably) came from +resulting config.ini to produce more exact configuration files. +''' +def enabled_defines(filepath): + outdict = {} + section = "user" + spatt = re.compile(r".*@section +([-a-zA-Z0-9_\s]+)$") # must match @section ... + f = open(filepath, encoding="utf8").read().split("\n") + + # Get the full contents of the file and remove all block comments. + # This will avoid false positives from #defines in comments + f = re.sub(r'/\*.*?\*/', '', '\n'.join(f), flags=re.DOTALL).split("\n") + a = [] for line in f: sline = line.strip() + m = re.match(spatt, sline) # @section ... + if m: + section = m.group(1).strip() + continue if sline[:7] == "#define": # Extract the key here (we don't care about the value) kv = sline[8:].strip().split() - a.append(kv[0]) - return a + outdict[kv[0]] = { 'name':kv[0], 'section': section } + return outdict # Compute the SHA256 hash of a file def get_file_sha256sum(filepath): @@ -44,25 +74,25 @@ def compress_file(filepath, storedname, outpath): with zipfile.ZipFile(outpath, 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf: zipf.write(filepath, arcname=storedname, compress_type=zipfile.ZIP_BZIP2, compresslevel=9) -# -# Compute the build signature by extracting all configuration settings and -# building a unique reversible signature that can be included in the binary. -# The signature can be reversed to get a 1:1 equivalent configuration file. -# +''' +Compute the build signature by extracting all configuration settings and +building a unique reversible signature that can be included in the binary. +The signature can be reversed to get a 1:1 equivalent configuration file. +''' def compute_build_signature(env): - if 'BUILD_SIGNATURE' in env: - return + if 'BUILD_SIGNATURE' in env: return + env.Append(BUILD_SIGNATURE=1) build_path = Path(env['PROJECT_BUILD_DIR'], env['PIOENV']) marlin_json = build_path / 'marlin_config.json' marlin_zip = build_path / 'mc.zip' # Definitions from these files will be kept - files_to_keep = [ 'Marlin/Configuration.h', 'Marlin/Configuration_adv.h' ] + header_paths = [ 'Marlin/Configuration.h', 'Marlin/Configuration_adv.h' ] # Check if we can skip processing hashes = '' - for header in files_to_keep: + for header in header_paths: hashes += get_file_sha256sum(header)[0:10] # Read a previously exported JSON file @@ -77,121 +107,211 @@ def compute_build_signature(env): except: pass - # Get enabled config options based on preprocessor - from preprocessor import run_preprocessor - complete_cfg = run_preprocessor(env) - - # Dumb #define extraction from the configuration files + # Extract "enabled" #define lines by scraping the configuration files. + # This data also contains the @section for each option. conf_defines = {} - all_defines = [] - for header in files_to_keep: - defines = extract_defines(header) - # To filter only the define we want - all_defines += defines - # To remember from which file it cames from - conf_defines[header.split('/')[-1]] = defines + conf_names = [] + for hpath in header_paths: + # Get defines in the form of { name: { name:..., section:... }, ... } + defines = enabled_defines(hpath) + # Get all unique define names into a flat array + conf_names += defines.keys() + # Remember which file these defines came from + conf_defines[hpath.split('/')[-1]] = defines + + # Get enabled config options based on running GCC to preprocess the config files. + # The result is a list of line strings, each starting with '#define'. + from preprocessor import run_preprocessor + build_output = run_preprocessor(env) + # Dumb regex to filter out some dumb macros r = re.compile(r"\(+(\s*-*\s*_.*)\)+") - # First step is to collect all valid macros - defines = {} - for line in complete_cfg: - - # Split the define from the value + # Extract all the #define lines in the build output as key/value pairs + build_defines = {} + for line in build_output: + # Split the define from the value. key_val = line[8:].strip().decode().split(' ') key, value = key_val[0], ' '.join(key_val[1:]) - # Ignore values starting with two underscore, since it's low level - if len(key) > 2 and key[0:2] == "__" : - continue - # Ignore values containing a parenthesis (likely a function macro) - if '(' in key and ')' in key: - continue - + if len(key) > 2 and key[0:2] == "__": continue + # Ignore values containing parentheses (likely a function macro) + if '(' in key and ')' in key: continue # Then filter dumb values - if r.match(value): - continue + if r.match(value): continue - defines[key] = value if len(value) else "" + build_defines[key] = value if len(value) else "" # # Continue to gather data for CONFIGURATION_EMBEDDING or CONFIG_EXPORT # - if not ('CONFIGURATION_EMBEDDING' in defines or 'CONFIG_EXPORT' in defines): + if not ('CONFIGURATION_EMBEDDING' in build_defines or 'CONFIG_EXPORT' in build_defines): return - # Second step is to filter useless macro - resolved_defines = {} - for key in defines: + # Filter out useless macros from the output + cleaned_build_defines = {} + for key in build_defines: # Remove all boards now - if key.startswith("BOARD_") and key != "BOARD_INFO_NAME": - continue + if key.startswith("BOARD_") and key != "BOARD_INFO_NAME": continue # Remove all keys ending by "_T_DECLARED" as it's a copy of extraneous system stuff - if key.endswith("_T_DECLARED"): - continue + if key.endswith("_T_DECLARED"): continue # Remove keys that are not in the #define list in the Configuration list - if key not in all_defines + [ 'DETAILED_BUILD_VERSION', 'STRING_DISTRIBUTION_DATE' ]: - continue - - # Don't be that smart guy here - resolved_defines[key] = defines[key] - - # Generate a build signature now - # We are making an object that's a bit more complex than a basic dictionary here - data = {} - data['__INITIAL_HASH'] = hashes - # First create a key for each header here + if key not in conf_names + [ 'DETAILED_BUILD_VERSION', 'STRING_DISTRIBUTION_DATE' ]: continue + # Add to a new dictionary for simplicity + cleaned_build_defines[key] = build_defines[key] + + # And we only care about defines that (most likely) came from the config files + # Build a dictionary of dictionaries with keys: 'name', 'section', 'value' + # { 'file1': { 'option': { 'name':'option', 'section':..., 'value':... }, ... }, 'file2': { ... } } + real_config = {} for header in conf_defines: - data[header] = {} - - # Then populate the object where each key is going to (that's a O(N^2) algorithm here...) - for key in resolved_defines: - for header in conf_defines: + real_config[header] = {} + for key in cleaned_build_defines: if key in conf_defines[header]: - data[header][key] = resolved_defines[key] + if key[0:2] == '__': continue + val = cleaned_build_defines[key] + real_config[header][key] = { 'file':header, 'name': key, 'value': val, 'section': conf_defines[header][key]['section']} - # Every python needs this toy def tryint(key): - try: - return int(defines[key]) - except: - return 0 + try: return int(build_defines[key]) + except: return 0 + # Get the CONFIG_EXPORT value and do an extended dump if > 100 + # For example, CONFIG_EXPORT 102 will make a 'config.ini' with a [config:] group for each schema @section config_dump = tryint('CONFIG_EXPORT') + extended_dump = config_dump > 100 + if extended_dump: config_dump -= 100 # # Produce an INI file if CONFIG_EXPORT == 2 # if config_dump == 2: print("Generating config.ini ...") + + ini_fmt = '{0:40} = {1}' + ext_fmt = '{0:40} {1}' + ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXPORT') + + if extended_dump: + # Extended export will dump config options by section + + # We'll use Schema class to get the sections + try: + conf_schema = schema.extract() + except Exception as exc: + print("Error: " + str(exc)) + exit(1) + + # Then group options by schema @section + sections = {} + for header in real_config: + for name in real_config[header]: + #print(f" name: {name}") + if name not in ignore: + ddict = real_config[header][name] + #print(f" real_config[{header}][{name}]:", ddict) + sect = ddict['section'] + if sect not in sections: sections[sect] = {} + sections[sect][name] = ddict + + # Get all sections as a list of strings, with spaces and dashes replaced by underscores + long_list = [ re.sub(r'[- ]+', '_', x).lower() for x in sections.keys() ] + # Make comma-separated lists of sections with 64 characters or less + sec_lines = [] + while len(long_list): + line = long_list.pop(0) + ', ' + while len(long_list) and len(line) + len(long_list[0]) < 64 - 1: + line += long_list.pop(0) + ', ' + sec_lines.append(line.strip()) + sec_lines[-1] = sec_lines[-1][:-1] # Remove the last comma + + else: + sec_lines = ['all'] + + # Build the ini_use_config item + sec_list = ini_fmt.format('ini_use_config', sec_lines[0]) + for line in sec_lines[1:]: sec_list += '\n' + ext_fmt.format('', line) + config_ini = build_path / 'config.ini' with config_ini.open('w') as outfile: - ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXPORT') filegrp = { 'Configuration.h':'config:basic', 'Configuration_adv.h':'config:advanced' } - vers = defines["CONFIGURATION_H_VERSION"] + vers = build_defines["CONFIGURATION_H_VERSION"] dt_string = datetime.now().strftime("%Y-%m-%d at %H:%M:%S") - ini_fmt = '{0:40}{1}\n' + outfile.write( - '#\n' - + '# Marlin Firmware\n' - + '# config.ini - Options to apply before the build\n' - + '#\n' - + f'# Generated by Marlin build on {dt_string}\n' - + '#\n' - + '\n' - + '[config:base]\n' - + ini_fmt.format('ini_use_config', ' = all') - + ini_fmt.format('ini_config_vers', f' = {vers}') - ) - # Loop through the data array of arrays - for header in data: - if header.startswith('__'): - continue - outfile.write('\n[' + filegrp[header] + ']\n') - for key in sorted(data[header]): - if key not in ignore: - val = 'on' if data[header][key] == '' else data[header][key] - outfile.write(ini_fmt.format(key.lower(), ' = ' + val)) +f'''# +# Marlin Firmware +# config.ini - Options to apply before the build +# +# Generated by Marlin build on {dt_string} +# +[config:base] +# +# ini_use_config - A comma-separated list of actions to apply to the Configuration files. +# The actions will be applied in the listed order. +# - none +# Ignore this file and don't apply any configuration options +# +# - base +# Just apply the options in config:base to the configuration +# +# - minimal +# Just apply the options in config:minimal to the configuration +# +# - all +# Apply all 'config:*' sections in this file to the configuration +# +# - another.ini +# Load another INI file with a path relative to this config.ini file (i.e., within Marlin/) +# +# - https://me.myserver.com/path/to/configs +# Fetch configurations from any URL. +# +# - example/Creality/Ender-5 Plus @ bugfix-2.1.x +# Fetch example configuration files from the MarlinFirmware/Configurations repository +# https://raw.githubusercontent.com/MarlinFirmware/Configurations/bugfix-2.1.x/config/examples/Creality/Ender-5%20Plus/ +# +# - example/default @ release-2.0.9.7 +# Fetch default configuration files from the MarlinFirmware/Configurations repository +# https://raw.githubusercontent.com/MarlinFirmware/Configurations/release-2.0.9.7/config/default/ +# +# - [disable] +# Comment out all #defines in both Configuration.h and Configuration_adv.h. This is useful +# to start with a clean slate before applying any config: options, so only the options explicitly +# set in config.ini will be enabled in the configuration. +# +# - [flatten] (Not yet implemented) +# Produce a flattened set of Configuration.h and Configuration_adv.h files with only the enabled +# #defines and no comments. A clean look, but context-free. +# +{sec_list} +{ini_fmt.format('ini_config_vers', vers)} +''' ) + + if extended_dump: + + # Loop through the sections + for skey in sorted(sections): + #print(f" skey: {skey}") + sani = re.sub(r'[- ]+', '_', skey).lower() + outfile.write(f"\n[config:{sani}]\n") + opts = sections[skey] + for name in sorted(opts): + val = opts[name]['value'] + if val == '': val = 'on' + #print(f" {name} = {val}") + outfile.write(ini_fmt.format(name.lower(), val) + '\n') + + else: + + # Standard export just dumps config:basic and config:advanced sections + for header in real_config: + outfile.write(f'\n[{filegrp[header]}]\n') + for name in sorted(real_config[header]): + if name not in ignore: + val = real_config[header][name]['value'] + if val == '': val = 'on' + outfile.write(ini_fmt.format(name.lower(), val) + '\n') # # CONFIG_EXPORT 3 = schema.json, 4 = schema.yml @@ -229,28 +349,51 @@ def tryint(key): import yaml schema.dump_yaml(conf_schema, build_path / 'schema.yml') - # Append the source code version and date - data['VERSION'] = {} - data['VERSION']['DETAILED_BUILD_VERSION'] = resolved_defines['DETAILED_BUILD_VERSION'] - data['VERSION']['STRING_DISTRIBUTION_DATE'] = resolved_defines['STRING_DISTRIBUTION_DATE'] - try: - curver = subprocess.check_output(["git", "describe", "--match=NeVeRmAtCh", "--always"]).strip() - data['VERSION']['GIT_REF'] = curver.decode() - except: - pass - # # Produce a JSON file for CONFIGURATION_EMBEDDING or CONFIG_EXPORT == 1 # Skip if an identical JSON file was already present. # - if not same_hash and (config_dump == 1 or 'CONFIGURATION_EMBEDDING' in defines): + if not same_hash and (config_dump == 1 or 'CONFIGURATION_EMBEDDING' in build_defines): with marlin_json.open('w') as outfile: - json.dump(data, outfile, separators=(',', ':')) + + json_data = {} + if extended_dump: + print("Extended dump ...") + for header in real_config: + confs = real_config[header] + json_data[header] = {} + for name in confs: + c = confs[name] + s = c['section'] + if s not in json_data[header]: json_data[header][s] = {} + json_data[header][s][name] = c['value'] + else: + for header in real_config: + conf = real_config[header] + print(f"real_config[{header}]", conf) + for name in conf: + json_data[name] = conf[name]['value'] + + json_data['__INITIAL_HASH'] = hashes + + # Append the source code version and date + json_data['VERSION'] = { + 'DETAILED_BUILD_VERSION': cleaned_build_defines['DETAILED_BUILD_VERSION'], + 'STRING_DISTRIBUTION_DATE': cleaned_build_defines['STRING_DISTRIBUTION_DATE'] + } + try: + curver = subprocess.check_output(["git", "describe", "--match=NeVeRmAtCh", "--always"]).strip() + json_data['VERSION']['GIT_REF'] = curver.decode() + except: + pass + + json.dump(json_data, outfile, separators=(',', ':')) # # The rest only applies to CONFIGURATION_EMBEDDING # - if not 'CONFIGURATION_EMBEDDING' in defines: + if not 'CONFIGURATION_EMBEDDING' in build_defines: + (build_path / 'mc.zip').unlink(missing_ok=True) return # Compress the JSON file as much as we can @@ -269,10 +412,8 @@ def tryint(key): for b in (build_path / 'mc.zip').open('rb').read(): result_file.write(b' 0x%02X,' % b) count += 1 - if count % 16 == 0: - result_file.write(b'\n ') - if count % 16: - result_file.write(b'\n') + if count % 16 == 0: result_file.write(b'\n ') + if count % 16: result_file.write(b'\n') result_file.write(b'};\n') if __name__ == "__main__": From 19617b79dbf5aedc62d5124c28e687c92d8a7e09 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 21 Dec 2023 06:06:34 +0000 Subject: [PATCH 021/236] [cron] Bump distribution date (2023-12-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 4c10607eefa1..f3e34d8702a8 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-12-20" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 e21fe4c6e94e..abd5973f3398 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-12-20" + #define STRING_DISTRIBUTION_DATE "2023-12-21" #endif /** From 401ba6613b1f9079ebd392adc8b0692c1525ab4f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 21 Dec 2023 15:25:48 -0600 Subject: [PATCH 022/236] =?UTF-8?q?=F0=9F=94=A7=20Up=20to=2012=20PWM=20fan?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 51 +++++++++++++++---------- Marlin/src/lcd/dogm/dogm_Statusscreen.h | 22 ++++++----- 2 files changed, 44 insertions(+), 29 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 85b3a22cbf73..42379506ced7 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2473,11 +2473,7 @@ #define COOLER_MAX_TARGET (COOLER_MAXTEMP - (COOLER_OVERSHOOT)) #endif -#if HAS_HEATED_BED || HAS_TEMP_CHAMBER - #define BED_OR_CHAMBER 1 -#endif - -#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER || HAS_TEMP_BOARD || HAS_TEMP_SOC +#if HAS_TEMP_HOTEND || HAS_HEATED_BED || HAS_TEMP_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER || HAS_TEMP_BOARD || HAS_TEMP_SOC #define HAS_TEMP_SENSOR 1 #endif @@ -2644,11 +2640,13 @@ #endif #endif -// Print Cooling fans (limit) +/** + * Up to 12 PWM fans + */ #ifdef NUM_M106_FANS #define MAX_FANS NUM_M106_FANS #else - #define MAX_FANS 8 // Max supported fans + #define MAX_FANS 12 // Max supported fans #endif #define _IS_E_AUTO(N,F) (PIN_EXISTS(E##N##_AUTO_FAN) && E##N##_AUTO_FAN_PIN == FAN##F##_PIN) @@ -2683,21 +2681,30 @@ #if _HAS_FAN(7) #define HAS_FAN7 1 #endif -#undef _NOT_E_AUTO -#undef _HAS_FAN - -#if BED_OR_CHAMBER || HAS_FAN0 - #define BED_OR_CHAMBER_OR_FAN 1 +#if _HAS_FAN(8) + #define HAS_FAN8 1 #endif - -/** - * Up to 8 PWM fans - */ -#ifndef FAN_INVERTING - #define FAN_INVERTING false +#if _HAS_FAN(9) + #define HAS_FAN9 1 #endif - -#if HAS_FAN7 +#if _HAS_FAN(10) + #define HAS_FAN10 1 +#endif +#if _HAS_FAN(11) + #define HAS_FAN11 1 +#endif +#undef _HAS_FAN +#undef _IS_E_AUTO + +#if HAS_FAN11 + #define FAN_COUNT 12 +#elif HAS_FAN10 + #define FAN_COUNT 11 +#elif HAS_FAN9 + #define FAN_COUNT 10 +#elif HAS_FAN8 + #define FAN_COUNT 9 +#elif HAS_FAN7 #define FAN_COUNT 8 #elif HAS_FAN6 #define FAN_COUNT 7 @@ -2721,6 +2728,10 @@ #define HAS_FAN 1 #endif +#ifndef FAN_INVERTING + #define FAN_INVERTING false +#endif + #if PIN_EXISTS(FANMUX0) #define HAS_FANMUX 1 // Part Cooling fan multipliexer #endif diff --git a/Marlin/src/lcd/dogm/dogm_Statusscreen.h b/Marlin/src/lcd/dogm/dogm_Statusscreen.h index 9eec9d198717..c8edae94f142 100644 --- a/Marlin/src/lcd/dogm/dogm_Statusscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Statusscreen.h @@ -143,7 +143,7 @@ // Can also be overridden in Configuration_adv.h // If you can afford it, try the 3-frame fan animation! // Don't compile in the fan animation with no fan -#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || ALL(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER)) +#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && (HAS_HEATED_BED || HAS_TEMP_CHAMBER)) || ALL(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER)) #undef STATUS_FAN_FRAMES #elif !STATUS_FAN_FRAMES #define STATUS_FAN_FRAMES 2 @@ -200,18 +200,22 @@ #undef STATUS_LOGO_WIDTH #endif - #if !defined(STATUS_HEATERS_X) && ((HAS_HOTEND && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN)) - #define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2) - #if STATUS_HOTEND1_WIDTH - #if HOTENDS > 2 - #define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 6) + #ifndef STATUS_HEATERS_X + #define _BED_OR_CHAMBER_OR_FAN (HAS_HEATED_BED || HAS_TEMP_CHAMBER || HAS_FAN) + #if (HAS_HOTEND && STATUS_LOGO_WIDTH && _BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !_BED_OR_CHAMBER_OR_FAN) + #define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2) + #if STATUS_HOTEND1_WIDTH + #if HOTENDS > 2 + #define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 6) + #else + #define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 4) + #endif #else - #define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 4) + #define STATUS_HEATERS_X _STATUS_HEATERS_X(1, STATUS_HEATERS_WIDTH, 4) #endif - #else - #define STATUS_HEATERS_X _STATUS_HEATERS_X(1, STATUS_HEATERS_WIDTH, 4) #endif #endif + #undef _BED_OR_CHAMBER_OR_FAN #endif // From c18294d83cc891c47d5abe56a4842adbe6fbb1aa Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 21 Dec 2023 15:30:03 -0600 Subject: [PATCH 023/236] =?UTF-8?q?=F0=9F=94=A7=20Optional=20FAN=5FINVERTI?= =?UTF-8?q?NG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 4 ---- Marlin/src/module/temperature.cpp | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 42379506ced7..04e96177b5d1 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2728,10 +2728,6 @@ #define HAS_FAN 1 #endif -#ifndef FAN_INVERTING - #define FAN_INVERTING false -#endif - #if PIN_EXISTS(FANMUX0) #define HAS_FANMUX 1 // Part Cooling fan multipliexer #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index fc9e08fe7cac..afde7d3b3497 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -370,9 +370,9 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); // Init fans according to whether they're native PWM or Software PWM #ifdef BOARD_OPENDRAIN_MOSFETS - #define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, FAN_INVERTING ? LOW : HIGH) + #define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, ENABLED(FAN_INVERTING) ? LOW : HIGH) #else - #define _INIT_SOFT_FAN(P) OUT_WRITE(P, FAN_INVERTING ? LOW : HIGH) + #define _INIT_SOFT_FAN(P) OUT_WRITE(P, ENABLED(FAN_INVERTING) ? LOW : HIGH) #endif #if ENABLED(FAN_SOFT_PWM) #define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P) @@ -3819,7 +3819,7 @@ void Temperature::isr() { static SoftPWM soft_pwm_controller; #endif - #define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ FAN_INVERTING) + #define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ ENABLED(FAN_INVERTING)) #if DISABLED(SLOW_PWM_HEATERS) From dbdb2ecdf756e657322977911460f43e76a9962b Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 22 Dec 2023 00:21:13 +0000 Subject: [PATCH 024/236] [cron] Bump distribution date (2023-12-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 f3e34d8702a8..bdce222e8692 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-12-21" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 abd5973f3398..7c8ba14665b6 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-12-21" + #define STRING_DISTRIBUTION_DATE "2023-12-22" #endif /** From 2c5468ce333cd4a8c6ddfde8d4ad66d8417f32bd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 21 Dec 2023 22:34:19 -0600 Subject: [PATCH 025/236] =?UTF-8?q?=F0=9F=8E=A8=20Planner=20indent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/planner.cpp | 69 ++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 64c47301f58a..f7ab42ad8164 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -257,11 +257,15 @@ void Planner::init() { position.reset(); TERN_(HAS_POSITION_FLOAT, position_float.reset()); TERN_(IS_KINEMATIC, position_cart.reset()); + previous_speed.reset(); previous_nominal_speed = 0; + TERN_(ABL_PLANAR, bed_level_matrix.set_to_identity()); + clear_block_buffer(); delay_before_delivering = 0; + #if ENABLED(DIRECT_STEPPING) last_page_step_rate = 0; last_page_dir.reset(); @@ -1970,23 +1974,21 @@ bool Planner::_populate_block( dm.hy = (dist.b > 0); // ...and Y TERN_(HAS_Z_AXIS, dm.z = (dist.c > 0)); #endif - #if IS_CORE - #if CORE_IS_XY - dm.a = (dist.a + dist.b > 0); // Motor A direction - dm.b = (CORESIGN(dist.a - dist.b) > 0); // Motor B direction - #elif CORE_IS_XZ - dm.hx = (dist.a > 0); // Save the toolhead's true direction in X - dm.y = (dist.b > 0); - dm.hz = (dist.c > 0); // ...and Z - dm.a = (dist.a + dist.c > 0); // Motor A direction - dm.c = (CORESIGN(dist.a - dist.c) > 0); // Motor C direction - #elif CORE_IS_YZ - dm.x = (dist.a > 0); - dm.hy = (dist.b > 0); // Save the toolhead's true direction in Y - dm.hz = (dist.c > 0); // ...and Z - dm.b = (dist.b + dist.c > 0); // Motor B direction - dm.c = (CORESIGN(dist.b - dist.c) > 0); // Motor C direction - #endif + #if CORE_IS_XY + dm.a = (dist.a + dist.b > 0); // Motor A direction + dm.b = (CORESIGN(dist.a - dist.b) > 0); // Motor B direction + #elif CORE_IS_XZ + dm.hx = (dist.a > 0); // Save the toolhead's true direction in X + dm.y = (dist.b > 0); + dm.hz = (dist.c > 0); // ...and Z + dm.a = (dist.a + dist.c > 0); // Motor A direction + dm.c = (CORESIGN(dist.a - dist.c) > 0); // Motor C direction + #elif CORE_IS_YZ + dm.x = (dist.a > 0); + dm.hy = (dist.b > 0); // Save the toolhead's true direction in Y + dm.hz = (dist.c > 0); // ...and Z + dm.b = (dist.b + dist.c > 0); // Motor B direction + dm.c = (CORESIGN(dist.b - dist.c) > 0); // Motor C direction #elif ENABLED(MARKFORGED_XY) dm.a = (dist.a TERN(MARKFORGED_INVERSE, -, +) dist.b > 0); // Motor A direction dm.b = (dist.b > 0); // Motor B direction @@ -2090,23 +2092,21 @@ bool Planner::_populate_block( dist_mm.head.y = dist.b * mm_per_step[B_AXIS]; TERN_(HAS_Z_AXIS, dist_mm.z = dist.c * mm_per_step[Z_AXIS]); #endif - #if IS_CORE - #if CORE_IS_XY - dist_mm.a = (dist.a + dist.b) * mm_per_step[A_AXIS]; - dist_mm.b = CORESIGN(dist.a - dist.b) * mm_per_step[B_AXIS]; - #elif CORE_IS_XZ - dist_mm.head.x = dist.a * mm_per_step[A_AXIS]; - dist_mm.y = dist.b * mm_per_step[Y_AXIS]; - dist_mm.head.z = dist.c * mm_per_step[C_AXIS]; - dist_mm.a = (dist.a + dist.c) * mm_per_step[A_AXIS]; - dist_mm.c = CORESIGN(dist.a - dist.c) * mm_per_step[C_AXIS]; - #elif CORE_IS_YZ - dist_mm.x = dist.a * mm_per_step[X_AXIS]; - dist_mm.head.y = dist.b * mm_per_step[B_AXIS]; - dist_mm.head.z = dist.c * mm_per_step[C_AXIS]; - dist_mm.b = (dist.b + dist.c) * mm_per_step[B_AXIS]; - dist_mm.c = CORESIGN(dist.b - dist.c) * mm_per_step[C_AXIS]; - #endif + #if CORE_IS_XY + dist_mm.a = (dist.a + dist.b) * mm_per_step[A_AXIS]; + dist_mm.b = CORESIGN(dist.a - dist.b) * mm_per_step[B_AXIS]; + #elif CORE_IS_XZ + dist_mm.head.x = dist.a * mm_per_step[A_AXIS]; + dist_mm.y = dist.b * mm_per_step[Y_AXIS]; + dist_mm.head.z = dist.c * mm_per_step[C_AXIS]; + dist_mm.a = (dist.a + dist.c) * mm_per_step[A_AXIS]; + dist_mm.c = CORESIGN(dist.a - dist.c) * mm_per_step[C_AXIS]; + #elif CORE_IS_YZ + dist_mm.x = dist.a * mm_per_step[X_AXIS]; + dist_mm.head.y = dist.b * mm_per_step[B_AXIS]; + dist_mm.head.z = dist.c * mm_per_step[C_AXIS]; + dist_mm.b = (dist.b + dist.c) * mm_per_step[B_AXIS]; + dist_mm.c = CORESIGN(dist.b - dist.c) * mm_per_step[C_AXIS]; #elif ENABLED(MARKFORGED_XY) dist_mm.a = (dist.a TERN(MARKFORGED_INVERSE, +, -) dist.b) * mm_per_step[A_AXIS]; dist_mm.b = dist.b * mm_per_step[B_AXIS]; @@ -2540,6 +2540,7 @@ bool Planner::_populate_block( #if DISABLED(S_CURVE_ACCELERATION) block->acceleration_rate = (uint32_t)(accel * (float(1UL << 24) / (STEPPER_TIMER_RATE))); #endif + #if ENABLED(LIN_ADVANCE) block->la_advance_rate = 0; block->la_scaling = 0; From ec7ab5a277a0210e1349f9e8608c372e40fdb6e6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 21 Dec 2023 22:35:51 -0600 Subject: [PATCH 026/236] =?UTF-8?q?=F0=9F=94=A8=20Build=20flag=20tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/macros.h | 11 ++++++----- ini/avr.ini | 4 ++-- ini/stm32f1-maple.ini | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index beb6bfe3e9a5..784002c769c4 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -37,11 +37,12 @@ #define FORCE_INLINE __attribute__((always_inline)) inline #define NO_INLINE __attribute__((noinline)) #define _UNUSED __attribute__((unused)) -#define __O0 __attribute__((optimize("O0"))) -#define __Os __attribute__((optimize("Os"))) -#define __O1 __attribute__((optimize("O1"))) -#define __O2 __attribute__((optimize("O2"))) -#define __O3 __attribute__((optimize("O3"))) +#define __O0 __attribute__((optimize("O0"))) // No optimization and less debug info +#define __Og __attribute__((optimize("Og"))) // Optimize the debugging experience +#define __Os __attribute__((optimize("Os"))) // Optimize for size +#define __O1 __attribute__((optimize("O1"))) // Try to reduce size and cycles; nothing that takes a lot of time to compile +#define __O2 __attribute__((optimize("O2"))) // Optimize even more +#define __O3 __attribute__((optimize("O3"))) // Optimize yet more #define IS_CONSTEXPR(...) __builtin_constant_p(__VA_ARGS__) // Only valid solution with C++14. Should use std::is_constant_evaluated() in C++20 instead diff --git a/ini/avr.ini b/ini/avr.ini index 7c5f369dc6d7..f2f0658d842f 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -14,8 +14,8 @@ # [common_avr8] platform = atmelavr@~4.0.1 -build_flags = ${common.build_flags} -Wl,--relax -build_src_flags = -std=gnu++1z +build_flags = ${common.build_flags} -std=gnu++1z -Wl,--relax +build_unflags = -std=gnu++11 board_build.f_cpu = 16000000L build_src_filter = ${common.default_src_filter} + diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index a113d1a7b154..16563fcc9105 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -326,7 +326,7 @@ extends = STM32F1_maple board = marlin_malyanM200 build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections - -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__ + -Wl,--gc-sections -DDEBUG_LEVEL=0 lib_ignore = ${STM32F1_maple.lib_ignore} SoftwareSerialM From 56ac5d03ed0901b721d816a41126854a96b1d67f Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:57:06 -0500 Subject: [PATCH 027/236] =?UTF-8?q?=F0=9F=9A=B8=20Update=20ProUI=20Plot=20?= =?UTF-8?q?graph=20(#26539)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 13 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 174 ++++++++++++++++------- Marlin/src/lcd/e3v2/proui/dwin.h | 1 + Marlin/src/lcd/e3v2/proui/dwin_defines.h | 3 + Marlin/src/lcd/e3v2/proui/plot.cpp | 48 ++++--- Marlin/src/lcd/e3v2/proui/plot.h | 11 +- Marlin/src/lcd/language/language_en.h | 2 + buildroot/share/dwin/bin/DWIN_ICO.py | 39 +++-- 8 files changed, 199 insertions(+), 92 deletions(-) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 3efbb67a0cd5..1824ac58c9b6 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -792,10 +792,17 @@ #endif /** - * ProUI Boot Screen Duration + * ProUI Extras */ -#if ENABLED(DWIN_LCD_PROUI) && BOOTSCREEN_TIMEOUT > 2000 - #warning "For ProUI the original BOOTSCREEN_TIMEOUT of 1100 is recommended." +#if ENABLED(DWIN_LCD_PROUI) + #if BOOTSCREEN_TIMEOUT > 2000 + #warning "For ProUI the original BOOTSCREEN_TIMEOUT of 1100 is recommended." + #endif + #if HAS_PID_HEATING && NONE(PID_AUTOTUNE_MENU, PID_EDIT_MENU) + #warning "For ProUI PID_AUTOTUNE_MENU and PID_EDIT_MENU is recommended for PID tuning." + #elif ENABLED(MPCTEMP) && NONE(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) + #warning "For ProUI MPC_EDIT_MENU and MPC_AUTOTUNE_MENU is recommended for MPC tuning." + #endif #endif /** diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 8d54e0c582ec..fcebdb8c5726 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -735,7 +735,7 @@ void _drawIconBlink(bool &flag, const bool sensor, const uint8_t icon1, const ui void _drawZOffsetIcon() { #if HAS_LEVELING static bool _leveling_active = false; - _drawIconBlink(_leveling_active, planner.leveling_active, ICON_Zoffset, ICON_SetZOffset, 186, 416); + _drawIconBlink(_leveling_active, planner.leveling_active, ICON_Zoffset, ICON_SetZOffset, 187, 416); #else DWINUI::drawIcon(ICON_Zoffset, 187, 416); #endif @@ -763,9 +763,9 @@ void _drawFeedrate() { } void _drawXYZPosition(const bool force) { - _update_axis_value(X_AXIS, 27, 459, force); - _update_axis_value(Y_AXIS, 112, 459, force); - _update_axis_value(Z_AXIS, 197, 459, force); + _update_axis_value(X_AXIS, 27, 457, force); + _update_axis_value(Y_AXIS, 112, 457, force); + _update_axis_value(Z_AXIS, 197, 457, force); } void updateVariable() { @@ -778,7 +778,18 @@ void updateVariable() { _new_hotend_target = _hotendtarget != ht; if (_new_hotend_temp) _hotendtemp = hc; if (_new_hotend_target) _hotendtarget = ht; - #endif + + // if hotend is near target or heating, ICON indicates hot + if (thermalManager.degHotendNear(0, ht) || thermalManager.isHeatingHotend(0)) { + dwinDrawBox(1, hmiData.colorBackground, 10, 383, 20, 20); + DWINUI::drawIcon(ICON_SetEndTemp, 10, 383); + } + else { + dwinDrawBox(1, hmiData.colorBackground, 10, 383, 20, 20); + DWINUI::drawIcon(ICON_HotendTemp, 10, 383); + } + #endif // HAS_HOTEND + #if HAS_HEATED_BED static celsius_t _bedtemp = 0, _bedtarget = 0; const celsius_t bc = thermalManager.wholeDegBed(), @@ -787,7 +798,18 @@ void updateVariable() { _new_bed_target = _bedtarget != bt; if (_new_bed_temp) _bedtemp = bc; if (_new_bed_target) _bedtarget = bt; - #endif + + // if bed is near target, heating, or if degrees > 44, ICON indicates hot + if (thermalManager.degBedNear(bt) || thermalManager.isHeatingBed() || (bc > 44)) { + dwinDrawBox(1, hmiData.colorBackground, 10, 416, 20, 20); + DWINUI::drawIcon(ICON_BedTemp, 10, 416); + } + else { + dwinDrawBox(1, hmiData.colorBackground, 10, 416, 20, 20); + DWINUI::drawIcon(ICON_SetBedTemp, 10, 416); + } + #endif // HAS_HEATED_BED + #if HAS_FAN static uint8_t _fanspeed = 0; const bool _new_fanspeed = _fanspeed != thermalManager.fan_speed[0]; @@ -1022,9 +1044,9 @@ void dwinDrawDashboard() { dwinDrawRectangle(1, hmiData.colorBackground, 0, STATUS_Y + 21, DWIN_WIDTH, DWIN_HEIGHT - 1); dwinDrawRectangle(1, hmiData.colorSplitLine, 0, 449, DWIN_WIDTH, 451); - DWINUI::drawIcon(ICON_MaxSpeedX, 10, 456); - DWINUI::drawIcon(ICON_MaxSpeedY, 95, 456); - DWINUI::drawIcon(ICON_MaxSpeedZ, 180, 456); + DWINUI::drawIcon(ICON_MaxSpeedX, 10, 454); + DWINUI::drawIcon(ICON_MaxSpeedY, 95, 454); + DWINUI::drawIcon(ICON_MaxSpeedZ, 180, 454); _drawXYZPosition(true); #if HAS_HOTEND @@ -1033,7 +1055,7 @@ void dwinDrawDashboard() { DWINUI::drawString(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); DWINUI::drawInt(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); - DWINUI::drawIcon(ICON_StepE, 112, 417); + DWINUI::drawIcon(ICON_StepE, 113, 416); DWINUI::drawInt(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); DWINUI::drawString(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); #endif @@ -1269,6 +1291,16 @@ void eachMomentUpdate() { TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) plot.update(thermalManager.wholeDegBed())); } TERN_(MPCTEMP, if (checkkey == ID_MPCProcess) plot.update(thermalManager.wholeDegHotend(0))); + #if ENABLED(PROUI_ITEM_PLOT) + if (checkkey == ID_PlotProcess) { + TERN_(PIDTEMP, if (hmiValue.tempControl == PIDTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); }) + TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) { plot.update(thermalManager.wholeDegBed()); }) + TERN_(MPCTEMP, if (hmiValue.tempControl == MPCTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); }) + if (hmiFlag.abort_flag || hmiFlag.pause_flag || print_job_timer.isPaused()) { + hmiReturnScreen(); + } + } + #endif #endif } @@ -1402,29 +1434,32 @@ void dwinHandleScreen() { case ID_SetIntNoDraw: hmiSetNoDraw(); break; case ID_PrintProcess: hmiPrinting(); break; case ID_Popup: hmiPopup(); break; - case ID_Leveling: break; #if HAS_LOCKSCREEN case ID_Locked: hmiLockScreen(); break; #endif - case ID_PrintDone: + TERN_(HAS_ESDIAG, case ID_ESDiagProcess:) + TERN_(PROUI_ITEM_PLOT, case ID_PlotProcess:) + case ID_PrintDone: case ID_WaitResponse: hmiWaitForUser(); break; + + TERN_(HAS_BED_PROBE, case ID_Leveling:) case ID_Homing: case ID_PIDProcess: - case ID_NothingToDo: break; + case ID_NothingToDo: default: break; } } bool idIsPopUp() { // If ID is popup... switch (checkkey) { + TERN_(HAS_BED_PROBE, case ID_Leveling:) + TERN_(HAS_ESDIAG, case ID_ESDiagProcess:) case ID_NothingToDo: case ID_WaitResponse: case ID_Popup: case ID_Homing: - case ID_Leveling: case ID_PIDProcess: - TERN_(HAS_ESDIAG, case ID_ESDiagProcess:) return true; default: break; } @@ -1439,8 +1474,9 @@ void hmiSaveProcessID(const uint8_t id) { case ID_Popup: case ID_WaitResponse: case ID_PrintDone: - case ID_Leveling: + TERN_(HAS_BED_PROBE, case ID_Leveling:) TERN_(HAS_ESDIAG, case ID_ESDiagProcess:) + TERN_(PROUI_ITEM_PLOT, case ID_PlotProcess:) wait_for_user = true; default: break; } @@ -1515,7 +1551,7 @@ void dwinLevelingDone() { celsius_t _maxtemp, _target; void dwinDrawPIDMPCPopup() { - constexpr frame_rect_t gfrm = { 40, 180, DWIN_WIDTH - 80, 120 }; + constexpr frame_rect_t gfrm = { 30, 150, DWIN_WIDTH - 60, 160 }; DWINUI::clearMainArea(); drawPopupBkgd(); @@ -1523,50 +1559,27 @@ void dwinLevelingDone() { default: return; #if ENABLED(MPC_AUTOTUNE) case MPCTEMP_START: - DWINUI::drawCenteredString(hmiData.colorPopupTxt, 100, GET_TEXT_F(MSG_MPC_AUTOTUNE)); - DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius")); - break; - #endif - #if ANY(PIDTEMP, PIDTEMPBED) - TERN_(PIDTEMP, case PIDTEMP_START:) - TERN_(PIDTEMPBED, case PIDTEMPBED_START:) - DWINUI::drawCenteredString(hmiData.colorPopupTxt, 100, GET_TEXT_F(MSG_PID_AUTOTUNE)); - DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); - break; - #endif - } - - switch (hmiValue.tempControl) { - default: break; - #if ANY(PIDTEMP, MPC_AUTOTUNE) - TERN_(PIDTEMP, case PIDTEMP_START:) - TERN_(MPC_AUTOTUNE, case MPCTEMP_START:) - DWINUI::drawCenteredString(hmiData.colorPopupTxt, 120, F("for Nozzle is running.")); - break; - #endif - #if ENABLED(PIDTEMPBED) - case PIDTEMPBED_START: - DWINUI::drawCenteredString(hmiData.colorPopupTxt, 120, F("for BED is running.")); - break; - #endif - } - - switch (hmiValue.tempControl) { - default: break; - #if ENABLED(MPC_AUTOTUNE) - case MPCTEMP_START: + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_MPC_AUTOTUNE)); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius")); + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, F("for NOZZLE is running.")); _maxtemp = thermalManager.hotend_maxtemp[0]; _target = 200; break; #endif #if ENABLED(PIDTEMP) case PIDTEMP_START: + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, F("for NOZZLE is running.")); _maxtemp = thermalManager.hotend_maxtemp[0]; _target = hmiData.hotendPidT; break; #endif #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, F("for BED is running.")); _maxtemp = BED_MAXTEMP; _target = hmiData.bedPidT; break; @@ -1574,9 +1587,58 @@ void dwinLevelingDone() { } plot.draw(gfrm, _maxtemp, _target); - DWINUI::drawInt(hmiData.colorPopupTxt, 3, gfrm.x + 90, gfrm.y - DWINUI::fontHeight() - 4, _target); + DWINUI::drawInt(false, 2, hmiData.colorStatusTxt, hmiData.colorPopupTxt, 3, gfrm.x + 92, gfrm.y - DWINUI::fontHeight() - 6, _target); } + // Plot Temperature Graph (PID Tuning Graph) + #if ENABLED(PROUI_ITEM_PLOT) + + void dwinDrawPlot(tempcontrol_t result) { + hmiValue.tempControl = result; + constexpr frame_rect_t gfrm = {30, 135, DWIN_WIDTH - 60, 160}; + DWINUI::clearMainArea(); + drawPopupBkgd(); + hmiSaveProcessID(ID_PlotProcess); + + switch (result) { + #if ENABLED(MPCTEMP) + case MPCTEMP_START: + #elif ENABLED(PIDTEMP) + case PIDTEMP_START: + #endif + title.showCaption(GET_TEXT_F(MSG_HOTEND_TEMP_GRAPH)); + DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, F("Nozzle Temperature")); + _maxtemp = thermalManager.hotend_max_target(0); + _target = thermalManager.degTargetHotend(0); + break; + #if ENABLED(PIDTEMPBED) + case PIDTEMPBED_START: + title.showCaption(GET_TEXT_F(MSG_BED_TEMP_GRAPH)); + DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, F("Bed Temperature")); + _maxtemp = BED_MAX_TARGET; + _target = thermalManager.degTargetBed(); + break; + #endif + default: break; + } + + dwinDrawString(false, 2, hmiData.colorPopupTxt, hmiData.colorPopupBg, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("Target: Celsius")); + plot.draw(gfrm, _maxtemp, _target); + DWINUI::drawInt(false, 2, hmiData.colorStatusTxt, hmiData.colorPopupBg, 3, gfrm.x + 80, gfrm.y - DWINUI::fontHeight() - 4, _target); + DWINUI::drawButton(BTN_Continue, 86, 305); + dwinUpdateLCD(); + } + + void drawHPlot() { + TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START);) + TERN_(MPCTEMP, dwinDrawPlot(MPCTEMP_START);) + } + void drawBPlot() { + TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START);) + } + + #endif // PROUI_ITEM_PLOT + #endif // PROUI_TUNING_GRAPH #if PROUI_PID_TUNE @@ -2993,7 +3055,7 @@ frame_rect_t selrect(frame_rect_t) { void drawPrepareMenu() { checkkey = ID_Menu; - if (SET_MENU_R(prepareMenu, selrect({133, 1, 28, 13}), MSG_PREPARE, 10 + PREHEAT_COUNT)) { + if (SET_MENU_R(prepareMenu, selrect({133, 1, 28, 13}), MSG_PREPARE, 12 + PREHEAT_COUNT)) { BACK_ITEM(gotoMainMenu); MENU_ITEM(ICON_FilMan, MSG_FILAMENT_MAN, onDrawSubMenu, drawFilamentManMenu); MENU_ITEM(ICON_Axis, MSG_MOVE_AXIS, onDrawMoveSubMenu, drawMoveMenu); @@ -3023,6 +3085,10 @@ void drawPrepareMenu() { REPEAT_1(PREHEAT_COUNT, _ITEM_PREHEAT) #endif MENU_ITEM(ICON_Cool, MSG_COOLDOWN, onDrawCooldown, doCoolDown); + #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot); + #endif MENU_ITEM(ICON_Language, MSG_UI_LANGUAGE, onDrawLanguage, setLanguage); } ui.reset_status(true); @@ -3304,7 +3370,7 @@ void drawFilSetMenu() { void drawTuneMenu() { checkkey = ID_Menu; - if (SET_MENU_R(tuneMenu, selrect({73, 2, 28, 12}), MSG_TUNE, 18)) { + if (SET_MENU_R(tuneMenu, selrect({73, 2, 28, 12}), MSG_TUNE, 20)) { BACK_ITEM(gotoPrintProcess); EDIT_ITEM(ICON_Speed, MSG_SPEED, onDrawSpeedItem, setSpeed, &feedrate_percentage); #if HAS_HOTEND @@ -3350,6 +3416,10 @@ void drawTuneMenu() { #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes); #endif + #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot); + #endif #if ENABLED(CASE_LIGHT_MENU) EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); #if CASELIGHT_USES_BRIGHTNESS diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 8706a18fac65..675c087074ac 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -67,6 +67,7 @@ enum processID : uint8_t { ID_WaitResponse, ID_Homing, ID_PIDProcess, + ID_PlotProcess, ID_MPCProcess, ID_NothingToDo }; diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index 1b987906ae87..c03ac66af1ab 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -106,6 +106,9 @@ #if ANY(PROUI_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH) #define PROUI_TUNING_GRAPH 1 #endif +#if PROUI_TUNING_GRAPH + #define PROUI_ITEM_PLOT // Plot temp graph viewer +#endif #define HAS_GCODE_PREVIEW 1 // Preview G-code model thumbnail #define HAS_CUSTOM_COLORS 1 // Change display colors #define HAS_ESDIAG 1 // View End-stop/Runout switch continuity diff --git a/Marlin/src/lcd/e3v2/proui/plot.cpp b/Marlin/src/lcd/e3v2/proui/plot.cpp index 84c58389a6f7..f77ffaf13a96 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.cpp +++ b/Marlin/src/lcd/e3v2/proui/plot.cpp @@ -39,40 +39,42 @@ #include "../../marlinui.h" #include "plot.h" -#define Plot_Bg_Color RGB( 1, 12, 8) +#define plotBgColor RGB(1, 12, 8) Plot plot; -uint16_t graphpoints, r, x2, y2 = 0; -frame_rect_t graphframe = {0}; -float scale = 0; +Plot::PlotData Plot::data; -void Plot::draw(const frame_rect_t &frame, const_celsius_float_t max, const_float_t ref/*=0*/) { - graphframe = frame; - graphpoints = 0; - scale = frame.h / max; - x2 = frame.x + frame.w - 1; - y2 = frame.y + frame.h - 1; - r = round((y2) - ref * scale); - DWINUI::drawBox(1, Plot_Bg_Color, frame); +void Plot::draw(const frame_rect_t &frame, const_celsius_float_t max, const_celsius_float_t ref/*=0*/) { + data.graphframe = frame; + data.graphpoints = 0; + data.scale = frame.h / max; + data.x2 = frame.x + frame.w - 1; + data.y2 = frame.y + frame.h - 1; + data.r = LROUND((data.y2) - ref * data.scale); + DWINUI::drawBox(1, plotBgColor, frame); for (uint8_t i = 1; i < 4; i++) if (i * 60 < frame.w) dwinDrawVLine(COLOR_LINE, i * 60 + frame.x, frame.y, frame.h); DWINUI::drawBox(0, COLOR_WHITE, DWINUI::extendFrame(frame, 1)); - dwinDrawHLine(COLOR_RED, frame.x, r, frame.w); + dwinDrawHLine(COLOR_RED, frame.x, data.r, frame.w); } -void Plot::update(const_float_t value) { - if (!scale) return; - const uint16_t y = round((y2) - value * scale); - if (graphpoints < graphframe.w) { - dwinDrawPoint(COLOR_YELLOW, 1, 1, graphpoints + graphframe.x, y); +void Plot::update(const_celsius_float_t value) { + if (!data.scale) return; + const uint16_t y = LROUND((data.y2) - value * data.scale); + if (data.graphpoints < data.graphframe.w) { + if (data.graphpoints < 1) + dwinDrawPoint(COLOR_YELLOW, 1, 1, data.graphframe.x, y); + else + dwinDrawLine(COLOR_YELLOW, data.graphpoints + data.graphframe.x - 1, data.yP, data.graphpoints + data.graphframe.x, y); } else { - dwinFrameAreaMove(1, 0, 1, Plot_Bg_Color, graphframe.x, graphframe.y, x2, y2); - if ((graphpoints % 60) == 0) dwinDrawVLine(COLOR_LINE, x2 - 1, graphframe.y + 1, graphframe.h - 2); - dwinDrawPoint(COLOR_RED, 1, 1, x2 - 1, r); - dwinDrawPoint(COLOR_YELLOW, 1, 1, x2 - 1, y); + dwinFrameAreaMove(1, 0, 1, plotBgColor, data.graphframe.x, data.graphframe.y, data.x2, data.y2); + if ((data.graphpoints % 60) == 0) dwinDrawVLine(COLOR_LINE, data.x2 - 1, data.graphframe.y + 1, data.graphframe.h - 2); + dwinDrawPoint(COLOR_RED, 1, 1, data.x2 - 1, data.r); + dwinDrawLine(COLOR_YELLOW, data.x2 - 2, data.yP, data.x2 - 1, y); } - graphpoints++; + data.yP = y; + data.graphpoints++; TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); } diff --git a/Marlin/src/lcd/e3v2/proui/plot.h b/Marlin/src/lcd/e3v2/proui/plot.h index 275f0453becc..2617d78061f0 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.h +++ b/Marlin/src/lcd/e3v2/proui/plot.h @@ -32,8 +32,15 @@ class Plot { public: - static void draw(const frame_rect_t &frame, const_celsius_float_t max, const_float_t ref=0); - static void update(const_float_t value); + static void draw(const frame_rect_t &frame, const_celsius_float_t max, const_celsius_float_t ref=0); + static void update(const_celsius_float_t value); + +private: + static struct PlotData { + uint16_t graphpoints, r, x2, y2, yP = 0; + frame_rect_t graphframe = {0}; + float scale = 0; + } data; }; extern Plot plot; diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 7945b26d5b72..97d8183f5200 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -448,6 +448,8 @@ namespace LanguageNarrow_en { LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); LSTR MSG_BRIGHTNESS = _UxGT("LCD Brightness"); LSTR MSG_SCREEN_TIMEOUT = _UxGT("LCD Timeout (m)"); + LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Hotend Temp Graph"); + LSTR MSG_BED_TEMP_GRAPH = _UxGT("Bed Temp Graph"); LSTR MSG_BRIGHTNESS_OFF = _UxGT("Backlight Off"); LSTR MSG_STORE_EEPROM = _UxGT("Store Settings"); LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings"); diff --git a/buildroot/share/dwin/bin/DWIN_ICO.py b/buildroot/share/dwin/bin/DWIN_ICO.py index 3ddc734022ee..4896f3ce45e1 100644 --- a/buildroot/share/dwin/bin/DWIN_ICO.py +++ b/buildroot/share/dwin/bin/DWIN_ICO.py @@ -247,16 +247,16 @@ def serialize(self): return rawdata _iconNames = { - 0 : 'ICON_LOGO', - 1 : 'ICON_Print_0', - 2 : 'ICON_Print_1', - 3 : 'ICON_Prepare_0', - 4 : 'ICON_Prepare_1', - 5 : 'ICON_Control_0', - 6 : 'ICON_Control_1', - 7 : 'ICON_Leveling_0', - 8 : 'ICON_Leveling_1', - 9 : 'ICON_HotendTemp', + 0 : 'ICON_LOGO', + 1 : 'ICON_Print_0', + 2 : 'ICON_Print_1', + 3 : 'ICON_Prepare_0', + 4 : 'ICON_Prepare_1', + 5 : 'ICON_Control_0', + 6 : 'ICON_Control_1', + 7 : 'ICON_Leveling_0', + 8 : 'ICON_Leveling_1', + 9 : 'ICON_HotendTemp', 10 : 'ICON_BedTemp', 11 : 'ICON_Speed', 12 : 'ICON_Zoffset', @@ -338,5 +338,20 @@ def serialize(self): 88 : 'ICON_Confirm_C', 89 : 'ICON_Confirm_E', 90 : 'ICON_Info_0', - 91 : 'ICON_Info_1' - } + 91 : 'ICON_Info_1', + 93 : 'ICON_Printer_0', + #94 : 'ICON_Printer_1', + 200 : 'ICON_Checkbox_F', + 201 : 'ICON_Checkbox_T', + 202 : 'ICON_Fade', + 203 : 'ICON_Mesh', + 204 : 'ICON_Tilt', + 205 : 'ICON_Brightness', + 206 : 'ICON_Probe', + 249 : 'ICON_AxisD', + 250 : 'ICON_AxisBR', + 251 : 'ICON_AxisTR', + 252 : 'ICON_AxisBL', + 253 : 'ICON_AxisTL', + 254 : 'ICON_AxisC' +} From ec060f979f0c836610b7fc1b02eb166df2143f28 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 22 Dec 2023 17:47:29 -0600 Subject: [PATCH 028/236] =?UTF-8?q?=F0=9F=93=9D=20Clean=20up=20variant=20l?= =?UTF-8?q?abels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variant.h | 224 +++++++++--------- .../MARLIN_BIGTREE_OCTOPUS_V1/variant.h | 224 +++++++++--------- .../MARLIN_CREALITY_STM32F401RC/variant.h | 15 +- .../MARLIN_CREALITY_STM32F401RE/variant.h | 35 ++- .../variants/MARLIN_F103Rx/variant.h | 82 +++---- .../variants/MARLIN_F407ZE/variant.h | 224 +++++++++--------- .../MARLIN_FYSETC_CHEETAH_V20/variant.h | 15 +- .../variants/MARLIN_FYSETC_S6/variant.h | 160 ++++++------- .../MARLIN_STM32F401RE_FREERUNS/variant.h | 15 +- .../variants/MARLIN_TH3D_EZBOARD_V2/variant.h | 84 +++---- .../marlin_maple_CHITU_F103/board/board.h | 116 +-------- 11 files changed, 539 insertions(+), 655 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h index b8e4b9667e80..b51da1bda575 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h @@ -27,118 +27,118 @@ extern "C" { * Pins *----------------------------------------------------------------------------*/ -#define PA0 0 //D0 -#define PA1 1 //D1 -#define PA2 2 //D2 -#define PA3 3 //D3 -#define PA4 4 //D4 -#define PA5 5 //D5 -#define PA6 6 //D6 -#define PA7 7 //D7 -#define PA8 8 //D8 -#define PA9 9 //D9 -#define PA10 10 //D10 -#define PA11 11 //D11 -#define PA12 12 //D12 -#define PA13 13 //D13 -#define PA14 14 //D14 -#define PA15 15 //D15 -#define PB0 16 //D16 -#define PB1 17 //D17 -#define PB2 18 //D18 -#define PB3 19 //D19 -#define PB4 20 //D20 -#define PB5 21 //D21 -#define PB6 22 //D22 -#define PB7 23 //D23 -#define PB8 24 //D24 -#define PB9 25 //D25 -#define PB10 26 //D26 -#define PB11 27 //D27 -#define PB12 28 //D28 -#define PB13 29 //D29 -#define PB14 30 //D30 -#define PB15 31 //D31 -#define PC0 32 //D32 -#define PC1 33 //D33 -#define PC2 34 //D34 -#define PC3 35 //D35 -#define PC4 36 //D36 -#define PC5 37 //D37 -#define PC6 38 //D38 -#define PC7 39 //D39 -#define PC8 40 //D40 -#define PC9 41 //D41 -#define PC10 42 //D42 -#define PC11 43 //D43 -#define PC12 44 //D44 -#define PC13 45 //D45 -#define PC14 46 //D46 -#define PC15 47 //D47 -#define PD0 48 //D48 -#define PD1 49 //D49 -#define PD2 50 //D50 -#define PD3 51 //D51 -#define PD4 52 //D52 -#define PD5 53 //D53 -#define PD6 54 //D54 -#define PD7 55 //D55 -#define PD8 56 //D56 -#define PD9 57 //D57 -#define PD10 58 //D58 -#define PD11 59 //D59 -#define PD12 60 //D60 -#define PD13 61 //D61 -#define PD14 62 //D62 -#define PD15 63 //D63 -#define PE0 64 //D64 -#define PE1 65 //D65 -#define PE2 66 //D66 -#define PE3 67 //D67 -#define PE4 68 //D68 -#define PE5 69 //D69 -#define PE6 70 //D70 -#define PE7 71 //D71 -#define PE8 72 //D72 -#define PE9 73 //D73 -#define PE10 74 //D74 -#define PE11 75 //D75 -#define PE12 76 //D76 -#define PE13 77 //D77 -#define PE14 78 //D78 -#define PE15 79 //D79 -#define PF0 80 //D64 -#define PF1 81 //D65 -#define PF2 82 //D66 -#define PF3 83 //D67 -#define PF4 84 //D68 -#define PF5 85 //D69 -#define PF6 86 //D70 -#define PF7 87 //D71 -#define PF8 88 //D72 -#define PF9 89 //D73 -#define PF10 90 //D74 -#define PF11 91 //D75 -#define PF12 92 //D76 -#define PF13 93 //D77 -#define PF14 94 //D78 -#define PF15 95 //D79 -#define PG0 96 //D64 -#define PG1 97 //D65 -#define PG2 98 //D66 -#define PG3 99 //D67 -#define PG4 100 //D68 -#define PG5 101 //D69 -#define PG6 102 //D70 -#define PG7 103 //D71 -#define PG8 104 //D72 -#define PG9 105 //D73 -#define PG10 106 //D74 -#define PG11 107 //D75 -#define PG12 108 //D76 -#define PG13 109 //D77 -#define PG14 110 //D78 -#define PG15 111 //D79 +#define PA0 0 +#define PA1 1 +#define PA2 2 +#define PA3 3 +#define PA4 4 +#define PA5 5 +#define PA6 6 +#define PA7 7 +#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 16 +#define PB1 17 +#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 32 +#define PC1 33 +#define PC2 34 +#define PC3 35 +#define PC4 36 +#define PC5 37 +#define PC6 38 +#define PC7 39 +#define PC8 40 +#define PC9 41 +#define PC10 42 +#define PC11 43 +#define PC12 44 +#define PC13 45 +#define PC14 46 +#define PC15 47 +#define PD0 48 +#define PD1 49 +#define PD2 50 +#define PD3 51 +#define PD4 52 +#define PD5 53 +#define PD6 54 +#define PD7 55 +#define PD8 56 +#define PD9 57 +#define PD10 58 +#define PD11 59 +#define PD12 60 +#define PD13 61 +#define PD14 62 +#define PD15 63 +#define PE0 64 +#define PE1 65 +#define PE2 66 +#define PE3 67 +#define PE4 68 +#define PE5 69 +#define PE6 70 +#define PE7 71 +#define PE8 72 +#define PE9 73 +#define PE10 74 +#define PE11 75 +#define PE12 76 +#define PE13 77 +#define PE14 78 +#define PE15 79 +#define PF0 80 +#define PF1 81 +#define PF2 82 +#define PF3 83 +#define PF4 84 +#define PF5 85 +#define PF6 86 +#define PF7 87 +#define PF8 88 +#define PF9 89 +#define PF10 90 +#define PF11 91 +#define PF12 92 +#define PF13 93 +#define PF14 94 +#define PF15 95 +#define PG0 96 +#define PG1 97 +#define PG2 98 +#define PG3 99 +#define PG4 100 +#define PG5 101 +#define PG6 102 +#define PG7 103 +#define PG8 104 +#define PG9 105 +#define PG10 106 +#define PG11 107 +#define PG12 108 +#define PG13 109 +#define PG14 110 +#define PG15 111 // This must be a literal with the same value as PEND #define NUM_DIGITAL_PINS 112 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h index 22b919697027..b07e9d7f05e5 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h @@ -27,118 +27,118 @@ extern "C" { * Pins *----------------------------------------------------------------------------*/ -#define PA0 0 //D0 -#define PA1 1 //D1 -#define PA2 2 //D2 -#define PA3 3 //D3 -#define PA4 4 //D4 -#define PA5 5 //D5 -#define PA6 6 //D6 -#define PA7 7 //D7 -#define PA8 8 //D8 -#define PA9 9 //D9 -#define PA10 10 //D10 -#define PA11 11 //D11 -#define PA12 12 //D12 -#define PA13 13 //D13 -#define PA14 14 //D14 -#define PA15 15 //D15 -#define PB0 16 //D16 -#define PB1 17 //D17 -#define PB2 18 //D18 -#define PB3 19 //D19 -#define PB4 20 //D20 -#define PB5 21 //D21 -#define PB6 22 //D22 -#define PB7 23 //D23 -#define PB8 24 //D24 -#define PB9 25 //D25 -#define PB10 26 //D26 -#define PB11 27 //D27 -#define PB12 28 //D28 -#define PB13 29 //D29 -#define PB14 30 //D30 -#define PB15 31 //D31 -#define PC0 32 //D32 -#define PC1 33 //D33 -#define PC2 34 //D34 -#define PC3 35 //D35 -#define PC4 36 //D36 -#define PC5 37 //D37 -#define PC6 38 //D38 -#define PC7 39 //D39 -#define PC8 40 //D40 -#define PC9 41 //D41 -#define PC10 42 //D42 -#define PC11 43 //D43 -#define PC12 44 //D44 -#define PC13 45 //D45 -#define PC14 46 //D46 -#define PC15 47 //D47 -#define PD0 48 //D48 -#define PD1 49 //D49 -#define PD2 50 //D50 -#define PD3 51 //D51 -#define PD4 52 //D52 -#define PD5 53 //D53 -#define PD6 54 //D54 -#define PD7 55 //D55 -#define PD8 56 //D56 -#define PD9 57 //D57 -#define PD10 58 //D58 -#define PD11 59 //D59 -#define PD12 60 //D60 -#define PD13 61 //D61 -#define PD14 62 //D62 -#define PD15 63 //D63 -#define PE0 64 //D64 -#define PE1 65 //D65 -#define PE2 66 //D66 -#define PE3 67 //D67 -#define PE4 68 //D68 -#define PE5 69 //D69 -#define PE6 70 //D70 -#define PE7 71 //D71 -#define PE8 72 //D72 -#define PE9 73 //D73 -#define PE10 74 //D74 -#define PE11 75 //D75 -#define PE12 76 //D76 -#define PE13 77 //D77 -#define PE14 78 //D78 -#define PE15 79 //D79 -#define PF0 80 //D64 -#define PF1 81 //D65 -#define PF2 82 //D66 -#define PF3 83 //D67 -#define PF4 84 //D68 -#define PF5 85 //D69 -#define PF6 86 //D70 -#define PF7 87 //D71 -#define PF8 88 //D72 -#define PF9 89 //D73 -#define PF10 90 //D74 -#define PF11 91 //D75 -#define PF12 92 //D76 -#define PF13 93 //D77 -#define PF14 94 //D78 -#define PF15 95 //D79 -#define PG0 96 //D64 -#define PG1 97 //D65 -#define PG2 98 //D66 -#define PG3 99 //D67 -#define PG4 100 //D68 -#define PG5 101 //D69 -#define PG6 102 //D70 -#define PG7 103 //D71 -#define PG8 104 //D72 -#define PG9 105 //D73 -#define PG10 106 //D74 -#define PG11 107 //D75 -#define PG12 108 //D76 -#define PG13 109 //D77 -#define PG14 110 //D78 -#define PG15 111 //D79 +#define PA0 0 +#define PA1 1 +#define PA2 2 +#define PA3 3 +#define PA4 4 +#define PA5 5 +#define PA6 6 +#define PA7 7 +#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 16 +#define PB1 17 +#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 32 +#define PC1 33 +#define PC2 34 +#define PC3 35 +#define PC4 36 +#define PC5 37 +#define PC6 38 +#define PC7 39 +#define PC8 40 +#define PC9 41 +#define PC10 42 +#define PC11 43 +#define PC12 44 +#define PC13 45 +#define PC14 46 +#define PC15 47 +#define PD0 48 +#define PD1 49 +#define PD2 50 +#define PD3 51 +#define PD4 52 +#define PD5 53 +#define PD6 54 +#define PD7 55 +#define PD8 56 +#define PD9 57 +#define PD10 58 +#define PD11 59 +#define PD12 60 +#define PD13 61 +#define PD14 62 +#define PD15 63 +#define PE0 64 +#define PE1 65 +#define PE2 66 +#define PE3 67 +#define PE4 68 +#define PE5 69 +#define PE6 70 +#define PE7 71 +#define PE8 72 +#define PE9 73 +#define PE10 74 +#define PE11 75 +#define PE12 76 +#define PE13 77 +#define PE14 78 +#define PE15 79 +#define PF0 80 +#define PF1 81 +#define PF2 82 +#define PF3 83 +#define PF4 84 +#define PF5 85 +#define PF6 86 +#define PF7 87 +#define PF8 88 +#define PF9 89 +#define PF10 90 +#define PF11 91 +#define PF12 92 +#define PF13 93 +#define PF14 94 +#define PF15 95 +#define PG0 96 +#define PG1 97 +#define PG2 98 +#define PG3 99 +#define PG4 100 +#define PG5 101 +#define PG6 102 +#define PG7 103 +#define PG8 104 +#define PG9 105 +#define PG10 106 +#define PG11 107 +#define PG12 108 +#define PG13 109 +#define PG14 110 +#define PG15 111 // This must be a literal with the same value as PEND #define NUM_DIGITAL_PINS 112 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h index 722a29d00dd4..9c5c2530225d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h @@ -23,9 +23,8 @@ extern "C" { #endif // __cplusplus - -// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | -// |---------|--------|-----------|----------|------------------------|-----------| + // | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | + // |---------|--------|-----------|----------|------------------------|-----------| #define PA0 0 // | 0 | A0 | | | | | #define PA1 1 // | 1 | A1 | | | | | #define PA2 2 // | 2 | A2 | USART2_TX | | | | @@ -42,7 +41,7 @@ extern "C" { #define PA13 13 // | 13 | | | | | SWD_SWDIO | #define PA14 14 // | 14 | | | | | SWD_SWCLK | #define PA15 15 // | 15 | | | | SPI3_SS, (SPI1_SS) | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PB0 16 // | 16 | A8 | | | | | #define PB1 17 // | 17 | A9 | | | | | #define PB2 18 // | 18 | | | | | BOOT1 | @@ -58,7 +57,7 @@ extern "C" { #define PB13 28 // | 28 | | | | SPI2_SCK | | #define PB14 29 // | 29 | | | | SPI2_MISO | | #define PB15 30 // | 30 | | | | SPI2_MOSI | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PC0 31 // | 31 | A10 | | | | | #define PC1 32 // | 32 | A11 | | | | | #define PC2 33 // | 33 | A12 | | | SPI2_MISO | | @@ -75,12 +74,12 @@ extern "C" { #define PC13 44 // | 44 | | | | | | #define PC14 45 // | 45 | | | | | OSC32_IN | #define PC15 46 // | 46 | | | | | OSC32_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PD2 47 // | 47 | | | | | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PH0 48 // | 48 | | | | | OSC_IN | #define PH1 49 // | 49 | | | | | OSC_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| // This must be a literal #define NUM_DIGITAL_PINS 50 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.h index 591571bf2c89..dc73ccc51868 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.h @@ -23,26 +23,25 @@ extern "C" { #endif // __cplusplus - -// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | -// |---------|--------|-----------|----------|------------------------|-----------| -#define PA0 0 // | 0 | A0 | | | | | -#define PA1 1 // | 1 | A1 | | | | | -#define PA2 2 // | 2 | A2 | USART2_TX | | | | -#define PA3 3 // | 3 | A3 | USART2_RX | | | | -#define PA4 4 // | 4 | A4 | | | SPI1_SS, (SPI3_SS) | | -#define PA5 5 // | 5 | A5 | | | SPI1_SCK | | -#define PA6 6 // | 6 | A6 | | | SPI1_MISO | | -#define PA7 7 // | 7 | A7 | | | SPI1_MOSI | | -#define PA8 8 // | 8 | | | TWI3_SCL | | | -#define PA9 9 // | 9 | | USART1_TX | | | | + // | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | + // |---------|--------|-----------|----------|------------------------|-----------| +#define PA0 0 // | 0 | A0 | | | | | +#define PA1 1 // | 1 | A1 | | | | | +#define PA2 2 // | 2 | A2 | USART2_TX | | | | +#define PA3 3 // | 3 | A3 | USART2_RX | | | | +#define PA4 4 // | 4 | A4 | | | SPI1_SS, (SPI3_SS) | | +#define PA5 5 // | 5 | A5 | | | SPI1_SCK | | +#define PA6 6 // | 6 | A6 | | | SPI1_MISO | | +#define PA7 7 // | 7 | A7 | | | SPI1_MOSI | | +#define PA8 8 // | 8 | | | TWI3_SCL | | | +#define PA9 9 // | 9 | | USART1_TX | | | | #define PA10 10 // | 10 | | USART1_RX | | | | #define PA11 11 // | 11 | | USART6_TX | | | | #define PA12 12 // | 12 | | USART6_RX | | | | #define PA13 13 // | 13 | | | | | SWD_SWDIO | #define PA14 14 // | 14 | | | | | SWD_SWCLK | #define PA15 15 // | 15 | | | | SPI3_SS, (SPI1_SS) | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PB0 16 // | 16 | A8 | | | | | #define PB1 17 // | 17 | A9 | | | | | #define PB2 18 // | 18 | | | | | BOOT1 | @@ -58,7 +57,7 @@ extern "C" { #define PB13 28 // | 28 | | | | SPI2_SCK | | #define PB14 29 // | 29 | | | | SPI2_MISO | | #define PB15 30 // | 30 | | | | SPI2_MOSI | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PC0 31 // | 31 | A10 | | | | | #define PC1 32 // | 32 | A11 | | | | | #define PC2 33 // | 33 | A12 | | | SPI2_MISO | | @@ -75,12 +74,12 @@ extern "C" { #define PC13 44 // | 44 | | | | | | #define PC14 45 // | 45 | | | | | OSC32_IN | #define PC15 46 // | 46 | | | | | OSC32_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PD2 47 // | 47 | | | | | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PH0 48 // | 48 | | | | | OSC_IN | #define PH1 49 // | 49 | | | | | OSC_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| // This must be a literal #define NUM_DIGITAL_PINS 50 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h index 4a0245e7e9d5..7452020652c4 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -26,8 +26,8 @@ extern "C" { // * = F103R8-B-C-D-E-F-G // ** = F103RC-D-E-F-G -// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | -// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| #define PA0 PIN_A0 // | 0 | A0 | | | | | #define PA1 PIN_A1 // | 1 | A1 | | | | | #define PA2 PIN_A2 // | 2 | A2 | USART2_TX | | | | @@ -36,53 +36,53 @@ extern "C" { #define PA5 PIN_A5 // | 5 | A5 | | | SPI1_SCK | | #define PA6 PIN_A6 // | 6 | A6 | | | SPI1_MISO | | #define PA7 PIN_A7 // | 7 | A7 | | | SPI1_MOSI | | -#define PA8 8 // | 8 | | | | | | -#define PA9 9 // | 9 | | USART1_TX | | | | -#define PA10 10 // | 10 | | USART1_RX | | | | -#define PA11 11 // | 11 | | | | | USB_DM | -#define PA12 12 // | 12 | | | | | USB_DP | -#define PA13 13 // | 13 | | | | | SWD_SWDIO | -#define PA14 14 // | 14 | | | | | SWD_SWCLK | -#define PA15 15 // | 15 | | | | SPI1_SS/SPI3_SS** | | -// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PA8 8 // | 8 | | | | | | +#define PA9 9 // | 9 | | USART1_TX | | | | +#define PA10 10 // | 10 | | USART1_RX | | | | +#define PA11 11 // | 11 | | | | | USB_DM | +#define PA12 12 // | 12 | | | | | USB_DP | +#define PA13 13 // | 13 | | | | | SWD_SWDIO | +#define PA14 14 // | 14 | | | | | SWD_SWCLK | +#define PA15 15 // | 15 | | | | SPI1_SS/SPI3_SS** | | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| #define PB0 PIN_A8 // | 16 | A8 | | | | | #define PB1 PIN_A9 // | 17 | A9 | | | | | -#define PB2 18 // | 18 | | | | | BOOT1 | -#define PB3 19 // | 19 | | | | SPI1_SCK/SPI3_SCK** | | -#define PB4 20 // | 20 | | | | SPI1_MISO/SPI3_MISO** | | -#define PB5 21 // | 21 | | | | SPI1_MOSI/SPI3_MOSI** | | -#define PB6 22 // | 22 | | USART1_TX | TWI1_SCL | | | -#define PB7 23 // | 23 | | USART1_RX | TWI1_SDA | | | -#define PB8 24 // | 24 | | | TWI1_SCL | | | -#define PB9 25 // | 25 | | | TWI1_SDA | | | -#define PB10 26 // | 26 | | USART3_TX* | TWI2_SCL* | | | -#define PB11 27 // | 27 | | USART3_RX* | TWI2_SDA* | | | -#define PB12 28 // | 28 | | | | SPI2_SS* | | -#define PB13 29 // | 29 | | | | SPI2_SCK* | | -#define PB14 30 // | 30 | | | | SPI2_MISO* | | -#define PB15 31 // | 31 | | | | SPI2_MOSI* | | -// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PB2 18 // | 18 | | | | | BOOT1 | +#define PB3 19 // | 19 | | | | SPI1_SCK/SPI3_SCK** | | +#define PB4 20 // | 20 | | | | SPI1_MISO/SPI3_MISO** | | +#define PB5 21 // | 21 | | | | SPI1_MOSI/SPI3_MOSI** | | +#define PB6 22 // | 22 | | USART1_TX | TWI1_SCL | | | +#define PB7 23 // | 23 | | USART1_RX | TWI1_SDA | | | +#define PB8 24 // | 24 | | | TWI1_SCL | | | +#define PB9 25 // | 25 | | | TWI1_SDA | | | +#define PB10 26 // | 26 | | USART3_TX* | TWI2_SCL* | | | +#define PB11 27 // | 27 | | USART3_RX* | TWI2_SDA* | | | +#define PB12 28 // | 28 | | | | SPI2_SS* | | +#define PB13 29 // | 29 | | | | SPI2_SCK* | | +#define PB14 30 // | 30 | | | | SPI2_MISO* | | +#define PB15 31 // | 31 | | | | SPI2_MOSI* | | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| #define PC0 PIN_A10 // | 32 | A10 | | | | | #define PC1 PIN_A11 // | 33 | A11 | | | | | #define PC2 PIN_A12 // | 34 | A12 | | | | | #define PC3 PIN_A13 // | 35 | A13 | | | | | #define PC4 PIN_A14 // | 36 | A14 | | | | | #define PC5 PIN_A15 // | 37 | A15 | | | | | -#define PC6 38 // | 38 | | | | | | -#define PC7 39 // | 39 | | | | | | -#define PC8 40 // | 40 | | | | | | -#define PC9 41 // | 41 | | | | | | -#define PC10 42 // | 42 | | USART3_TX*/UART4_TX** | | | | -#define PC11 43 // | 43 | | USART3_RX*/UART4_RX** | | | | -#define PC12 44 // | 44 | | UART5_TX** | | | | -#define PC13 45 // | 45 | | | | | | -#define PC14 46 // | 46 | | | | | OSC32_IN | -#define PC15 47 // | 47 | | | | | OSC32_OUT | -// |---------|----------------|--------------------------|-----------|-----------------------|-----------| -#define PD0 48 // | 48 | | | | | OSC_IN | -#define PD1 49 // | 48 | | | | | OSC_OUT | -#define PD2 50 // | 50 | | UART5_RX** | | | | -// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PC6 38 // | 38 | | | | | | +#define PC7 39 // | 39 | | | | | | +#define PC8 40 // | 40 | | | | | | +#define PC9 41 // | 41 | | | | | | +#define PC10 42 // | 42 | | USART3_TX*/UART4_TX** | | | | +#define PC11 43 // | 43 | | USART3_RX*/UART4_RX** | | | | +#define PC12 44 // | 44 | | UART5_TX** | | | | +#define PC13 45 // | 45 | | | | | | +#define PC14 46 // | 46 | | | | | OSC32_IN | +#define PC15 47 // | 47 | | | | | OSC32_OUT | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PD0 48 // | 48 | | | | | OSC_IN | +#define PD1 49 // | 48 | | | | | OSC_OUT | +#define PD2 50 // | 50 | | UART5_RX** | | | | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| // This must be a literal #define NUM_DIGITAL_PINS 51 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/variant.h index b8e4b9667e80..b51da1bda575 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/variant.h @@ -27,118 +27,118 @@ extern "C" { * Pins *----------------------------------------------------------------------------*/ -#define PA0 0 //D0 -#define PA1 1 //D1 -#define PA2 2 //D2 -#define PA3 3 //D3 -#define PA4 4 //D4 -#define PA5 5 //D5 -#define PA6 6 //D6 -#define PA7 7 //D7 -#define PA8 8 //D8 -#define PA9 9 //D9 -#define PA10 10 //D10 -#define PA11 11 //D11 -#define PA12 12 //D12 -#define PA13 13 //D13 -#define PA14 14 //D14 -#define PA15 15 //D15 -#define PB0 16 //D16 -#define PB1 17 //D17 -#define PB2 18 //D18 -#define PB3 19 //D19 -#define PB4 20 //D20 -#define PB5 21 //D21 -#define PB6 22 //D22 -#define PB7 23 //D23 -#define PB8 24 //D24 -#define PB9 25 //D25 -#define PB10 26 //D26 -#define PB11 27 //D27 -#define PB12 28 //D28 -#define PB13 29 //D29 -#define PB14 30 //D30 -#define PB15 31 //D31 -#define PC0 32 //D32 -#define PC1 33 //D33 -#define PC2 34 //D34 -#define PC3 35 //D35 -#define PC4 36 //D36 -#define PC5 37 //D37 -#define PC6 38 //D38 -#define PC7 39 //D39 -#define PC8 40 //D40 -#define PC9 41 //D41 -#define PC10 42 //D42 -#define PC11 43 //D43 -#define PC12 44 //D44 -#define PC13 45 //D45 -#define PC14 46 //D46 -#define PC15 47 //D47 -#define PD0 48 //D48 -#define PD1 49 //D49 -#define PD2 50 //D50 -#define PD3 51 //D51 -#define PD4 52 //D52 -#define PD5 53 //D53 -#define PD6 54 //D54 -#define PD7 55 //D55 -#define PD8 56 //D56 -#define PD9 57 //D57 -#define PD10 58 //D58 -#define PD11 59 //D59 -#define PD12 60 //D60 -#define PD13 61 //D61 -#define PD14 62 //D62 -#define PD15 63 //D63 -#define PE0 64 //D64 -#define PE1 65 //D65 -#define PE2 66 //D66 -#define PE3 67 //D67 -#define PE4 68 //D68 -#define PE5 69 //D69 -#define PE6 70 //D70 -#define PE7 71 //D71 -#define PE8 72 //D72 -#define PE9 73 //D73 -#define PE10 74 //D74 -#define PE11 75 //D75 -#define PE12 76 //D76 -#define PE13 77 //D77 -#define PE14 78 //D78 -#define PE15 79 //D79 -#define PF0 80 //D64 -#define PF1 81 //D65 -#define PF2 82 //D66 -#define PF3 83 //D67 -#define PF4 84 //D68 -#define PF5 85 //D69 -#define PF6 86 //D70 -#define PF7 87 //D71 -#define PF8 88 //D72 -#define PF9 89 //D73 -#define PF10 90 //D74 -#define PF11 91 //D75 -#define PF12 92 //D76 -#define PF13 93 //D77 -#define PF14 94 //D78 -#define PF15 95 //D79 -#define PG0 96 //D64 -#define PG1 97 //D65 -#define PG2 98 //D66 -#define PG3 99 //D67 -#define PG4 100 //D68 -#define PG5 101 //D69 -#define PG6 102 //D70 -#define PG7 103 //D71 -#define PG8 104 //D72 -#define PG9 105 //D73 -#define PG10 106 //D74 -#define PG11 107 //D75 -#define PG12 108 //D76 -#define PG13 109 //D77 -#define PG14 110 //D78 -#define PG15 111 //D79 +#define PA0 0 +#define PA1 1 +#define PA2 2 +#define PA3 3 +#define PA4 4 +#define PA5 5 +#define PA6 6 +#define PA7 7 +#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 16 +#define PB1 17 +#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 32 +#define PC1 33 +#define PC2 34 +#define PC3 35 +#define PC4 36 +#define PC5 37 +#define PC6 38 +#define PC7 39 +#define PC8 40 +#define PC9 41 +#define PC10 42 +#define PC11 43 +#define PC12 44 +#define PC13 45 +#define PC14 46 +#define PC15 47 +#define PD0 48 +#define PD1 49 +#define PD2 50 +#define PD3 51 +#define PD4 52 +#define PD5 53 +#define PD6 54 +#define PD7 55 +#define PD8 56 +#define PD9 57 +#define PD10 58 +#define PD11 59 +#define PD12 60 +#define PD13 61 +#define PD14 62 +#define PD15 63 +#define PE0 64 +#define PE1 65 +#define PE2 66 +#define PE3 67 +#define PE4 68 +#define PE5 69 +#define PE6 70 +#define PE7 71 +#define PE8 72 +#define PE9 73 +#define PE10 74 +#define PE11 75 +#define PE12 76 +#define PE13 77 +#define PE14 78 +#define PE15 79 +#define PF0 80 +#define PF1 81 +#define PF2 82 +#define PF3 83 +#define PF4 84 +#define PF5 85 +#define PF6 86 +#define PF7 87 +#define PF8 88 +#define PF9 89 +#define PF10 90 +#define PF11 91 +#define PF12 92 +#define PF13 93 +#define PF14 94 +#define PF15 95 +#define PG0 96 +#define PG1 97 +#define PG2 98 +#define PG3 99 +#define PG4 100 +#define PG5 101 +#define PG6 102 +#define PG7 103 +#define PG8 104 +#define PG9 105 +#define PG10 106 +#define PG11 107 +#define PG12 108 +#define PG13 109 +#define PG14 110 +#define PG15 111 // This must be a literal with the same value as PEND #define NUM_DIGITAL_PINS 112 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 ca3664daa165..c629be7359bb 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -23,9 +23,8 @@ extern "C" { #endif // __cplusplus - -// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | -// |---------|--------|-----------|----------|------------------------|-----------| + // | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | + // |---------|--------|-----------|----------|------------------------|-----------| #define PA0 A0 // | 0 | A0 | | | | | #define PA1 A1 // | 1 | A1 | | | | | #define PA2 A2 // | 2 | A2 | USART2_TX | | | | @@ -42,7 +41,7 @@ extern "C" { #define PA13 13 // | 13 | | | | | SWD_SWDIO | #define PA14 14 // | 14 | | | | | SWD_SWCLK | #define PA15 15 // | 15 | | | | SPI3_SS, (SPI1_SS) | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PB0 A8 // | 16 | A8 | | | | | #define PB1 A9 // | 17 | A9 | | | | | #define PB2 18 // | 18 | | | | | BOOT1 | @@ -58,7 +57,7 @@ extern "C" { #define PB13 28 // | 28 | | | | SPI2_SCK | | #define PB14 29 // | 29 | | | | SPI2_MISO | | #define PB15 30 // | 30 | | | | SPI2_MOSI | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PC0 A10 // | 31 | A10 | | | | | #define PC1 A11 // | 32 | A11 | | | | | #define PC2 A12 // | 33 | A12 | | | SPI2_MISO | | @@ -75,12 +74,12 @@ extern "C" { #define PC13 44 // | 44 | | | | | | #define PC14 45 // | 45 | | | | | OSC32_IN | #define PC15 46 // | 46 | | | | | OSC32_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PD2 47 // | 47 | | | | | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PH0 48 // | 48 | | | | | OSC_IN | #define PH1 49 // | 49 | | | | | OSC_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| // This must be a literal #define NUM_DIGITAL_PINS 50 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h index 4f77dc688f35..f64bbacc4566 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h @@ -27,86 +27,86 @@ extern "C" { * Pins *----------------------------------------------------------------------------*/ -#define PA0 0 //D0 -#define PA1 1 //D1 -#define PA2 2 //D2 -#define PA3 3 //D3 -#define PA4 4 //D4 -#define PA5 5 //D5 -#define PA6 6 //D6 -#define PA7 7 //D7 -#define PA8 8 //D8 -#define PA9 9 //D9 -#define PA10 10 //D10 -#define PA11 11 //D11 -#define PA12 12 //D12 -#define PA13 13 //D13 -#define PA14 14 //D14 -#define PA15 15 //D15 -#define PB0 16 //D16 -#define PB1 17 //D17 -#define PB2 18 //D18 -#define PB3 19 //D19 -#define PB4 20 //D20 -#define PB5 21 //D21 -#define PB6 22 //D22 -#define PB7 23 //D23 -#define PB8 24 //D24 -#define PB9 25 //D25 -#define PB10 26 //D26 -#define PB11 27 //D27 -#define PB12 28 //D28 -#define PB13 29 //D29 -#define PB14 30 //D30 -#define PB15 31 //D31 -#define PC0 32 //D32 -#define PC1 33 //D33 -#define PC2 34 //D34 -#define PC3 35 //D35 -#define PC4 36 //D36 -#define PC5 37 //D37 -#define PC6 38 //D38 -#define PC7 39 //D39 -#define PC8 40 //D40 -#define PC9 41 //D41 -#define PC10 42 //D42 -#define PC11 43 //D43 -#define PC12 44 //D44 -#define PC13 45 //D45 -#define PC14 46 //D46 -#define PC15 47 //D47 -#define PD0 48 //D48 -#define PD1 49 //D49 -#define PD2 50 //D50 -#define PD3 51 //D51 -#define PD4 52 //D52 -#define PD5 53 //D53 -#define PD6 54 //D54 -#define PD7 55 //D55 -#define PD8 56 //D56 -#define PD9 57 //D57 -#define PD10 58 //D58 -#define PD11 59 //D59 -#define PD12 60 //D60 -#define PD13 61 //D61 -#define PD14 62 //D62 -#define PD15 63 //D63 -#define PE0 64 //D64 -#define PE1 65 //D65 -#define PE2 66 //D66 -#define PE3 67 //D67 -#define PE4 68 //D68 -#define PE5 69 //D69 -#define PE6 70 //D70 -#define PE7 71 //D71 -#define PE8 72 //D72 -#define PE9 73 //D73 -#define PE10 74 //D74 -#define PE11 75 //D75 -#define PE12 76 //D76 -#define PE13 77 //D77 -#define PE14 78 //D78 -#define PE15 79 //D79 +#define PA0 0 +#define PA1 1 +#define PA2 2 +#define PA3 3 +#define PA4 4 +#define PA5 5 +#define PA6 6 +#define PA7 7 +#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 16 +#define PB1 17 +#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 32 +#define PC1 33 +#define PC2 34 +#define PC3 35 +#define PC4 36 +#define PC5 37 +#define PC6 38 +#define PC7 39 +#define PC8 40 +#define PC9 41 +#define PC10 42 +#define PC11 43 +#define PC12 44 +#define PC13 45 +#define PC14 46 +#define PC15 47 +#define PD0 48 +#define PD1 49 +#define PD2 50 +#define PD3 51 +#define PD4 52 +#define PD5 53 +#define PD6 54 +#define PD7 55 +#define PD8 56 +#define PD9 57 +#define PD10 58 +#define PD11 59 +#define PD12 60 +#define PD13 61 +#define PD14 62 +#define PD15 63 +#define PE0 64 +#define PE1 65 +#define PE2 66 +#define PE3 67 +#define PE4 68 +#define PE5 69 +#define PE6 70 +#define PE7 71 +#define PE8 72 +#define PE9 73 +#define PE10 74 +#define PE11 75 +#define PE12 76 +#define PE13 77 +#define PE14 78 +#define PE15 79 // This must be a literal with the same value as PEND #define NUM_DIGITAL_PINS 87 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h index b5c5a65a7426..a1e347e7f229 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h @@ -23,9 +23,8 @@ extern "C" { #endif // __cplusplus - -// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | -// |---------|--------|-----------|----------|------------------------|-----------| + // | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | + // |---------|--------|-----------|----------|------------------------|-----------| #define PA0 0 // | 0 | A0 | | | | | #define PA1 1 // | 1 | A1 | | | | | #define PA2 2 // | 2 | A2 | USART2_TX | | | | @@ -42,7 +41,7 @@ extern "C" { #define PA13 13 // | 13 | | | | | SWD_SWDIO | #define PA14 14 // | 14 | | | | | SWD_SWCLK | #define PA15 15 // | 15 | | | | SPI3_SS, (SPI1_SS) | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PB0 16 // | 16 | A8 | | | | | #define PB1 17 // | 17 | A9 | | | | | #define PB2 18 // | 18 | | | | | BOOT1 | @@ -58,7 +57,7 @@ extern "C" { #define PB13 28 // | 28 | | | | SPI2_SCK | | #define PB14 29 // | 29 | | | | SPI2_MISO | | #define PB15 30 // | 30 | | | | SPI2_MOSI | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PC0 31 // | 31 | A10 | | | | | #define PC1 32 // | 32 | A11 | | | | | #define PC2 33 // | 33 | A12 | | | SPI2_MISO | | @@ -75,12 +74,12 @@ extern "C" { #define PC13 44 // | 44 | | | | | | #define PC14 45 // | 45 | | | | | OSC32_IN | #define PC15 46 // | 46 | | | | | OSC32_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PD2 47 // | 47 | | | | | | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| #define PH0 48 // | 48 | | | | | OSC_IN | #define PH1 49 // | 49 | | | | | OSC_OUT | -// |---------|--------|-----------|----------|------------------------|-----------| + // |---------|--------|-----------|----------|------------------------|-----------| // This must be a literal #define NUM_DIGITAL_PINS 50 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 5232a1eaf2e4..3b4d43054ddf 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h @@ -27,8 +27,8 @@ extern "C" { * Pins (STM32F405RG and STM32F415RG) *----------------------------------------------------------------------------*/ -// | DIGITAL | ANALOG IN | ANALOG OUT | UART/USART | TWI | SPI | SPECIAL | -// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +// | DIGITAL | ANALOG IN | ANALOG OUT | UART/USART | TWI | SPI | SPECIAL | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| #define PA0 PIN_A0 // | 0 | A0 (ADC1) | | UART4_TX | | | | #define PA1 PIN_A1 // | 1 | A1 (ADC1) | | UART4_RX | | | | #define PA2 PIN_A2 // | 2 | A2 (ADC1) | | USART2_TX | | | | @@ -37,54 +37,54 @@ extern "C" { #define PA5 PIN_A5 // | 5 | A5 (ADC1) | DAC_OUT2 | | | SPI1_SCK | | #define PA6 PIN_A6 // | 6 | A6 (ADC1) | | | | SPI1_MISO | | #define PA7 PIN_A7 // | 7 | A7 (ADC1) | | | | SPI1_MOSI | | -#define PA8 8 // | 8 | | | | TWI3_SCL | | | -#define PA9 9 // | 9 | | | USART1_TX | | SPI2_SCK | | -#define PA10 10 // | 10 | | | USART1_RX | | | | -#define PA11 11 // | 11 | | | | | | | -#define PA12 12 // | 12 | | | | | | | -#define PA13 13 // | 13 | | | | | | SWD_SWDIO | -#define PA14 14 // | 14 | | | | | | SWD_SWCLK | -#define PA15 15 // | 15 | | | | | SPI3_SS, (SPI1_SS) | | -// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PA8 8 // | 8 | | | | TWI3_SCL | | | +#define PA9 9 // | 9 | | | USART1_TX | | SPI2_SCK | | +#define PA10 10 // | 10 | | | USART1_RX | | | | +#define PA11 11 // | 11 | | | | | | | +#define PA12 12 // | 12 | | | | | | | +#define PA13 13 // | 13 | | | | | | SWD_SWDIO | +#define PA14 14 // | 14 | | | | | | SWD_SWCLK | +#define PA15 15 // | 15 | | | | | SPI3_SS, (SPI1_SS) | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| #define PB0 PIN_A8 // | 16 | A8 (ADC1) | | | | | | #define PB1 PIN_A9 // | 17 | A9 (ADC1) | | | | | | -#define PB2 18 // | 18 | | | | | | BOOT1 | -#define PB3 19 // | 19 | | | | | SPI3_SCK, (SPI1_SCK) | | -#define PB4 20 // | 20 | | | | | SPI3_MISO, (SPI1_MISO) | | -#define PB5 21 // | 21 | | | | | SPI3_MOSI, (SPI1_MOSI) | | -#define PB6 22 // | 22 | | | USART1_TX | TWI1_SCL | | | -#define PB7 23 // | 23 | | | USART1_RX | TWI1_SDA | | | -#define PB8 24 // | 24 | | | | TWI1_SCL | | | -#define PB9 25 // | 25 | | | | TWI1_SDA | SPI2_SS | | -#define PB10 26 // | 26 | | | USART3_TX | TWI2_SCL | SPI2_SCK | | -#define PB11 27 // | 27 | | | USART3_RX | TWI2_SDA | | | -#define PB12 28 // | 28 | | | | | SPI2_SS | | -#define PB13 29 // | 29 | | | | | SPI2_SCK | | -#define PB14 30 // | 30 | | | | | SPI2_MISO | | -#define PB15 31 // | 31 | | | | | SPI2_MOSI | | -// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PB2 18 // | 18 | | | | | | BOOT1 | +#define PB3 19 // | 19 | | | | | SPI3_SCK, (SPI1_SCK) | | +#define PB4 20 // | 20 | | | | | SPI3_MISO, (SPI1_MISO) | | +#define PB5 21 // | 21 | | | | | SPI3_MOSI, (SPI1_MOSI) | | +#define PB6 22 // | 22 | | | USART1_TX | TWI1_SCL | | | +#define PB7 23 // | 23 | | | USART1_RX | TWI1_SDA | | | +#define PB8 24 // | 24 | | | | TWI1_SCL | | | +#define PB9 25 // | 25 | | | | TWI1_SDA | SPI2_SS | | +#define PB10 26 // | 26 | | | USART3_TX | TWI2_SCL | SPI2_SCK | | +#define PB11 27 // | 27 | | | USART3_RX | TWI2_SDA | | | +#define PB12 28 // | 28 | | | | | SPI2_SS | | +#define PB13 29 // | 29 | | | | | SPI2_SCK | | +#define PB14 30 // | 30 | | | | | SPI2_MISO | | +#define PB15 31 // | 31 | | | | | SPI2_MOSI | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| #define PC0 PIN_A10 // | 32 | A10 (ADC1) | | | | | | #define PC1 PIN_A11 // | 33 | A11 (ADC1) | | | | | | #define PC2 PIN_A12 // | 34 | A12 (ADC1) | | | | SPI2_MISO | | #define PC3 PIN_A13 // | 35 | A13 (ADC1) | | | | SPI2_MOSI | | #define PC4 PIN_A14 // | 36 | A14 (ADC1) | | | | | | #define PC5 PIN_A15 // | 37 | A15 (ADC1) | | | | | | -#define PC6 38 // | 38 | | | USART6_TX | | | | -#define PC7 39 // | 39 | | | USART3_RX | | SPI2_SCK | | -#define PC8 40 // | 40 | | | | | | | -#define PC9 41 // | 41 | | | | TWI3_SDA | | | -#define PC10 42 // | 42 | | | USART3_TX, (UART4_TX) | | SPI3_SCK | | -#define PC11 43 // | 43 | | | USART3_RX, (UART4_RX) | | SPI3_MISO | | -#define PC12 44 // | 44 | | | UART5_TX | | SPI3_MOSI | | -#define PC13 45 // | 45 | | | | | | | -#define PC14 46 // | 46 | | | | | | OSC32_IN | -#define PC15 47 // | 47 | | | | | | OSC32_OUT | -// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| -#define PD2 48 // | 48 | | | UART5_RX | | | | -// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| -#define PH0 49 // | 49 | | | | | | OSC_IN | -#define PH1 50 // | 50 | | | | | | OSC_OUT | -// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PC6 38 // | 38 | | | USART6_TX | | | | +#define PC7 39 // | 39 | | | USART3_RX | | SPI2_SCK | | +#define PC8 40 // | 40 | | | | | | | +#define PC9 41 // | 41 | | | | TWI3_SDA | | | +#define PC10 42 // | 42 | | | USART3_TX, (UART4_TX) | | SPI3_SCK | | +#define PC11 43 // | 43 | | | USART3_RX, (UART4_RX) | | SPI3_MISO | | +#define PC12 44 // | 44 | | | UART5_TX | | SPI3_MOSI | | +#define PC13 45 // | 45 | | | | | | | +#define PC14 46 // | 46 | | | | | | OSC32_IN | +#define PC15 47 // | 47 | | | | | | OSC32_OUT | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PD2 48 // | 48 | | | UART5_RX | | | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PH0 49 // | 49 | | | | | | OSC_IN | +#define PH1 50 // | 50 | | | | | | OSC_OUT | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| /// This must be a literal #define NUM_DIGITAL_PINS 51 diff --git a/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/board/board.h b/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/board/board.h index 5664a1ad2c68..863c8041c9c2 100644 --- a/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/board/board.h +++ b/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/board/board.h @@ -119,117 +119,5 @@ PE0,PE1,PE2,PE3,PE4,PE5,PE6,PE7,PE8,PE9,PE10,PE11,PE12,PE13,PE14,PE15, PF0,PF1,PF2,PF3,PF4,PF5,PF6,PF7,PF8,PF9,PF10,PF11,PF12,PF13,PF14,PF15, PG0,PG1,PG2,PG3,PG4,PG5,PG6,PG7,PG8,PG9,PG10,PG11,PG12,PG13,PG14,PG15 };/* Note PB2 is skipped as this is Boot1 and is not going to be much use as its likely to be pulled permanently low */ -/* -#define PA0 0 -#define PA1 1 -#define PA2 2 -#define PA3 3 -#define PA4 4 -#define PA5 5 -#define PA6 6 -#define PA7 7 -#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 16 -#define PB1 17 -#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 32 -#define PC1 33 -#define PC2 34 -#define PC3 35 -#define PC4 36 -#define PC5 37 -#define PC6 38 -#define PC7 39 -#define PC8 40 -#define PC9 41 -#define PC10 42 -#define PC11 43 -#define PC12 44 -#define PC13 45 -#define PC14 46 -#define PC15 47 -#define PD0 48 -#define PD1 49 -#define PD2 50 -#define PD3 51 -#define PD4 52 -#define PD5 53 -#define PD6 54 -#define PD7 55 -#define PD8 56 -#define PD9 57 -#define PD10 58 -#define PD11 59 -#define PD12 60 -#define PD13 61 -#define PD14 62 -#define PD15 63 -#define PE0 64 -#define PE1 65 -#define PE2 66 -#define PE3 67 -#define PE4 68 -#define PE5 69 -#define PE6 70 -#define PE7 71 -#define PE8 72 -#define PE9 73 -#define PE10 74 -#define PE11 75 -#define PE12 76 -#define PE13 77 -#define PE14 78 -#define PE15 79 -#define PF0 80 -#define PF1 81 -#define PF2 82 -#define PF3 83 -#define PF4 84 -#define PF5 85 -#define PF6 86 -#define PF7 87 -#define PF8 88 -#define PF9 89 -#define PF10 90 -#define PF11 91 -#define PF12 92 -#define PF13 93 -#define PF14 94 -#define PF15 95 -#define PG0 96 -#define PG1 97 -#define PG2 98 -#define PG3 99 -#define PG4 100 -#define PG5 101 -#define PG6 102 -#define PG7 103 -#define PG8 104 -#define PG9 105 -#define PG10 106 -#define PG11 107 -#define PG12 108 -#define PG13 109 -#define PG14 110 -#define PG15 111 */ -#endif + +#endif // _BOARDS_GENERIC_STM32F103Z_H_ From 342048b1dfbf41e64bc39cf5c448cbb0bb238651 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 23 Dec 2023 00:20:19 +0000 Subject: [PATCH 029/236] [cron] Bump distribution date (2023-12-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 bdce222e8692..62078b7b99db 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-12-22" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 7c8ba14665b6..5a54bb73aefd 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-12-22" + #define STRING_DISTRIBUTION_DATE "2023-12-23" #endif /** From 3029a6b1aa4c436cdda352e2add5cd421beaf104 Mon Sep 17 00:00:00 2001 From: Mihai <299015+mh-dm@users.noreply.github.com> Date: Sat, 23 Dec 2023 09:45:37 +0200 Subject: [PATCH 030/236] =?UTF-8?q?=F0=9F=A9=B9=20Jerk=20correction=20for?= =?UTF-8?q?=20LIN=5FADVANCE=20+=20CLASSIC=5FJERK=20(#26551)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/module/planner.cpp | 81 +++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index f7ab42ad8164..0c6027bfdead 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2490,9 +2490,9 @@ bool Planner::_populate_block( * * extruder_advance_K[extruder] : There is an advance factor set for this extruder. * - * dist.e > 0 : Extruder is running forward (e.g., for "Wipe while retracting" (Slic3r) or "Combing" (Cura) moves) + * dm.e : Extruder is running forward (e.g., for "Wipe while retracting" (Slic3r) or "Combing" (Cura) moves) */ - use_advance_lead = esteps && extruder_advance_K[E_INDEX_N(extruder)] && dist.e > 0; + use_advance_lead = esteps && extruder_advance_K[E_INDEX_N(extruder)] && dm.e; if (use_advance_lead) { float e_D_ratio = (target_float.e - position_float.e) / @@ -2770,53 +2770,70 @@ bool Planner::_populate_block( * Heavily modified. Originally adapted from Průša firmware. * https://github.com/prusa3d/Prusa-Firmware */ - #ifndef TRAVEL_EXTRA_XYJERK - #define TRAVEL_EXTRA_XYJERK 0.0f + #if defined(TRAVEL_EXTRA_XYJERK) || ENABLED(LIN_ADVANCE) + xyze_float_t max_j = max_jerk; + #else + const xyze_float_t &max_j = max_jerk; #endif - const float extra_xyjerk = TERN0(HAS_EXTRUDERS, dist.e <= 0) ? TRAVEL_EXTRA_XYJERK : 0.0f; - if (!moves_queued || UNEAR_ZERO(previous_nominal_speed)) { - // Compute "safe" speed, limited by a jerk to/from full halt. + #ifdef TRAVEL_EXTRA_XYJERK + if (dist.e <= 0) { + max_j.x += TRAVEL_EXTRA_XYJERK; + max_j.y += TRAVEL_EXTRA_XYJERK; + } + #endif - float v_factor = 1.0f; - LOOP_LOGICAL_AXES(i) { - const float jerk = ABS(current_speed[i]), // Starting from zero, change in speed for this axis - maxj = max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f); // The max jerk setting for this axis - if (jerk * v_factor > maxj) v_factor = maxj / jerk; + #if ENABLED(LIN_ADVANCE) + // Advance affects E_AXIS speed and therefore jerk. Add a speed correction whenever + // LA is turned OFF. No correction is applied when LA is turned ON (because it didn't + // perform well; it takes more time/effort to push/melt filament than the reverse). + static uint32_t previous_advance_rate; + static float previous_e_mm_per_step; + if (dist.e < 0 && previous_advance_rate) { + // Retract move after a segment with LA that ended with an E speed decrease. + // Correct for this to allow a faster junction speed. Since the decrease always helps to + // get E to nominal retract speed, the equation simplifies to an increase in max jerk. + max_j.e += previous_advance_rate * previous_e_mm_per_step; } - vmax_junction_sqr = sq(block->nominal_speed * v_factor); - NOLESS(minimum_planner_speed_sqr, vmax_junction_sqr); + // Prepare for next segment. + previous_advance_rate = block->la_advance_rate; + previous_e_mm_per_step = mm_per_step[E_AXIS_N(extruder)]; + #endif + + xyze_float_t speed_diff = current_speed; + float vmax_junction; + const bool start_from_zero = !moves_queued || UNEAR_ZERO(previous_nominal_speed); + if (start_from_zero) { + // Limited by a jerk to/from full halt. + vmax_junction = block->nominal_speed; } else { // Compute the maximum velocity allowed at a joint of two successive segments. // The junction velocity will be shared between successive segments. Limit the junction velocity to their minimum. - float vmax_junction, previous_speed_factor, current_speed_factor; + // Scale per-axis velocities for the same vmax_junction. if (block->nominal_speed < previous_nominal_speed) { vmax_junction = block->nominal_speed; - previous_speed_factor = vmax_junction / previous_nominal_speed; - current_speed_factor = 1.0f; + const float previous_scale = vmax_junction / previous_nominal_speed; + LOOP_LOGICAL_AXES(i) speed_diff[i] -= previous_speed[i] * previous_scale; } else { vmax_junction = previous_nominal_speed; - previous_speed_factor = 1.0f; - current_speed_factor = vmax_junction / block->nominal_speed; + const float current_scale = vmax_junction / block->nominal_speed; + LOOP_LOGICAL_AXES(i) speed_diff[i] = speed_diff[i] * current_scale - previous_speed[i]; } + } - // Now limit the jerk in all axes. - float v_factor = 1.0f; - LOOP_LOGICAL_AXES(i) { - // Scale per-axis velocities for the same vmax_junction. - const float v_exit = previous_speed[i] * previous_speed_factor, - v_entry = current_speed[i] * current_speed_factor; - - // Jerk is the per-axis velocity difference. - const float jerk = ABS(v_exit - v_entry), - maxj = max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f); - if (jerk * v_factor > maxj) v_factor = maxj / jerk; - } - vmax_junction_sqr = sq(vmax_junction * v_factor); + // Now limit the jerk in all axes. + float v_factor = 1.0f; + LOOP_LOGICAL_AXES(i) { + // Jerk is the per-axis velocity difference. + const float jerk = ABS(speed_diff[i]), maxj = max_j[i]; + if (jerk * v_factor > maxj) v_factor = maxj / jerk; } + vmax_junction_sqr = sq(vmax_junction * v_factor); + + if (start_from_zero) minimum_planner_speed_sqr = vmax_junction_sqr; #endif // CLASSIC_JERK From 205b0a679e3ca7cbf7ca590279d1cd4ed0c284c1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 23 Dec 2023 04:19:23 -0600 Subject: [PATCH 031/236] =?UTF-8?q?=F0=9F=8E=A8=20Whitespace=20in=20the=20?= =?UTF-8?q?rightplace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/ft_motion.cpp | 10 +++++----- Marlin/src/module/ft_motion.h | 1 - Marlin/src/module/stepper.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index a2049db3b63f..674b66f581cb 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -324,7 +324,7 @@ void FTMotion::loop() { x.Ai[1] = (0.5f - x.Ai[0]) * Kx; x.Ai[2] = x.Ai[1] * Kx; x.Ai[3] = x.Ai[0] * cu(Kx); - + const float vtoly2 = sq(vtol[1]); const float Y = pow(vtoly2 * (sqrt(1.0f - vtoly2) + 1.0f), 1.0f / 3.0f); y.Ai[0] = (3.0f * sq(Y) + 2.0f * Y + 3.0f * vtoly2) / (16.0f * Y); @@ -361,7 +361,7 @@ void FTMotion::loop() { x.Ai[i] *= X_adj; y.Ai[i] *= Y_adj; } - } + } break; case ftMotionMode_MZV: { @@ -375,7 +375,7 @@ void FTMotion::loop() { y.Ai[0] = 1.0f / (1.0f + By + Ky2); y.Ai[1] = y.Ai[0] * By; y.Ai[2] = y.Ai[0] * Ky2; - } + } break; default: @@ -383,7 +383,7 @@ void FTMotion::loop() { ZERO(y.Ai); max_i = 0; } - + } void FTMotion::updateShapingA(float zeta[]/*=cfg.zeta*/, float vtol[]/*=cfg.vtol*/) { @@ -428,7 +428,7 @@ void FTMotion::loop() { void FTMotion::updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), float zeta[]/*=cfg.zeta*/) { const float xdf = sqrt(1.0f - sq(zeta[0])); shaping.x.updateShapingN(xf, xdf); - + #if HAS_Y_AXIS const float ydf = sqrt(1.0f - sq(zeta[1])); shaping.y.updateShapingN(yf, ydf); diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h index cea754088138..f4a65fdd5e92 100644 --- a/Marlin/src/module/ft_motion.h +++ b/Marlin/src/module/ft_motion.h @@ -44,7 +44,6 @@ typedef struct FTConfig { #if HAS_X_AXIS float baseFreq[1 + ENABLED(HAS_Y_AXIS)] = // Base frequency. [Hz] { FTM_SHAPING_DEFAULT_X_FREQ OPTARG(HAS_Y_AXIS, FTM_SHAPING_DEFAULT_Y_FREQ) }; - float zeta[1 + ENABLED(HAS_Y_AXIS)] = // Damping factor { FTM_SHAPING_ZETA_X OPTARG(HAS_Y_AXIS, FTM_SHAPING_ZETA_Y) }; float vtol[1 + ENABLED(HAS_Y_AXIS)] = // Vibration Level diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 862b2728042d..8dda2eec4001 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3552,7 +3552,7 @@ void Stepper::report_positions() { // Sync block? Sync the stepper counts and return while (current_block->is_sync()) { TERN_(LASER_FEATURE, if (!(current_block->is_fan_sync() || current_block->is_pwr_sync()))) _set_position(current_block->position); - + planner.release_current_block(); // Try to get a new block From 71e0275a4c1c54b5083ac49b9a12e19e149f055e Mon Sep 17 00:00:00 2001 From: Skopus <71988971+skopusdotorg@users.noreply.github.com> Date: Sat, 23 Dec 2023 13:54:19 +0330 Subject: [PATCH 032/236] =?UTF-8?q?=E2=9C=A8=20Orca=203D=20Modular=20Contr?= =?UTF-8?q?oller=20(#26534)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + .../src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h | 341 ++++++++++++++++++ ini/stm32f1.ini | 12 + 4 files changed, 356 insertions(+) create mode 100644 Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index b51513bca9d6..49570241e7fe 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -401,6 +401,7 @@ #define BOARD_KEDI_CONTROLLER_V1_2 5069 // EDUTRONICS Kedi Controller V1.2 (STM32F103RC) #define BOARD_MD_D301 5070 // Mingda D2 DZ301 V1.0 (STM32F103ZE) #define BOARD_VOXELAB_AQUILA 5071 // Voxelab Aquila V1.0.0/V1.0.1 (GD32F103RC / N32G455RE / STM32F103RE) +#define BOARD_SPRINGER_CONTROLLER 5072 // ORCA 3D SPRINGER Modular Controller (STM32F103VC) // // ARM Cortex-M4F diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 842a79c320e4..0728f5899498 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -702,6 +702,8 @@ #include "stm32f1/pins_MD_D301.h" // STM32F1 env:mingda_d301 env:mingda_d301_maple #elif MB(VOXELAB_AQUILA) #include "gd32f1/pins_VOXELAB_AQUILA.h" // GD32F1, N32G4, STM32F1 env:GD32F103RC_voxelab_maple env:N32G455RE_voxelab_maple env:STM32F103RE_creality_maple env:STM32F103RE_creality +#elif MB(SPRINGER_CONTROLLER) + #include "stm32f1/pins_ORCA_3D_SPRINGER.h" // STM32F1 env:STM32F103VC_orca3d // // ARM Cortex-M4F diff --git a/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h new file mode 100644 index 000000000000..b2afe6de9bde --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h @@ -0,0 +1,341 @@ +/** + * 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 + +/** + * ORCA 3D Modular Controller (STM32F103VCT6) board pin assignments + */ + +#if NOT_TARGET(__STM32F1__, STM32F1) + #error "Oops! Select an STM32F1 board in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "ORCA 3D Modular Controller" + +// Avoid conflict with TIMER_SERVO when using the STM32 HAL +#define TEMP_TIMER 5 + +// +// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role +// +#define DISABLE_DEBUG + +// +// Servos +// +#define SERVO0_PIN PA8 // Enable BLTOUCH + +// +// Limit Switches +// +#define X_STOP_PIN PA15 +#define Y_STOP_PIN PA14 +#define Z_STOP_PIN PA12 + +// +// Steppers +// +#define X_ENABLE_PIN PC15 +#define X_STEP_PIN PE5 +#define X_DIR_PIN PE6 +#ifndef X_CS_PIN + #define X_CS_PIN PE3 +#endif + +#define Y_ENABLE_PIN PC15 +#define Y_STEP_PIN PC14 +#define Y_DIR_PIN PC13 +#ifndef Y_CS_PIN + #define Y_CS_PIN PE4 +#endif + +#define Z_ENABLE_PIN PB4 +#define Z_STEP_PIN PB5 +#define Z_DIR_PIN PB6 +#ifndef Z_CS_PIN + #define Z_CS_PIN PB3 +#endif + +#define E0_ENABLE_PIN PE2 +#define E0_STEP_PIN PE1 +#define E0_DIR_PIN PE0 +#ifndef E0_CS_PIN + #define E0_CS_PIN PB7 +#endif + +#define E1_ENABLE_PIN PB11 +#define E1_STEP_PIN PC7 +#define E1_DIR_PIN PC6 +#ifndef E1_CS_PIN + #define E1_CS_PIN PD15 +#endif + +#define E2_ENABLE_PIN PD7 +#define E2_STEP_PIN PD6 +#define E2_DIR_PIN PD5 +#ifndef E2_CS_PIN + #define E2_CS_PIN PD4 +#endif + +#define E3_ENABLE_PIN PD14 +#define E3_STEP_PIN PD13 +#define E3_DIR_PIN PC5 +#ifndef E3_CS_PIN + #define E3_CS_PIN PD11 +#endif + +#define E4_ENABLE_PIN PD3 +#define E4_STEP_PIN PE14 +#define E4_DIR_PIN PD9 +#ifndef E4_CS_PIN + #define E4_CS_PIN PD8 +#endif + +// +// SPI pins for TMC2130 stepper drivers +// +#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 + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL MSerial1 + //#define Y_HARDWARE_SERIAL MSerial1 + //#define Z_HARDWARE_SERIAL MSerial1 + //#define E0_HARDWARE_SERIAL MSerial1 + //#define E1_HARDWARE_SERIAL MSerial1 + + #define X_SERIAL_TX_PIN PE3 + #define X_SERIAL_RX_PIN PE3 + + #define Y_SERIAL_TX_PIN PE4 + #define Y_SERIAL_RX_PIN PE4 + + #define Z_SERIAL_TX_PIN PB3 + #define Z_SERIAL_RX_PIN PB3 + + #define E0_SERIAL_TX_PIN PB7 + #define E0_SERIAL_RX_PIN PB7 + + #define E1_SERIAL_TX_PIN PD15 + #define E1_SERIAL_RX_PIN PD15 + + #define E2_SERIAL_TX_PIN PD11 + #define E2_SERIAL_RX_PIN PD11 + + #define E3_SERIAL_TX_PIN PD8 + #define E3_SERIAL_RX_PIN PD8 + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif + +#endif // HAS_TMC_UART + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC1 // TH1 +#define TEMP_1_PIN PC2 // TH2 +#define TEMP_2_PIN PC3 // TH2 +#define TEMP_3_PIN PC4 // TH2 +#define TEMP_BED_PIN PC0 // TB1 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PB1 // HEATER1 +#define HEATER_1_PIN PB2 // HEATER2 +#define HEATER_2_PIN PB10 // HEATER2 +#define HEATER_3_PIN PB12 // HEATER2 +#define HEATER_BED_PIN PB0 // HOT BED + +#define FAN0_PIN PA0 // FAN +#define FAN1_PIN PA1 // FAN +#define FAN2_PIN PA2 // FAN +#define FAN3_PIN PA3 // FAN + +// +// LCD / Controller +// + +/** + * Note: ORCA 3D Modular Controller uses various TFT controllers. + * - For TFT displays use UART0 + * - For 12864 displays use the expansion headers + */ + +/** ------ ------ + * -- | 1 2 | PE10 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) + * (LCD_EN) PE11 | 3 4 | PD10 (LCD_RS) (BTN_EN1) PE8 | 3 4 | PA4 (SD_SS) + * (LCD_D4) PE12 | 5 6 | PE13 (LCD_D5) (BTN_EN2) PE9 | 5 6 | PA7 (MOSI) + * (LCD_D6) PE15 | 7 8 | PE7 (LCD_D7) (SD_DETECT) PD12 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN -1 // No BEEPER +#define EXP1_02_PIN PE10 // ENC +#define EXP1_03_PIN PE11 // LCD_EN +#define EXP1_04_PIN PD10 // LCD_RS +#define EXP1_05_PIN PE12 // LCD_D4 +#define EXP1_06_PIN PE13 // LCD_D5 +#define EXP1_07_PIN PE15 // LCD_D6 +#define EXP1_08_PIN PE7 // LCD_D7 + +#define EXP2_01_PIN PA6 // MISO +#define EXP2_02_PIN PA5 // SCK +#define EXP2_03_PIN PE8 // EN1 +#define EXP2_04_PIN PA4 // SD_SS +#define EXP2_05_PIN PE9 // EN2 +#define EXP2_06_PIN PA7 // MOSI +#define EXP2_07_PIN PD12 // SD_DET +#define EXP2_08_PIN -1 // RESET + +// +// SD Card +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(LCD) + #define SPI_DEVICE 1 + #define SD_DETECT_PIN EXP2_07_PIN + #define SD_SCK_PIN EXP2_02_PIN + #define SD_MISO_PIN EXP2_01_PIN + #define SD_MOSI_PIN EXP2_06_PIN + #define SD_SS_PIN EXP2_04_PIN +#elif SD_CONNECTION_IS(ONBOARD) + #define SD_DETECT_PIN PA3 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_SS_PIN PA4 +#endif +#define ONBOARD_SPI_DEVICE 1 // SPI1 +#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card + +// +// LCD / Controller +// +#if HAS_WIRED_LCD + #define BEEPER_PIN EXP1_01_PIN // NC + #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_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + + #elif IS_TFTGLCD_PANEL + + #undef BEEPER_PIN + #undef BTN_ENC + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS EXP2_03_PIN + #endif + + #define SD_DETECT_PIN EXP2_07_PIN + + #else + + #define LCD_PINS_RS EXP1_04_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + + #define LCD_PINS_EN EXP1_03_PIN + + #if ENABLED(FYSETC_MINI_12864) + + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN + + #define FORCE_SOFT_SPI // SPI MODE3 + + #define LED_PIN EXP1_06_PIN // red pwm + //#define LED_PIN EXP1_07_PIN // green + //#define LED_PIN EXP1_08_PIN // blue + + //#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 + + #else // !FYSETC_MINI_12864 + + #define LCD_PINS_D4 EXP1_05_PIN + #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 // !FYSETC_MINI_12864 + + #endif + +#endif // HAS_WIRED_LCD + +// Alter timing for graphical display +#if IS_U8GLIB_ST7920 + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 +#endif diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 11814e4b160d..b164615c891c 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -493,3 +493,15 @@ board_build.variant = MARLIN_F103Zx board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 build_flags = ${stm32_variant.build_flags} -DSTM32F1xx + +# +# ORCA 3D SPRINGER Modular Controller (STM32F103VCT6) +# +[env:STM32F103VC_orca3d] +extends = stm32_variant +board = genericSTM32F103VC +board_build.variant = MARLIN_F103Vx +build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0 +monitor_speed = 115200 +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 From d1ebaba71d4256485f0e306b548f52d921718679 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 23 Dec 2023 16:25:55 -0600 Subject: [PATCH 033/236] =?UTF-8?q?=F0=9F=94=A8=20Remove=20signature.py=20?= =?UTF-8?q?debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/signature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index d2502db35861..bfe7ab4a7394 100755 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -370,7 +370,7 @@ def tryint(key): else: for header in real_config: conf = real_config[header] - print(f"real_config[{header}]", conf) + #print(f"real_config[{header}]", conf) for name in conf: json_data[name] = conf[name]['value'] From fa8d2bd108725eb9b23468e3823e5936e03a4209 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 24 Dec 2023 00:23:04 +0000 Subject: [PATCH 034/236] [cron] Bump distribution date (2023-12-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 62078b7b99db..a2f0cc81abaa 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-12-23" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 5a54bb73aefd..3fd20c352542 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-12-23" + #define STRING_DISTRIBUTION_DATE "2023-12-24" #endif /** From 18b0dbb5018dafbb298d043e15b0623c3f0f72b3 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon, 25 Dec 2023 07:07:00 +1300 Subject: [PATCH 035/236] =?UTF-8?q?=F0=9F=90=9B=20Creality=20Free=20Runs?= =?UTF-8?q?=20fixups=20(#26562)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25636, #26533 Co-authored-by: Scott Lahteine --- Marlin/src/inc/Changes.h | 2 + Marlin/src/inc/Warnings.cpp | 7 ++ Marlin/src/pins/mega/pins_GT2560_V3_A20.h | 4 - Marlin/src/pins/mega/pins_GT2560_V4_A20.h | 4 - .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 2 +- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 2 +- .../src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h | 2 +- .../pins/stm32f4/pins_CREALITY_CR4NTXXC10.h | 99 ++++++++----------- Marlin/src/pins/stm32f4/pins_CREALITY_F401.h | 2 +- ini/stm32f4.ini | 7 +- 10 files changed, 55 insertions(+), 76 deletions(-) diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index f951d76ee7a0..693cb592e62c 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -669,6 +669,8 @@ #error "Z_PROBE_OFFSET_RANGE_(MIN|MAX) is now PROBE_OFFSET_Z(MIN|MAX)." #elif defined(LARGE_MOVE_ITEMS) #error "LARGE_MOVE_ITEMS is obsolete. Instead define MANUAL_MOVE_DISTANCE_MM and MANUAL_MOVE_DISTANCE_IN." +#elif defined(SDIO_SUPPORT) + #error "SDIO_SUPPORT is now ONBOARD_SDIO." #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 1824ac58c9b6..7965336df7eb 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -811,3 +811,10 @@ #if HAL_ADC_VREF_MV < 5000 && ANY_THERMISTOR_IS(-1) && DISABLED(ALLOW_AD595_3V3_VREF) #warning "The (-1) AD595 Thermocouple Amplifier requires 5V input supply! Use AD8495 for 3.3V ADC." #endif + +/** + * No PWM on the Piezo Beeper? + */ +#if PIN_EXISTS(BEEPER) && ALL(SPEAKER, NO_SPEAKER) + #warning "The BEEPER cannot produce tones so you can disable SPEAKER." +#endif diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index 2422dfdd73e5..9bc0a9d56ca6 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -33,10 +33,6 @@ #define LCD_PINS_D7 6 #endif -#ifndef SPEAKER - #define SPEAKER // The speaker can produce tones -#endif - #if IS_NEWPANEL #define BTN_EN1 16 #define BTN_EN2 17 diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h index 405a3aba5bf8..95e24f5d31e6 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -35,10 +35,6 @@ #define LCD_PINS_D7 6 #endif -#ifndef SPEAKER - #define SPEAKER // The speaker can produce tones -#endif - #if IS_NEWPANEL #define BTN_EN1 16 #define BTN_EN2 17 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 6f41bd6848c9..87f83a5c96bc 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -228,7 +228,7 @@ #ifndef BEEPER_PIN #define BEEPER_PIN EXP1_01_PIN - #undef SPEAKER + #define NO_SPEAKER #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index 699f10ed481e..d55669ac90c6 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -281,7 +281,7 @@ #ifndef BEEPER_PIN #define BEEPER_PIN EXP1_01_PIN - #undef SPEAKER + #define NO_SPEAKER #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) diff --git a/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h b/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h index 039333adfa91..9ad0da13f53d 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h +++ b/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h @@ -114,7 +114,7 @@ #define SD_DETECT_PIN -1 #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 SD_CONNECTION_IS(ONBOARD) diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h index 0a6f3e3059bf..d25cd6c17e42 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -100,15 +100,15 @@ #define X_STEP_PIN PC2 #define X_DIR_PIN PB9 -#define Y_ENABLE_PIN X_ENABLE_PIN +#define Y_ENABLE_PIN X_ENABLE_PIN #define Y_STEP_PIN PB8 #define Y_DIR_PIN PB7 -#define Z_ENABLE_PIN X_ENABLE_PIN +#define Z_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN PB6 #define Z_DIR_PIN PB5 -#define E0_ENABLE_PIN X_ENABLE_PIN +#define E0_ENABLE_PIN X_ENABLE_PIN #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB3 @@ -188,74 +188,55 @@ // #define SD_DETECT_PIN PC1 #define SDCARD_CONNECTION ONBOARD -#define ONBOARD_SPI_DEVICE 1 -//#define ONBOARD_SD_CS_PIN PA4 // SDSS -#define SDIO_SUPPORT +#define ONBOARD_SDIO +#define SDIO_CLOCK 4500000 +#define SDIO_READ_RETRIES 16 #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if ENABLED(CR10_STOCKDISPLAY) - - #if ENABLED(RET6_12864_LCD) - // RET6 12864 LCD - #define LCD_PINS_RS PB12 - #define LCD_PINS_EN PB15 - #define LCD_PINS_D4 PB13 - - #define BTN_ENC PB2 - #define BTN_EN1 PA2 - #define BTN_EN2 PB14 +/** + * ------ + * PC0 | 1 2 | PB2 + * TX2 PA2 | 3 4 | PA3 RX2 + * SPI2_MISO PB14 | 5 6 | PB13 SPI2_SCK + * SPI2_NSS PB12 | 7 8 | PB15 SPI2_MOSI + * GND | 9 10 | 5V + * ------ + * EXP1 + */ +#define EXP1_01_PIN PC0 +#define EXP1_02_PIN PB2 +#define EXP1_03_PIN PA2 +#define EXP1_04_PIN PA3 +#define EXP1_05_PIN PB14 +#define EXP1_06_PIN PB13 +#define EXP1_07_PIN PB12 +#define EXP1_08_PIN PB15 - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN PC0 - #endif +#if ENABLED(CR10_STOCKDISPLAY) - #elif ENABLED(VET6_12864_LCD) - // VET6 12864 LCD - #define LCD_PINS_RS PA4 - //#define LCD_PINS_EN PA7 - #define LCD_PINS_D4 PA5 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN - #define BTN_ENC PC5 - #define BTN_EN1 PB10 - #define BTN_EN2 PA6 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN - #else - #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the CREALITY_CR4NTXXC10 controller." + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN EXP1_01_PIN #endif #elif ENABLED(DWIN_CREALITY_LCD) - // RET6 DWIN ENCODER LCD - #define BTN_ENC PB14 - #define BTN_EN1 PB15 - #define BTN_EN2 PB12 + // DWIN ENCODER LCD + #define BTN_ENC EXP1_05_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_07_PIN - //#define LCD_LED_PIN PB2 + //#define LCD_LED_PIN EXP1_02_PIN #ifndef BEEPER_PIN - #define BEEPER_PIN PB13 - #undef SPEAKER + #define BEEPER_PIN EXP1_06_PIN + #define NO_SPEAKER #endif -#elif ENABLED(DWIN_VET6_CREALITY_LCD) - - // VET6 DWIN ENCODER LCD - #define BTN_ENC PA6 - //#define BTN_EN1 PA7 - #define BTN_EN2 PA4 - - #define BEEPER_PIN PA5 - -#endif - -// -// M3/M4/M5 - Spindle/Laser Control -// -#if HAS_CUTTER - //#undef HEATER_0_PIN - //#undef HEATER_BED_PIN - //#undef FAN0_PIN - #define SPINDLE_LASER_ENA_PIN PC0 // FET 1 - #define SPINDLE_LASER_PWM_PIN PC0 // Bed FET - #define SPINDLE_DIR_PIN PC0 // FET 4 - //#define LASER_SOFT_PWM_PIN PC0 #endif diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h b/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h index b4c5bad0938a..50e766c35bd4 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_F401.h @@ -125,7 +125,7 @@ #define SDCARD_CONNECTION ONBOARD #define ONBOARD_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 // SPI 2 diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 3f3347194334..de0a5c7d37ae 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -742,17 +742,14 @@ upload_protocol = stlink # [env:STM32F401RE_freeruns] extends = stm32_variant -board = genericSTM32F401RE -board_build.variant = marlin_STM32F401RE_freeruns +board = marlin_STM32F401RE_freeruns board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 board_build.rename = firmware-{date}-{time}.bin -build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RE -DSTM32F4 +build_flags = ${stm32_variant.build_flags} -DSTM32F401xE -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DTRANSFER_CLOCK_DIV=8 build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${stm32_variant.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/random-bin.py monitor_speed = 115200 [env:STM32F401RE_freeruns_jlink] From 0f0955492994f4a7f4649c22e0f3aa5cc71541d7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 24 Dec 2023 14:53:09 -0600 Subject: [PATCH 036/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20DWI?= =?UTF-8?q?N=20icon=20updates,=20etc.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/pause.h | 6 +- Marlin/src/lcd/e3v2/common/dwin_color.h | 1 + Marlin/src/lcd/e3v2/common/dwin_set.h | 11 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 4 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 10 +- Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp | 68 +++--- Marlin/src/lcd/e3v2/proui/dwin.cpp | 33 ++- Marlin/src/lcd/e3v2/proui/dwinui.h | 220 +++++++++--------- buildroot/share/dwin/bin/DWIN_ICO.py | 204 ++++++++-------- .../000-ICON_BootLogo.jpg | Bin .../001-ICON_OpenSourceFirmware.jpg | Bin .../{icons-2 => icons-3}/002-ICON_GitHub.jpg | Bin .../{icons-2 => icons-3}/003-ICON_Website.jpg | Bin .../004-ICON_Copyright.jpg | Bin .../000-ICON_LOGO_Marlin.jpg | Bin .../001-ICON_HotendOff.jpg | Bin .../002-ICON_HotendOn.jpg | Bin .../{icons-3 => icons-4}/003-ICON_BedOff.jpg | Bin .../{icons-3 => icons-4}/004-ICON_BedOn.jpg | Bin .../{icons-3 => icons-4}/005-ICON_Fan0.jpg | Bin .../{icons-3 => icons-4}/006-ICON_Fan1.jpg | Bin .../{icons-3 => icons-4}/007-ICON_Fan2.jpg | Bin .../{icons-3 => icons-4}/008-ICON_Fan3.jpg | Bin .../{icons-3 => icons-4}/009-ICON_Halted.jpg | Bin .../010-ICON_Question.jpg | Bin .../{icons-3 => icons-4}/011-ICON_Alert.jpg | Bin .../012-ICON_RotateCW.jpg | Bin .../013-ICON_RotateCCW.jpg | Bin .../{icons-3 => icons-4}/014-ICON_UpArrow.jpg | Bin .../015-ICON_DownArrow.jpg | Bin .../000-ICON_LOGO_Creality.jpg | Bin .../{icons-6 => icons-7}/001-ICON_Print_0.jpg | Bin .../{icons-6 => icons-7}/002-ICON_Print_1.jpg | Bin .../003-ICON_Prepare_0.jpg | Bin .../004-ICON_Prepare_1.jpg | Bin .../005-ICON_Control_0.jpg | Bin .../006-ICON_Control_1.jpg | Bin .../007-ICON_Leveling_0.jpg | Bin .../008-ICON_Leveling_1.jpg | Bin .../009-ICON_HotendTemp.jpg | Bin .../{icons-6 => icons-7}/010-ICON_BedTemp.jpg | Bin .../{icons-6 => icons-7}/011-ICON_Speed.jpg | Bin .../{icons-6 => icons-7}/012-ICON_Zoffset.jpg | Bin .../{icons-6 => icons-7}/013-ICON_Back.jpg | Bin .../{icons-6 => icons-7}/014-ICON_File.jpg | Bin .../015-ICON_PrintTime.jpg | Bin .../016-ICON_RemainTime.jpg | Bin .../{icons-6 => icons-7}/017-ICON_Setup_0.jpg | Bin .../{icons-6 => icons-7}/018-ICON_Setup_1.jpg | Bin .../{icons-6 => icons-7}/019-ICON_Pause_0.jpg | Bin .../{icons-6 => icons-7}/020-ICON_Pause_1.jpg | Bin .../021-ICON_Continue_0.jpg | Bin .../022-ICON_Continue_1.jpg | Bin .../{icons-6 => icons-7}/023-ICON_Stop_0.jpg | Bin .../{icons-6 => icons-7}/024-ICON_Stop_1.jpg | Bin .../{icons-6 => icons-7}/025-ICON_Bar.jpg | Bin .../{icons-6 => icons-7}/026-ICON_More.jpg | Bin .../{icons-6 => icons-7}/027-ICON_Axis.jpg | Bin .../028-ICON_CloseMotor.jpg | Bin .../{icons-6 => icons-7}/029-ICON_Homing.jpg | Bin .../{icons-6 => icons-7}/030-ICON_SetHome.jpg | Bin .../031-ICON_PLAPreheat.jpg | Bin .../032-ICON_ABSPreheat.jpg | Bin .../{icons-6 => icons-7}/033-ICON_Cool.jpg | Bin .../034-ICON_Language.jpg | Bin .../{icons-6 => icons-7}/035-ICON_MoveX.jpg | Bin .../{icons-6 => icons-7}/036-ICON_MoveY.jpg | Bin .../{icons-6 => icons-7}/037-ICON_MoveZ.jpg | Bin .../038-ICON_Extruder.jpg | Bin .../040-ICON_Temperature.jpg | Bin .../{icons-6 => icons-7}/041-ICON_Motion.jpg | Bin .../042-ICON_WriteEEPROM.jpg | Bin .../043-ICON_ReadEEPROM.jpg | Bin .../044-ICON_ResetEEPROM.jpg} | Bin .../{icons-6 => icons-7}/045-ICON_Info.jpg | Bin .../046-ICON_SetEndTemp.jpg | Bin .../047-ICON_SetBedTemp.jpg | Bin .../048-ICON_FanSpeed.jpg | Bin .../049-ICON_SetPLAPreheat.jpg | Bin .../050-ICON_SetABSPreheat.jpg | Bin .../051-ICON_MaxSpeed.jpg | Bin .../052-ICON_MaxAccelerated.jpg | Bin .../{icons-6 => icons-7}/053-ICON_MaxJerk.jpg | Bin .../{icons-6 => icons-7}/054-ICON_Step.jpg | Bin .../055-ICON_PrintSize.jpg | Bin .../{icons-6 => icons-7}/056-ICON_Version.jpg | Bin .../{icons-6 => icons-7}/057-ICON_Contact.jpg | Bin .../058-ICON_StockConfiguraton.jpg | Bin .../059-ICON_MaxSpeedX.jpg | Bin .../060-ICON_MaxSpeedY.jpg | Bin .../061-ICON_MaxSpeedZ.jpg | Bin .../062-ICON_MaxSpeedE.jpg | Bin .../{icons-6 => icons-7}/063-ICON_MaxAccX.jpg | Bin .../{icons-6 => icons-7}/064-ICON_MaxAccY.jpg | Bin .../{icons-6 => icons-7}/065-ICON_MaxAccZ.jpg | Bin .../{icons-6 => icons-7}/066-ICON_MaxAccE.jpg | Bin .../067-ICON_MaxSpeedJerkX.jpg | Bin .../068-ICON_MaxSpeedJerkY.jpg | Bin .../069-ICON_MaxSpeedJerkZ.jpg | Bin .../070-ICON_MaxSpeedJerkE.jpg | Bin .../{icons-6 => icons-7}/071-ICON_StepX.jpg | Bin .../{icons-6 => icons-7}/072-ICON_StepY.jpg | Bin .../{icons-6 => icons-7}/073-ICON_StepZ.jpg | Bin .../{icons-6 => icons-7}/074-ICON_StepE.jpg | Bin .../075-ICON_Setspeed.jpg | Bin .../076-ICON_SetZOffset.jpg | Bin .../077-ICON_Rectangle.jpg | Bin .../{icons-6 => icons-7}/078-ICON_BLTouch.jpg | Bin .../079-ICON_TempTooLow.jpg | Bin .../080-ICON_AutoLeveling.jpg | Bin .../081-ICON_TempTooHigh.jpg | Bin .../082-ICON_NoTips_C.jpg | Bin .../083-ICON_NoTips_E.jpg | Bin .../084-ICON_Continue_C.jpg | Bin .../085-ICON_Continue_E.jpg | Bin .../086-ICON_Cancel_C.jpg | Bin .../087-ICON_Cancel_E.jpg | Bin .../088-ICON_Confirm_C.jpg | Bin .../089-ICON_Confirm_E.jpg | Bin .../{icons-6 => icons-7}/090-ICON_Info_0.jpg | Bin .../{icons-6 => icons-7}/091-ICON_Info_1.jpg | Bin buildroot/share/dwin/make_jpgs.sh | 42 ++-- 122 files changed, 282 insertions(+), 317 deletions(-) rename buildroot/share/dwin/{icons-2 => icons-3}/000-ICON_BootLogo.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/001-ICON_OpenSourceFirmware.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/002-ICON_GitHub.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/003-ICON_Website.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/004-ICON_Copyright.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/000-ICON_LOGO_Marlin.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/001-ICON_HotendOff.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/002-ICON_HotendOn.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/003-ICON_BedOff.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/004-ICON_BedOn.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/005-ICON_Fan0.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/006-ICON_Fan1.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/007-ICON_Fan2.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/008-ICON_Fan3.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/009-ICON_Halted.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/010-ICON_Question.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/011-ICON_Alert.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/012-ICON_RotateCW.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/013-ICON_RotateCCW.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/014-ICON_UpArrow.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/015-ICON_DownArrow.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/000-ICON_LOGO_Creality.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/001-ICON_Print_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/002-ICON_Print_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/003-ICON_Prepare_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/004-ICON_Prepare_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/005-ICON_Control_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/006-ICON_Control_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/007-ICON_Leveling_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/008-ICON_Leveling_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/009-ICON_HotendTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/010-ICON_BedTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/011-ICON_Speed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/012-ICON_Zoffset.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/013-ICON_Back.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/014-ICON_File.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/015-ICON_PrintTime.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/016-ICON_RemainTime.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/017-ICON_Setup_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/018-ICON_Setup_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/019-ICON_Pause_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/020-ICON_Pause_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/021-ICON_Continue_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/022-ICON_Continue_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/023-ICON_Stop_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/024-ICON_Stop_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/025-ICON_Bar.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/026-ICON_More.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/027-ICON_Axis.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/028-ICON_CloseMotor.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/029-ICON_Homing.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/030-ICON_SetHome.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/031-ICON_PLAPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/032-ICON_ABSPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/033-ICON_Cool.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/034-ICON_Language.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/035-ICON_MoveX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/036-ICON_MoveY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/037-ICON_MoveZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/038-ICON_Extruder.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/040-ICON_Temperature.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/041-ICON_Motion.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/042-ICON_WriteEEPROM.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/043-ICON_ReadEEPROM.jpg (100%) rename buildroot/share/dwin/{icons-6/044-ICON_ResumeEEPROM.jpg => icons-7/044-ICON_ResetEEPROM.jpg} (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/045-ICON_Info.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/046-ICON_SetEndTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/047-ICON_SetBedTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/048-ICON_FanSpeed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/049-ICON_SetPLAPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/050-ICON_SetABSPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/051-ICON_MaxSpeed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/052-ICON_MaxAccelerated.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/053-ICON_MaxJerk.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/054-ICON_Step.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/055-ICON_PrintSize.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/056-ICON_Version.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/057-ICON_Contact.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/058-ICON_StockConfiguraton.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/059-ICON_MaxSpeedX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/060-ICON_MaxSpeedY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/061-ICON_MaxSpeedZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/062-ICON_MaxSpeedE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/063-ICON_MaxAccX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/064-ICON_MaxAccY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/065-ICON_MaxAccZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/066-ICON_MaxAccE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/067-ICON_MaxSpeedJerkX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/068-ICON_MaxSpeedJerkY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/069-ICON_MaxSpeedJerkZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/070-ICON_MaxSpeedJerkE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/071-ICON_StepX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/072-ICON_StepY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/073-ICON_StepZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/074-ICON_StepE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/075-ICON_Setspeed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/076-ICON_SetZOffset.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/077-ICON_Rectangle.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/078-ICON_BLTouch.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/079-ICON_TempTooLow.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/080-ICON_AutoLeveling.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/081-ICON_TempTooHigh.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/082-ICON_NoTips_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/083-ICON_NoTips_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/084-ICON_Continue_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/085-ICON_Continue_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/086-ICON_Cancel_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/087-ICON_Cancel_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/088-ICON_Confirm_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/089-ICON_Confirm_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/090-ICON_Info_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/091-ICON_Info_1.jpg (100%) diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index 7ea0c03b6bbb..45f62dc31029 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -48,15 +48,15 @@ enum PauseMessage : char { PAUSE_MESSAGE_PARKING, PAUSE_MESSAGE_CHANGING, PAUSE_MESSAGE_WAITING, - PAUSE_MESSAGE_UNLOAD, PAUSE_MESSAGE_INSERT, PAUSE_MESSAGE_LOAD, + PAUSE_MESSAGE_UNLOAD, PAUSE_MESSAGE_PURGE, PAUSE_MESSAGE_OPTION, PAUSE_MESSAGE_RESUME, - PAUSE_MESSAGE_STATUS, PAUSE_MESSAGE_HEAT, - PAUSE_MESSAGE_HEATING + PAUSE_MESSAGE_HEATING, + PAUSE_MESSAGE_STATUS }; #if M600_PURGE_MORE_RESUMABLE diff --git a/Marlin/src/lcd/e3v2/common/dwin_color.h b/Marlin/src/lcd/e3v2/common/dwin_color.h index 8df4f95151ac..1e47d2e9045a 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_color.h +++ b/Marlin/src/lcd/e3v2/common/dwin_color.h @@ -27,6 +27,7 @@ #define GetGColor(color) ((color >> 5) & 0x3F) #define GetBColor(color) ((color >> 0) & 0x1F) +// RGB565 colors: https://rgbcolorpicker.com/565 #define COLOR_WHITE 0xFFFF #define COLOR_YELLOW RGB(0x1F,0x3F,0x00) #define COLOR_RED RGB(0x1F,0x00,0x00) diff --git a/Marlin/src/lcd/e3v2/common/dwin_set.h b/Marlin/src/lcd/e3v2/common/dwin_set.h index 3601f58e133e..ada7dec71fea 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_set.h +++ b/Marlin/src/lcd/e3v2/common/dwin_set.h @@ -25,12 +25,7 @@ #define Language_English 1 #define Language_Chinese 2 -//#define USE_STOCK_DWIN_SET // Use the Creality stock DWIN_SET instead of Marlin's unified DWIN_SET by The-EG & thinkyhead -#ifdef USE_STOCK_DWIN_SET - #define ICON 9 // 9.ICO -#else - #define ICON 7 // 7.ICO -#endif +#define ICON 7 // 7.ICO #ifndef CORP_WEBSITE #define CORP_WEBSITE WEBSITE_URL @@ -82,7 +77,7 @@ #define ICON_Motion 41 #define ICON_WriteEEPROM 42 #define ICON_ReadEEPROM 43 -#define ICON_ResumeEEPROM 44 +#define ICON_ResetEEPROM 44 #define ICON_Info 45 #define ICON_SetEndTemp 46 @@ -144,7 +139,7 @@ #define ICON_ProbeOffsetY ICON_StepY #define ICON_ProbeOffsetZ ICON_StepZ #define ICON_PIDNozzle ICON_SetEndTemp -#define ICON_PIDbed ICON_SetBedTemp +#define ICON_PIDBed ICON_SetBedTemp #define ICON_FWRetract ICON_StepE #define ICON_FWRetLength ICON_StepE #define ICON_FWRetSpeed ICON_Setspeed diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index c1e7a358c007..8156489f7bc5 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -905,7 +905,7 @@ void drawControlMenu() { #if ENABLED(EEPROM_SETTINGS) _TEMP_ICON(CONTROL_CASE_SAVE, ICON_WriteEEPROM, false); _TEMP_ICON(CONTROL_CASE_LOAD, ICON_ReadEEPROM, false); - _TEMP_ICON(CONTROL_CASE_RESET, ICON_ResumeEEPROM, false); + _TEMP_ICON(CONTROL_CASE_RESET, ICON_ResetEEPROM, false); #endif } @@ -2468,7 +2468,7 @@ void itemAdvBedPID(const uint8_t row) { itemAreaCopy(145, 104, 167, 114, row, 27); // "PID" #endif } - drawMenuLine(row, ICON_PIDbed); + drawMenuLine(row, ICON_PIDBed); } #if ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 1cb2a2efedfb..847c4bfd088f 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -1158,7 +1158,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #if ENABLED(ADVANCED_PAUSE_FEATURE) case PREPARE_CHANGEFIL: if (draw) { - drawMenuItem(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE) + drawMenuItem(row, ICON_ResetEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE) #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) , nullptr, true #endif @@ -1766,7 +1766,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra break; case CHANGEFIL_CHANGE: if (draw) - drawMenuItem(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)); + drawMenuItem(row, ICON_ResetEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)); else { if (thermalManager.targetTooColdToExtrude(0)) popupHandler(Popup_ETemp); @@ -3449,7 +3449,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra break; case LEVELING_SETTINGS_PLANE: if (draw) - drawMenuItem(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane")); + drawMenuItem(row, ICON_ResetEEPROM, F("Convert Mesh to Plane")); else { if (mesh_conf.createPlaneFromMesh()) break; gcode.process_subcommands_now(F("M420 S1")); @@ -3594,7 +3594,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #if ENABLED(AUTO_BED_LEVELING_UBL) case LEVELING_M_UNDEF: if (draw) - drawMenuItem(row, ICON_ResumeEEPROM, F("Clear Point Value")); + drawMenuItem(row, ICON_ResetEEPROM, F("Clear Point Value")); else { mesh_conf.manualValueUpdate(true); redrawMenu(false); @@ -3924,7 +3924,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) case TUNE_CHANGEFIL: if (draw) - drawMenuItem(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)); + drawMenuItem(row, ICON_ResetEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)); else popupHandler(Popup_ConfFilChange); break; diff --git a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp index 64d145c95dfd..796c87e47e21 100644 --- a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp +++ b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp @@ -89,9 +89,10 @@ bool drawing_mesh = false; struct linear_fit_data lsf_results; incremental_LSF_reset(&lsf_results); GRID_LOOP(x, y) { - if (!isnan(bedlevel.z_values[x][y])) { + const float z = bedlevel.z_values[x][y]; + if (!isnan(z)) { xy_pos_t rpos = { bedlevel.get_mesh_x(x), bedlevel.get_mesh_y(y) }; - incremental_LSF(&lsf_results, rpos, bedlevel.z_values[x][y]); + incremental_LSF(&lsf_results, rpos, z); } } @@ -199,8 +200,8 @@ float BedLevelTools::getMinValue() { // Return 'true' if mesh is good and within LCD limits bool BedLevelTools::meshValidate() { GRID_LOOP(x, y) { - const float v = bedlevel.z_values[x][y]; - if (isnan(v) || !WITHIN(v, Z_OFFSET_MIN, Z_OFFSET_MAX)) return false; + const float z = bedlevel.z_values[x][y]; + if (isnan(z) || !WITHIN(z, Z_OFFSET_MIN, Z_OFFSET_MAX)) return false; } return true; } @@ -232,46 +233,49 @@ bool BedLevelTools::meshValidate() { const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width; const auto start_y_px = padding_y_top + ((GRID_MAX_POINTS_Y) - y - 1) * cell_height_px; const auto end_y_px = start_y_px + cell_height_px - 1 - gridline_width; - dwinDrawRectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ - isnan(bedlevel.z_values[x][y]) ? COLOR_GREY : ( // gray if undefined - (bedlevel.z_values[x][y] < 0 ? - (uint16_t)round(0x1F * -bedlevel.z_values[x][y] / rmax) << 11 : // red if mesh point value is negative - (uint16_t)round(0x3F * bedlevel.z_values[x][y] / rmax) << 5) | // green if mesh point value is positive - _MIN(0x1F, (((uint8_t)abs(bedlevel.z_values[x][y]) / 10) * 4))), // + blue stepping for every mm - start_x_px, start_y_px, end_x_px, end_y_px + const float z = bedlevel.z_values[x][y]; + const uint16_t color = isnan(z) ? COLOR_GREY : ( // Gray if undefined + (z < 0 ? uint16_t(round(0x1F * -z / rmax)) << 11 // Red for negative mesh point + : uint16_t(round(0x3F * z / rmax)) << 5) // Green for positive mesh point + | _MIN(0x1F, (uint8_t(abs(z) * 0.4))) // + Blue stepping for every mm ); + dwinDrawRectangle(1, color, start_x_px, start_y_px, end_x_px, end_y_px); + safe_delay(10); LCD_SERIAL.flushTX(); // Draw value text on + if (!viewer_print_value) continue; + const uint8_t fs = DWINUI::fontWidth(meshfont); - if (viewer_print_value) { - const int8_t offset_y = cell_height_px / 2 - fs; - if (isnan(bedlevel.z_values[x][y])) { // undefined - dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X")); - } - else { // has value - MString<12> msg; - if ((GRID_MAX_POINTS_X) < TERN(TJC_DISPLAY, 8, 10)) - msg.set(p_float_t(abs(bedlevel.z_values[x][y]), 2)); - else - msg.setf(F("%02i"), uint16_t(abs(bedlevel.z_values[x][y] - int16_t(bedlevel.z_values[x][y])) * 100)); - const int8_t offset_x = cell_width_px / 2 - (fs / 2) * msg.length() - 2; - if ((GRID_MAX_POINTS_X) >= TERN(TJC_DISPLAY, 8, 10)) - dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px - 2 + offset_x, start_y_px + offset_y, F(".")); - dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + 1 + offset_x, start_y_px + offset_y, msg); - } - safe_delay(10); - LCD_SERIAL.flushTX(); + const int8_t offset_y = cell_height_px / 2 - fs; + if (isnan(z)) { // undefined + dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X")); } - } + else { // has value + MString<12> msg; + constexpr bool is_wide = (GRID_MAX_POINTS_X) >= TERN(TJC_DISPLAY, 8, 10); + if (is_wide) + msg.setf(F("%02i"), uint16_t(z * 100) % 100); + else + msg.set(p_float_t(abs(z), 2)); + const int8_t offset_x = cell_width_px / 2 - (fs / 2) * msg.length() - 2; + if (is_wide) + dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px - 2 + offset_x, start_y_px + offset_y, F(".")); + dwinDrawString(false, meshfont, COLOR_WHITE, COLOR_BG_BLUE, start_x_px + 1 + offset_x, start_y_px + offset_y, msg); + } + + safe_delay(10); + LCD_SERIAL.flushTX(); + + } // GRID_LOOP } void BedLevelTools::setMeshViewerStatus() { // TODO: draw gradient with values as a legend instead float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), rmax = _MAX(v_min, v_max), rmin = _MIN(v_min, v_max); - if (rmax > 3e+10f) rmax = 0.0000001; - if (rmin > 3e+10f) rmin = 0.0000001; + if (rmax > 3e+10f) rmax = 0.0000001f; + if (rmin > 3e+10f) rmin = 0.0000001f; ui.set_status(&MString<47>(F("Red "), p_float_t(-rmax, 3), F("..0.."), p_float_t(rmin, 3), F(" Green"))); drawing_mesh = false; } diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index fcebdb8c5726..894102e8a3bb 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -336,7 +336,7 @@ void ICON_Button(const bool selected, const int iconid, const frame_rect_t &ico, // void ICON_Print() { constexpr frame_rect_t ico = { 17, 110, 110, 100 }; - constexpr text_info_t txt = { 1, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 }; ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT)); } @@ -345,7 +345,7 @@ void ICON_Print() { // void ICON_Prepare() { constexpr frame_rect_t ico = { 145, 110, 110, 100 }; - constexpr text_info_t txt = { 31, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 31, { 405, 447 }, 27, 15 }; ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE)); } @@ -354,7 +354,7 @@ void ICON_Prepare() { // void ICON_Control() { constexpr frame_rect_t ico = { 17, 226, 110, 100 }; - constexpr text_info_t txt = { 61, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 61, { 405, 447 }, 27, 15 }; ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL)); } @@ -363,7 +363,7 @@ void ICON_Control() { // void ICON_AdvSettings() { constexpr frame_rect_t ico = { 145, 226, 110, 100 }; - constexpr text_info_t txt = { 91, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 91, { 405, 447 }, 27, 15 }; ICON_Button(select_page.now == PAGE_ADVANCE, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_ADVANCED)); } @@ -372,7 +372,7 @@ void ICON_AdvSettings() { // void ICON_Tune() { constexpr frame_rect_t ico = { 8, 232, 80, 100 }; - constexpr text_info_t txt = { 121, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 121, { 405, 447 }, 27, 15 }; ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE)); } @@ -381,7 +381,7 @@ void ICON_Tune() { // void ICON_Pause() { constexpr frame_rect_t ico = { 96, 232, 80, 100 }; - constexpr text_info_t txt = { 181, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 181, { 405, 447 }, 27, 15 }; ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PAUSE)); } @@ -390,7 +390,7 @@ void ICON_Pause() { // void ICON_Resume() { constexpr frame_rect_t ico = { 96, 232, 80, 100 }; - constexpr text_info_t txt = { 1, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 }; + constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 }; ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt, GET_TEXT_F(MSG_BUTTON_RESUME)); } @@ -399,7 +399,7 @@ void ICON_Resume() { // void ICON_Stop() { constexpr frame_rect_t ico = { 184, 232, 80, 100 }; - constexpr text_info_t txt = { 151, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 12 }; + constexpr text_info_t txt = { 151, { 405, 447 }, 27, 12 }; ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP)); } @@ -482,8 +482,7 @@ void dwinResetStatusLine() { // Djb2 hash algorithm uint32_t getHash(char * str) { uint32_t hash = 5381; - char c; - while ((c = *str++)) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ + for (char c; (c = *str++);) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ return hash; } @@ -1943,13 +1942,7 @@ void dwinRedrawScreen() { case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break; case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break; case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702 - case PAUSE_MESSAGE_PURGE: - #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) - dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_CONT_PURGE)); - #else - dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)); - #endif - break; + case PAUSE_MESSAGE_PURGE: dwinPopupPause(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break; case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break; case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break; case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break; @@ -3141,7 +3134,7 @@ void drawControlMenu() { #if ENABLED(EEPROM_SETTINGS) MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM); MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM); - MENU_ITEM(ICON_ResumeEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM); + MENU_ITEM(ICON_ResetEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM); #endif MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter); MENU_ITEM(ICON_Info, MSG_INFO_SCREEN, onDrawInfoSubMenu, gotoInfoMenu); @@ -3957,8 +3950,8 @@ void drawStepsMenu() { if (SET_MENU(zOffsetWizMenu, MSG_PROBE_WIZARD, 4)) { BACK_ITEM(drawPrepareMenu); MENU_ITEM(ICON_Homing, MSG_AUTO_HOME, onDrawMenuItem, autoHome); - MENU_ITEM_F(ICON_MoveZ0, "Move Z to Home", onDrawMenuItem, setMoveZto0); - EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR); + MENU_ITEM(ICON_MoveZ0, MSG_MOVE_NOZZLE_TO_BED, onDrawMenuItem, setMoveZto0); + EDIT_ITEM(ICON_Zoffset, MSG_XATC_UPDATE_Z_OFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR); } updateMenu(zOffsetWizMenu); if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home"); diff --git a/Marlin/src/lcd/e3v2/proui/dwinui.h b/Marlin/src/lcd/e3v2/proui/dwinui.h index 636b4fbbad72..97da3f05abab 100644 --- a/Marlin/src/lcd/e3v2/proui/dwinui.h +++ b/Marlin/src/lcd/e3v2/proui/dwinui.h @@ -36,124 +36,112 @@ #include "dwin_lcd.h" // Extra Icons -#define ICON_AdvSet ICON_Language -#define ICON_BedSizeX ICON_PrintSize -#define ICON_BedSizeY ICON_PrintSize -#define ICON_BedTramming ICON_SetHome -#define ICON_Binary ICON_Contact -#define ICON_BltouchReset ICON_StockConfiguration -#define ICON_Brightness ICON_Motion -#define ICON_Cancel ICON_StockConfiguration -#define ICON_CustomPreheat ICON_SetEndTemp -#define ICON_Error ICON_TempTooHigh -#define ICON_esDiag ICON_Info -#define ICON_ExtrudeMinT ICON_HotendTemp -#define ICON_FilLoad ICON_WriteEEPROM -#define ICON_FilMan ICON_ResumeEEPROM -#define ICON_FilSet ICON_ResumeEEPROM -#define ICON_FilUnload ICON_ReadEEPROM -#define ICON_Flow ICON_StepE -#define ICON_Folder ICON_More -#define ICON_HomeX ICON_MoveX -#define ICON_HomeY ICON_MoveY -#define ICON_HomeZ ICON_MoveZ -#define ICON_HomeOffset ICON_AdvSet -#define ICON_HomeOffsetX ICON_StepX -#define ICON_HomeOffsetY ICON_StepY -#define ICON_HomeOffsetZ ICON_StepZ -#define ICON_HSMode ICON_StockConfiguration -#define ICON_InputShaping ICON_MaxAccelerated -#define ICON_JDmm ICON_MaxJerk -#define ICON_Tram ICON_SetEndTemp -#define ICON_Level ICON_HotendTemp -#define ICON_Lock ICON_Cool -#define ICON_ManualMesh ICON_HotendTemp -#define ICON_MaxPosX ICON_MoveX -#define ICON_MaxPosY ICON_MoveY -#define ICON_MaxPosZ ICON_MoveZ -#define ICON_MeshEdit ICON_Homing -#define ICON_MeshEditX ICON_MoveX -#define ICON_MeshEditY ICON_MoveY -#define ICON_MeshEditZ ICON_MoveZ -#define ICON_MeshNext ICON_Axis -#define ICON_MeshPoints ICON_SetEndTemp -#define ICON_MeshReset ICON_StockConfiguration -#define ICON_MeshSave ICON_WriteEEPROM -#define ICON_MeshViewer ICON_HotendTemp -#define ICON_MoveZ0 ICON_HotendTemp -#define ICON_Park ICON_Motion -#define ICON_ParkPos ICON_AdvSet -#define ICON_ParkPosX ICON_StepX -#define ICON_ParkPosY ICON_StepY -#define ICON_ParkPosZ ICON_StepZ -#define ICON_PhySet ICON_PrintSize -#define ICON_PIDNozzle ICON_SetEndTemp -#define ICON_PIDBed ICON_SetBedTemp -#define ICON_PIDCycles ICON_ResumeEEPROM -#define ICON_PIDValue ICON_Contact -#define ICON_PrintStats ICON_PrintTime -#define ICON_PrintStatsReset ICON_RemainTime -#define ICON_Preheat1 ICON_PLAPreheat -#define ICON_Preheat2 ICON_ABSPreheat -#define ICON_Preheat3 ICON_CustomPreheat -#define ICON_Preheat4 ICON_CustomPreheat -#define ICON_Preheat5 ICON_CustomPreheat -#define ICON_Preheat6 ICON_CustomPreheat -#define ICON_Preheat7 ICON_CustomPreheat -#define ICON_Preheat8 ICON_CustomPreheat -#define ICON_Preheat9 ICON_CustomPreheat -#define ICON_Preheat10 ICON_CustomPreheat -#define ICON_ProbeDeploy ICON_SetEndTemp -#define ICON_ProbeMargin ICON_PrintSize -#define ICON_ProbeOffsetX ICON_StepX -#define ICON_ProbeOffsetY ICON_StepY -#define ICON_ProbeOffsetZ ICON_StepZ -#define ICON_ProbeSet ICON_SetEndTemp -#define ICON_ProbeStow ICON_SetEndTemp -#define ICON_ProbeTest ICON_SetEndTemp -#define ICON_ProbeZSpeed ICON_MaxSpeedZ -#define ICON_Pwrlossr ICON_Motion -#define ICON_Reboot ICON_ResumeEEPROM -#define ICON_Runout ICON_MaxAccE -#define ICON_Scolor ICON_MaxSpeed -#define ICON_SetBaudRate ICON_Setspeed -#define ICON_SetCustomPreheat ICON_SetEndTemp -#define ICON_SetPreheat1 ICON_SetPLAPreheat -#define ICON_SetPreheat2 ICON_SetABSPreheat -#define ICON_SetPreheat3 ICON_SetCustomPreheat -#define ICON_SetPreheat4 ICON_SetCustomPreheat -#define ICON_SetPreheat5 ICON_SetCustomPreheat -#define ICON_SetPreheat6 ICON_SetCustomPreheat -#define ICON_SetPreheat7 ICON_SetCustomPreheat -#define ICON_SetPreheat8 ICON_SetCustomPreheat -#define ICON_SetPreheat9 ICON_SetCustomPreheat -#define ICON_SetPreheat10 ICON_SetCustomPreheat -#define ICON_ShapingX ICON_MoveX -#define ICON_ShapingY ICON_MoveY -#define ICON_Sound ICON_Cool -#define ICON_TMCSet ICON_PrintSize -#define ICON_TMCXSet ICON_MoveX -#define ICON_TMCYSet ICON_MoveY -#define ICON_TMCZSet ICON_MoveZ -#define ICON_TMCESet ICON_Extruder -#define ICON_UBLActive ICON_HotendTemp -#define ICON_UBLActive ICON_HotendTemp -#define ICON_UBLSlot ICON_ResumeEEPROM -#define ICON_UBLMeshSave ICON_WriteEEPROM -#define ICON_UBLMeshLoad ICON_ReadEEPROM -#define ICON_UBLTiltGrid ICON_PrintSize -#define ICON_UBLSmartFill ICON_StockConfiguration -#define ICON_ZAfterHome ICON_SetEndTemp - -#define ICON_CaseLight ICON_Motion -#define ICON_LedControl ICON_Motion +#define ICON_BedSizeX ICON_PrintSize +#define ICON_BedSizeY ICON_PrintSize +#define ICON_BedTramming ICON_SetHome +#define ICON_Binary ICON_Contact +#define ICON_BltouchReset ICON_StockConfiguration +#define ICON_Brightness ICON_Motion +#define ICON_Cancel ICON_StockConfiguration +#define ICON_CustomPreheat ICON_SetEndTemp +#define ICON_Error ICON_TempTooHigh +#define ICON_esDiag ICON_Info +#define ICON_ExtrudeMinT ICON_HotendTemp +#define ICON_FilLoad ICON_WriteEEPROM +#define ICON_FilMan ICON_ResetEEPROM +#define ICON_FilSet ICON_ResetEEPROM +#define ICON_FilUnload ICON_ReadEEPROM +#define ICON_Flow ICON_StepE +#define ICON_HomeX ICON_MoveX +#define ICON_HomeY ICON_MoveY +#define ICON_HomeZ ICON_MoveZ +#define ICON_HSMode ICON_StockConfiguration +#define ICON_InputShaping ICON_MaxAccelerated +#define ICON_JDmm ICON_MaxJerk +#define ICON_Tram ICON_SetEndTemp +#define ICON_Level ICON_HotendTemp +#define ICON_Lock ICON_Cool +#define ICON_ManualMesh ICON_HotendTemp +#define ICON_MaxPosX ICON_MoveX +#define ICON_MaxPosY ICON_MoveY +#define ICON_MaxPosZ ICON_MoveZ +#define ICON_MeshEdit ICON_Homing +#define ICON_MeshEditX ICON_MoveX +#define ICON_MeshEditY ICON_MoveY +#define ICON_MeshEditZ ICON_MoveZ +#define ICON_MeshNext ICON_Axis +#define ICON_MeshPoints ICON_SetEndTemp +#define ICON_MeshReset ICON_StockConfiguration +#define ICON_MeshSave ICON_WriteEEPROM +#define ICON_MeshViewer ICON_HotendTemp +#define ICON_MoveZ0 ICON_HotendTemp +#define ICON_Park ICON_Motion +#define ICON_ParkPos ICON_AdvSet +#define ICON_ParkPosX ICON_StepX +#define ICON_ParkPosY ICON_StepY +#define ICON_ParkPosZ ICON_StepZ +#define ICON_PhySet ICON_PrintSize +#define ICON_PIDCycles ICON_ResetEEPROM +#define ICON_PIDValue ICON_Contact +#define ICON_PrintStats ICON_PrintTime +#define ICON_PrintStatsReset ICON_RemainTime +#define ICON_Preheat1 ICON_PLAPreheat +#define ICON_Preheat2 ICON_ABSPreheat +#define ICON_Preheat3 ICON_CustomPreheat +#define ICON_Preheat4 ICON_CustomPreheat +#define ICON_Preheat5 ICON_CustomPreheat +#define ICON_Preheat6 ICON_CustomPreheat +#define ICON_Preheat7 ICON_CustomPreheat +#define ICON_Preheat8 ICON_CustomPreheat +#define ICON_Preheat9 ICON_CustomPreheat +#define ICON_Preheat10 ICON_CustomPreheat +#define ICON_ProbeDeploy ICON_SetEndTemp +#define ICON_ProbeMargin ICON_PrintSize +#define ICON_ProbeSet ICON_SetEndTemp +#define ICON_ProbeStow ICON_SetEndTemp +#define ICON_ProbeTest ICON_SetEndTemp +#define ICON_ProbeZSpeed ICON_MaxSpeedZ +#define ICON_Pwrlossr ICON_Motion +#define ICON_Reboot ICON_ResetEEPROM +#define ICON_Runout ICON_MaxAccE +#define ICON_Scolor ICON_MaxSpeed +#define ICON_SetBaudRate ICON_Setspeed +#define ICON_SetCustomPreheat ICON_SetEndTemp +#define ICON_SetPreheat1 ICON_SetPLAPreheat +#define ICON_SetPreheat2 ICON_SetABSPreheat +#define ICON_SetPreheat3 ICON_SetCustomPreheat +#define ICON_SetPreheat4 ICON_SetCustomPreheat +#define ICON_SetPreheat5 ICON_SetCustomPreheat +#define ICON_SetPreheat6 ICON_SetCustomPreheat +#define ICON_SetPreheat7 ICON_SetCustomPreheat +#define ICON_SetPreheat8 ICON_SetCustomPreheat +#define ICON_SetPreheat9 ICON_SetCustomPreheat +#define ICON_SetPreheat10 ICON_SetCustomPreheat +#define ICON_ShapingX ICON_MoveX +#define ICON_ShapingY ICON_MoveY +#define ICON_Sound ICON_Cool +#define ICON_TMCSet ICON_PrintSize +#define ICON_TMCXSet ICON_MoveX +#define ICON_TMCYSet ICON_MoveY +#define ICON_TMCZSet ICON_MoveZ +#define ICON_TMCESet ICON_Extruder +#define ICON_UBLActive ICON_HotendTemp +#define ICON_UBLSlot ICON_ResetEEPROM +#define ICON_UBLMeshSave ICON_WriteEEPROM +#define ICON_UBLMeshLoad ICON_ReadEEPROM +#define ICON_UBLTiltGrid ICON_PrintSize +#define ICON_UBLSmartFill ICON_StockConfiguration +#define ICON_ZAfterHome ICON_SetEndTemp + +#define ICON_CaseLight ICON_Motion +#define ICON_LedControl ICON_Motion // MPC -#define ICON_MPCNozzle ICON_SetEndTemp -#define ICON_MPCValue ICON_Contact -#define ICON_MPCHeater ICON_Temperature -#define ICON_MPCHeatCap ICON_SetBedTemp -#define ICON_MPCFan ICON_FanSpeed +#define ICON_MPCNozzle ICON_SetEndTemp +#define ICON_MPCValue ICON_Contact +#define ICON_MPCHeater ICON_Temperature +#define ICON_MPCHeatCap ICON_SetBedTemp +#define ICON_MPCFan ICON_FanSpeed // Buttons #define BTN_Continue 85 diff --git a/buildroot/share/dwin/bin/DWIN_ICO.py b/buildroot/share/dwin/bin/DWIN_ICO.py index 4896f3ce45e1..436a98701de0 100644 --- a/buildroot/share/dwin/bin/DWIN_ICO.py +++ b/buildroot/share/dwin/bin/DWIN_ICO.py @@ -113,8 +113,7 @@ def _splitEntryData(self, infile, outDir): # Seek file position, read length bytes, and write to new output file. print('%02d: offset: 0x%06x len: 0x%04x width: %d height: %d' % (count, entry.offset, entry.length, entry.width, entry.height)) - outfilename = os.path.join(outDir, - '%03d-%s.jpg' % (count, _iconNames[count])) + outfilename = os.path.join(outDir, '%03d-ICON_%s.jpg' % (count, _iconNames7[count])) with open(outfilename, 'wb') as outfile: infile.seek(entry.offset) blob = infile.read(entry.length) @@ -246,112 +245,97 @@ def serialize(self): 0, 0, 0, 0, 0) return rawdata -_iconNames = { - 0 : 'ICON_LOGO', - 1 : 'ICON_Print_0', - 2 : 'ICON_Print_1', - 3 : 'ICON_Prepare_0', - 4 : 'ICON_Prepare_1', - 5 : 'ICON_Control_0', - 6 : 'ICON_Control_1', - 7 : 'ICON_Leveling_0', - 8 : 'ICON_Leveling_1', - 9 : 'ICON_HotendTemp', - 10 : 'ICON_BedTemp', - 11 : 'ICON_Speed', - 12 : 'ICON_Zoffset', - 13 : 'ICON_Back', - 14 : 'ICON_File', - 15 : 'ICON_PrintTime', - 16 : 'ICON_RemainTime', - 17 : 'ICON_Setup_0', - 18 : 'ICON_Setup_1', - 19 : 'ICON_Pause_0', - 20 : 'ICON_Pause_1', - 21 : 'ICON_Continue_0', - 22 : 'ICON_Continue_1', - 23 : 'ICON_Stop_0', - 24 : 'ICON_Stop_1', - 25 : 'ICON_Bar', - 26 : 'ICON_More', - 27 : 'ICON_Axis', - 28 : 'ICON_CloseMotor', - 29 : 'ICON_Homing', - 30 : 'ICON_SetHome', - 31 : 'ICON_PLAPreheat', - 32 : 'ICON_ABSPreheat', - 33 : 'ICON_Cool', - 34 : 'ICON_Language', - 35 : 'ICON_MoveX', - 36 : 'ICON_MoveY', - 37 : 'ICON_MoveZ', - 38 : 'ICON_Extruder', - # no 39 - 40 : 'ICON_Temperature', - 41 : 'ICON_Motion', - 42 : 'ICON_WriteEEPROM', - 43 : 'ICON_ReadEEPROM', - 44 : 'ICON_ResumeEEPROM', - 45 : 'ICON_Info', - 46 : 'ICON_SetEndTemp', - 47 : 'ICON_SetBedTemp', - 48 : 'ICON_FanSpeed', - 49 : 'ICON_SetPLAPreheat', - 50 : 'ICON_SetABSPreheat', - 51 : 'ICON_MaxSpeed', - 52 : 'ICON_MaxAccelerated', - 53 : 'ICON_MaxJerk', - 54 : 'ICON_Step', - 55 : 'ICON_PrintSize', - 56 : 'ICON_Version', - 57 : 'ICON_Contact', - 58 : 'ICON_StockConfiguraton', - 59 : 'ICON_MaxSpeedX', - 60 : 'ICON_MaxSpeedY', - 61 : 'ICON_MaxSpeedZ', - 62 : 'ICON_MaxSpeedE', - 63 : 'ICON_MaxAccX', - 64 : 'ICON_MaxAccY', - 65 : 'ICON_MaxAccZ', - 66 : 'ICON_MaxAccE', - 67 : 'ICON_MaxSpeedJerkX', - 68 : 'ICON_MaxSpeedJerkY', - 69 : 'ICON_MaxSpeedJerkZ', - 70 : 'ICON_MaxSpeedJerkE', - 71 : 'ICON_StepX', - 72 : 'ICON_StepY', - 73 : 'ICON_StepZ', - 74 : 'ICON_StepE', - 75 : 'ICON_Setspeed', - 76 : 'ICON_SetZOffset', - 77 : 'ICON_Rectangle', - 78 : 'ICON_BLTouch', - 79 : 'ICON_TempTooLow', - 80 : 'ICON_AutoLeveling', - 81 : 'ICON_TempTooHigh', - 82 : 'ICON_NoTips_C', - 83 : 'ICON_NoTips_E', - 84 : 'ICON_Continue_C', - 85 : 'ICON_Continue_E', - 86 : 'ICON_Cancel_C', - 87 : 'ICON_Cancel_E', - 88 : 'ICON_Confirm_C', - 89 : 'ICON_Confirm_E', - 90 : 'ICON_Info_0', - 91 : 'ICON_Info_1', - 93 : 'ICON_Printer_0', - #94 : 'ICON_Printer_1', - 200 : 'ICON_Checkbox_F', - 201 : 'ICON_Checkbox_T', - 202 : 'ICON_Fade', - 203 : 'ICON_Mesh', - 204 : 'ICON_Tilt', - 205 : 'ICON_Brightness', - 206 : 'ICON_Probe', - 249 : 'ICON_AxisD', - 250 : 'ICON_AxisBR', - 251 : 'ICON_AxisTR', - 252 : 'ICON_AxisBL', - 253 : 'ICON_AxisTL', - 254 : 'ICON_AxisC' +_iconNames7 = { + 0 : "LOGO_Creality", + 1 : "Print_0", + 2 : "Print_1", + 3 : "Prepare_0", + 4 : "Prepare_1", + 5 : "Control_0", + 6 : "Control_1", + 7 : "Leveling_0", + 8 : "Leveling_1", + 9 : "HotendTemp", + 10 : "BedTemp", + 11 : "Speed", + 12 : "Zoffset", + 13 : "Back", + 14 : "File", + 15 : "PrintTime", + 16 : "RemainTime", + 17 : "Setup_0", + 18 : "Setup_1", + 19 : "Pause_0", + 20 : "Pause_1", + 21 : "Continue_0", + 22 : "Continue_1", + 23 : "Stop_0", + 24 : "Stop_1", + 25 : "Bar", + 26 : "More", + 27 : "Axis", + 28 : "CloseMotor", + 29 : "Homing", + 30 : "SetHome", + 31 : "PLAPreheat", + 32 : "ABSPreheat", + 33 : "Cool", + 34 : "Language", + 35 : "MoveX", + 36 : "MoveY", + 37 : "MoveZ", + 38 : "Extruder", + # Skip 39 + 40 : "Temperature", + 41 : "Motion", + 42 : "WriteEEPROM", + 43 : "ReadEEPROM", + 44 : "ResetEEPROM", + 45 : "Info", + 46 : "SetEndTemp", + 47 : "SetBedTemp", + 48 : "FanSpeed", + 49 : "SetPLAPreheat", + 50 : "SetABSPreheat", + 51 : "MaxSpeed", + 52 : "MaxAccelerated", + 53 : "MaxJerk", + 54 : "Step", + 55 : "PrintSize", + 56 : "Version", + 57 : "Contact", + 58 : "StockConfiguraton", + 59 : "MaxSpeedX", + 60 : "MaxSpeedY", + 61 : "MaxSpeedZ", + 62 : "MaxSpeedE", + 63 : "MaxAccX", + 64 : "MaxAccY", + 65 : "MaxAccZ", + 66 : "MaxAccE", + 67 : "MaxSpeedJerkX", + 68 : "MaxSpeedJerkY", + 69 : "MaxSpeedJerkZ", + 70 : "MaxSpeedJerkE", + 71 : "StepX", + 72 : "StepY", + 73 : "StepZ", + 74 : "StepE", + 75 : "Setspeed", + 76 : "SetZOffset", + 77 : "Rectangle", + 78 : "BLTouch", + 79 : "TempTooLow", + 80 : "AutoLeveling", + 81 : "TempTooHigh", + 82 : "NoTips_C", + 83 : "NoTips_E", + 84 : "Continue_C", + 85 : "Continue_E", + 86 : "Cancel_C", + 87 : "Cancel_E", + 88 : "Confirm_C", + 89 : "Confirm_E", + 90 : "Info_0", + 91 : "Info_1" } diff --git a/buildroot/share/dwin/icons-2/000-ICON_BootLogo.jpg b/buildroot/share/dwin/icons-3/000-ICON_BootLogo.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/000-ICON_BootLogo.jpg rename to buildroot/share/dwin/icons-3/000-ICON_BootLogo.jpg diff --git a/buildroot/share/dwin/icons-2/001-ICON_OpenSourceFirmware.jpg b/buildroot/share/dwin/icons-3/001-ICON_OpenSourceFirmware.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/001-ICON_OpenSourceFirmware.jpg rename to buildroot/share/dwin/icons-3/001-ICON_OpenSourceFirmware.jpg diff --git a/buildroot/share/dwin/icons-2/002-ICON_GitHub.jpg b/buildroot/share/dwin/icons-3/002-ICON_GitHub.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/002-ICON_GitHub.jpg rename to buildroot/share/dwin/icons-3/002-ICON_GitHub.jpg diff --git a/buildroot/share/dwin/icons-2/003-ICON_Website.jpg b/buildroot/share/dwin/icons-3/003-ICON_Website.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/003-ICON_Website.jpg rename to buildroot/share/dwin/icons-3/003-ICON_Website.jpg diff --git a/buildroot/share/dwin/icons-2/004-ICON_Copyright.jpg b/buildroot/share/dwin/icons-3/004-ICON_Copyright.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/004-ICON_Copyright.jpg rename to buildroot/share/dwin/icons-3/004-ICON_Copyright.jpg diff --git a/buildroot/share/dwin/icons-3/000-ICON_LOGO_Marlin.jpg b/buildroot/share/dwin/icons-4/000-ICON_LOGO_Marlin.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/000-ICON_LOGO_Marlin.jpg rename to buildroot/share/dwin/icons-4/000-ICON_LOGO_Marlin.jpg diff --git a/buildroot/share/dwin/icons-3/001-ICON_HotendOff.jpg b/buildroot/share/dwin/icons-4/001-ICON_HotendOff.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/001-ICON_HotendOff.jpg rename to buildroot/share/dwin/icons-4/001-ICON_HotendOff.jpg diff --git a/buildroot/share/dwin/icons-3/002-ICON_HotendOn.jpg b/buildroot/share/dwin/icons-4/002-ICON_HotendOn.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/002-ICON_HotendOn.jpg rename to buildroot/share/dwin/icons-4/002-ICON_HotendOn.jpg diff --git a/buildroot/share/dwin/icons-3/003-ICON_BedOff.jpg b/buildroot/share/dwin/icons-4/003-ICON_BedOff.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/003-ICON_BedOff.jpg rename to buildroot/share/dwin/icons-4/003-ICON_BedOff.jpg diff --git a/buildroot/share/dwin/icons-3/004-ICON_BedOn.jpg b/buildroot/share/dwin/icons-4/004-ICON_BedOn.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/004-ICON_BedOn.jpg rename to buildroot/share/dwin/icons-4/004-ICON_BedOn.jpg diff --git a/buildroot/share/dwin/icons-3/005-ICON_Fan0.jpg b/buildroot/share/dwin/icons-4/005-ICON_Fan0.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/005-ICON_Fan0.jpg rename to buildroot/share/dwin/icons-4/005-ICON_Fan0.jpg diff --git a/buildroot/share/dwin/icons-3/006-ICON_Fan1.jpg b/buildroot/share/dwin/icons-4/006-ICON_Fan1.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/006-ICON_Fan1.jpg rename to buildroot/share/dwin/icons-4/006-ICON_Fan1.jpg diff --git a/buildroot/share/dwin/icons-3/007-ICON_Fan2.jpg b/buildroot/share/dwin/icons-4/007-ICON_Fan2.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/007-ICON_Fan2.jpg rename to buildroot/share/dwin/icons-4/007-ICON_Fan2.jpg diff --git a/buildroot/share/dwin/icons-3/008-ICON_Fan3.jpg b/buildroot/share/dwin/icons-4/008-ICON_Fan3.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/008-ICON_Fan3.jpg rename to buildroot/share/dwin/icons-4/008-ICON_Fan3.jpg diff --git a/buildroot/share/dwin/icons-3/009-ICON_Halted.jpg b/buildroot/share/dwin/icons-4/009-ICON_Halted.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/009-ICON_Halted.jpg rename to buildroot/share/dwin/icons-4/009-ICON_Halted.jpg diff --git a/buildroot/share/dwin/icons-3/010-ICON_Question.jpg b/buildroot/share/dwin/icons-4/010-ICON_Question.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/010-ICON_Question.jpg rename to buildroot/share/dwin/icons-4/010-ICON_Question.jpg diff --git a/buildroot/share/dwin/icons-3/011-ICON_Alert.jpg b/buildroot/share/dwin/icons-4/011-ICON_Alert.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/011-ICON_Alert.jpg rename to buildroot/share/dwin/icons-4/011-ICON_Alert.jpg diff --git a/buildroot/share/dwin/icons-3/012-ICON_RotateCW.jpg b/buildroot/share/dwin/icons-4/012-ICON_RotateCW.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/012-ICON_RotateCW.jpg rename to buildroot/share/dwin/icons-4/012-ICON_RotateCW.jpg diff --git a/buildroot/share/dwin/icons-3/013-ICON_RotateCCW.jpg b/buildroot/share/dwin/icons-4/013-ICON_RotateCCW.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/013-ICON_RotateCCW.jpg rename to buildroot/share/dwin/icons-4/013-ICON_RotateCCW.jpg diff --git a/buildroot/share/dwin/icons-3/014-ICON_UpArrow.jpg b/buildroot/share/dwin/icons-4/014-ICON_UpArrow.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/014-ICON_UpArrow.jpg rename to buildroot/share/dwin/icons-4/014-ICON_UpArrow.jpg diff --git a/buildroot/share/dwin/icons-3/015-ICON_DownArrow.jpg b/buildroot/share/dwin/icons-4/015-ICON_DownArrow.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/015-ICON_DownArrow.jpg rename to buildroot/share/dwin/icons-4/015-ICON_DownArrow.jpg diff --git a/buildroot/share/dwin/icons-6/000-ICON_LOGO_Creality.jpg b/buildroot/share/dwin/icons-7/000-ICON_LOGO_Creality.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/000-ICON_LOGO_Creality.jpg rename to buildroot/share/dwin/icons-7/000-ICON_LOGO_Creality.jpg diff --git a/buildroot/share/dwin/icons-6/001-ICON_Print_0.jpg b/buildroot/share/dwin/icons-7/001-ICON_Print_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/001-ICON_Print_0.jpg rename to buildroot/share/dwin/icons-7/001-ICON_Print_0.jpg diff --git a/buildroot/share/dwin/icons-6/002-ICON_Print_1.jpg b/buildroot/share/dwin/icons-7/002-ICON_Print_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/002-ICON_Print_1.jpg rename to buildroot/share/dwin/icons-7/002-ICON_Print_1.jpg diff --git a/buildroot/share/dwin/icons-6/003-ICON_Prepare_0.jpg b/buildroot/share/dwin/icons-7/003-ICON_Prepare_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/003-ICON_Prepare_0.jpg rename to buildroot/share/dwin/icons-7/003-ICON_Prepare_0.jpg diff --git a/buildroot/share/dwin/icons-6/004-ICON_Prepare_1.jpg b/buildroot/share/dwin/icons-7/004-ICON_Prepare_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/004-ICON_Prepare_1.jpg rename to buildroot/share/dwin/icons-7/004-ICON_Prepare_1.jpg diff --git a/buildroot/share/dwin/icons-6/005-ICON_Control_0.jpg b/buildroot/share/dwin/icons-7/005-ICON_Control_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/005-ICON_Control_0.jpg rename to buildroot/share/dwin/icons-7/005-ICON_Control_0.jpg diff --git a/buildroot/share/dwin/icons-6/006-ICON_Control_1.jpg b/buildroot/share/dwin/icons-7/006-ICON_Control_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/006-ICON_Control_1.jpg rename to buildroot/share/dwin/icons-7/006-ICON_Control_1.jpg diff --git a/buildroot/share/dwin/icons-6/007-ICON_Leveling_0.jpg b/buildroot/share/dwin/icons-7/007-ICON_Leveling_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/007-ICON_Leveling_0.jpg rename to buildroot/share/dwin/icons-7/007-ICON_Leveling_0.jpg diff --git a/buildroot/share/dwin/icons-6/008-ICON_Leveling_1.jpg b/buildroot/share/dwin/icons-7/008-ICON_Leveling_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/008-ICON_Leveling_1.jpg rename to buildroot/share/dwin/icons-7/008-ICON_Leveling_1.jpg diff --git a/buildroot/share/dwin/icons-6/009-ICON_HotendTemp.jpg b/buildroot/share/dwin/icons-7/009-ICON_HotendTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/009-ICON_HotendTemp.jpg rename to buildroot/share/dwin/icons-7/009-ICON_HotendTemp.jpg diff --git a/buildroot/share/dwin/icons-6/010-ICON_BedTemp.jpg b/buildroot/share/dwin/icons-7/010-ICON_BedTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/010-ICON_BedTemp.jpg rename to buildroot/share/dwin/icons-7/010-ICON_BedTemp.jpg diff --git a/buildroot/share/dwin/icons-6/011-ICON_Speed.jpg b/buildroot/share/dwin/icons-7/011-ICON_Speed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/011-ICON_Speed.jpg rename to buildroot/share/dwin/icons-7/011-ICON_Speed.jpg diff --git a/buildroot/share/dwin/icons-6/012-ICON_Zoffset.jpg b/buildroot/share/dwin/icons-7/012-ICON_Zoffset.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/012-ICON_Zoffset.jpg rename to buildroot/share/dwin/icons-7/012-ICON_Zoffset.jpg diff --git a/buildroot/share/dwin/icons-6/013-ICON_Back.jpg b/buildroot/share/dwin/icons-7/013-ICON_Back.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/013-ICON_Back.jpg rename to buildroot/share/dwin/icons-7/013-ICON_Back.jpg diff --git a/buildroot/share/dwin/icons-6/014-ICON_File.jpg b/buildroot/share/dwin/icons-7/014-ICON_File.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/014-ICON_File.jpg rename to buildroot/share/dwin/icons-7/014-ICON_File.jpg diff --git a/buildroot/share/dwin/icons-6/015-ICON_PrintTime.jpg b/buildroot/share/dwin/icons-7/015-ICON_PrintTime.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/015-ICON_PrintTime.jpg rename to buildroot/share/dwin/icons-7/015-ICON_PrintTime.jpg diff --git a/buildroot/share/dwin/icons-6/016-ICON_RemainTime.jpg b/buildroot/share/dwin/icons-7/016-ICON_RemainTime.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/016-ICON_RemainTime.jpg rename to buildroot/share/dwin/icons-7/016-ICON_RemainTime.jpg diff --git a/buildroot/share/dwin/icons-6/017-ICON_Setup_0.jpg b/buildroot/share/dwin/icons-7/017-ICON_Setup_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/017-ICON_Setup_0.jpg rename to buildroot/share/dwin/icons-7/017-ICON_Setup_0.jpg diff --git a/buildroot/share/dwin/icons-6/018-ICON_Setup_1.jpg b/buildroot/share/dwin/icons-7/018-ICON_Setup_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/018-ICON_Setup_1.jpg rename to buildroot/share/dwin/icons-7/018-ICON_Setup_1.jpg diff --git a/buildroot/share/dwin/icons-6/019-ICON_Pause_0.jpg b/buildroot/share/dwin/icons-7/019-ICON_Pause_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/019-ICON_Pause_0.jpg rename to buildroot/share/dwin/icons-7/019-ICON_Pause_0.jpg diff --git a/buildroot/share/dwin/icons-6/020-ICON_Pause_1.jpg b/buildroot/share/dwin/icons-7/020-ICON_Pause_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/020-ICON_Pause_1.jpg rename to buildroot/share/dwin/icons-7/020-ICON_Pause_1.jpg diff --git a/buildroot/share/dwin/icons-6/021-ICON_Continue_0.jpg b/buildroot/share/dwin/icons-7/021-ICON_Continue_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/021-ICON_Continue_0.jpg rename to buildroot/share/dwin/icons-7/021-ICON_Continue_0.jpg diff --git a/buildroot/share/dwin/icons-6/022-ICON_Continue_1.jpg b/buildroot/share/dwin/icons-7/022-ICON_Continue_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/022-ICON_Continue_1.jpg rename to buildroot/share/dwin/icons-7/022-ICON_Continue_1.jpg diff --git a/buildroot/share/dwin/icons-6/023-ICON_Stop_0.jpg b/buildroot/share/dwin/icons-7/023-ICON_Stop_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/023-ICON_Stop_0.jpg rename to buildroot/share/dwin/icons-7/023-ICON_Stop_0.jpg diff --git a/buildroot/share/dwin/icons-6/024-ICON_Stop_1.jpg b/buildroot/share/dwin/icons-7/024-ICON_Stop_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/024-ICON_Stop_1.jpg rename to buildroot/share/dwin/icons-7/024-ICON_Stop_1.jpg diff --git a/buildroot/share/dwin/icons-6/025-ICON_Bar.jpg b/buildroot/share/dwin/icons-7/025-ICON_Bar.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/025-ICON_Bar.jpg rename to buildroot/share/dwin/icons-7/025-ICON_Bar.jpg diff --git a/buildroot/share/dwin/icons-6/026-ICON_More.jpg b/buildroot/share/dwin/icons-7/026-ICON_More.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/026-ICON_More.jpg rename to buildroot/share/dwin/icons-7/026-ICON_More.jpg diff --git a/buildroot/share/dwin/icons-6/027-ICON_Axis.jpg b/buildroot/share/dwin/icons-7/027-ICON_Axis.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/027-ICON_Axis.jpg rename to buildroot/share/dwin/icons-7/027-ICON_Axis.jpg diff --git a/buildroot/share/dwin/icons-6/028-ICON_CloseMotor.jpg b/buildroot/share/dwin/icons-7/028-ICON_CloseMotor.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/028-ICON_CloseMotor.jpg rename to buildroot/share/dwin/icons-7/028-ICON_CloseMotor.jpg diff --git a/buildroot/share/dwin/icons-6/029-ICON_Homing.jpg b/buildroot/share/dwin/icons-7/029-ICON_Homing.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/029-ICON_Homing.jpg rename to buildroot/share/dwin/icons-7/029-ICON_Homing.jpg diff --git a/buildroot/share/dwin/icons-6/030-ICON_SetHome.jpg b/buildroot/share/dwin/icons-7/030-ICON_SetHome.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/030-ICON_SetHome.jpg rename to buildroot/share/dwin/icons-7/030-ICON_SetHome.jpg diff --git a/buildroot/share/dwin/icons-6/031-ICON_PLAPreheat.jpg b/buildroot/share/dwin/icons-7/031-ICON_PLAPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/031-ICON_PLAPreheat.jpg rename to buildroot/share/dwin/icons-7/031-ICON_PLAPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/032-ICON_ABSPreheat.jpg b/buildroot/share/dwin/icons-7/032-ICON_ABSPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/032-ICON_ABSPreheat.jpg rename to buildroot/share/dwin/icons-7/032-ICON_ABSPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/033-ICON_Cool.jpg b/buildroot/share/dwin/icons-7/033-ICON_Cool.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/033-ICON_Cool.jpg rename to buildroot/share/dwin/icons-7/033-ICON_Cool.jpg diff --git a/buildroot/share/dwin/icons-6/034-ICON_Language.jpg b/buildroot/share/dwin/icons-7/034-ICON_Language.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/034-ICON_Language.jpg rename to buildroot/share/dwin/icons-7/034-ICON_Language.jpg diff --git a/buildroot/share/dwin/icons-6/035-ICON_MoveX.jpg b/buildroot/share/dwin/icons-7/035-ICON_MoveX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/035-ICON_MoveX.jpg rename to buildroot/share/dwin/icons-7/035-ICON_MoveX.jpg diff --git a/buildroot/share/dwin/icons-6/036-ICON_MoveY.jpg b/buildroot/share/dwin/icons-7/036-ICON_MoveY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/036-ICON_MoveY.jpg rename to buildroot/share/dwin/icons-7/036-ICON_MoveY.jpg diff --git a/buildroot/share/dwin/icons-6/037-ICON_MoveZ.jpg b/buildroot/share/dwin/icons-7/037-ICON_MoveZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/037-ICON_MoveZ.jpg rename to buildroot/share/dwin/icons-7/037-ICON_MoveZ.jpg diff --git a/buildroot/share/dwin/icons-6/038-ICON_Extruder.jpg b/buildroot/share/dwin/icons-7/038-ICON_Extruder.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/038-ICON_Extruder.jpg rename to buildroot/share/dwin/icons-7/038-ICON_Extruder.jpg diff --git a/buildroot/share/dwin/icons-6/040-ICON_Temperature.jpg b/buildroot/share/dwin/icons-7/040-ICON_Temperature.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/040-ICON_Temperature.jpg rename to buildroot/share/dwin/icons-7/040-ICON_Temperature.jpg diff --git a/buildroot/share/dwin/icons-6/041-ICON_Motion.jpg b/buildroot/share/dwin/icons-7/041-ICON_Motion.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/041-ICON_Motion.jpg rename to buildroot/share/dwin/icons-7/041-ICON_Motion.jpg diff --git a/buildroot/share/dwin/icons-6/042-ICON_WriteEEPROM.jpg b/buildroot/share/dwin/icons-7/042-ICON_WriteEEPROM.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/042-ICON_WriteEEPROM.jpg rename to buildroot/share/dwin/icons-7/042-ICON_WriteEEPROM.jpg diff --git a/buildroot/share/dwin/icons-6/043-ICON_ReadEEPROM.jpg b/buildroot/share/dwin/icons-7/043-ICON_ReadEEPROM.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/043-ICON_ReadEEPROM.jpg rename to buildroot/share/dwin/icons-7/043-ICON_ReadEEPROM.jpg diff --git a/buildroot/share/dwin/icons-6/044-ICON_ResumeEEPROM.jpg b/buildroot/share/dwin/icons-7/044-ICON_ResetEEPROM.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/044-ICON_ResumeEEPROM.jpg rename to buildroot/share/dwin/icons-7/044-ICON_ResetEEPROM.jpg diff --git a/buildroot/share/dwin/icons-6/045-ICON_Info.jpg b/buildroot/share/dwin/icons-7/045-ICON_Info.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/045-ICON_Info.jpg rename to buildroot/share/dwin/icons-7/045-ICON_Info.jpg diff --git a/buildroot/share/dwin/icons-6/046-ICON_SetEndTemp.jpg b/buildroot/share/dwin/icons-7/046-ICON_SetEndTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/046-ICON_SetEndTemp.jpg rename to buildroot/share/dwin/icons-7/046-ICON_SetEndTemp.jpg diff --git a/buildroot/share/dwin/icons-6/047-ICON_SetBedTemp.jpg b/buildroot/share/dwin/icons-7/047-ICON_SetBedTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/047-ICON_SetBedTemp.jpg rename to buildroot/share/dwin/icons-7/047-ICON_SetBedTemp.jpg diff --git a/buildroot/share/dwin/icons-6/048-ICON_FanSpeed.jpg b/buildroot/share/dwin/icons-7/048-ICON_FanSpeed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/048-ICON_FanSpeed.jpg rename to buildroot/share/dwin/icons-7/048-ICON_FanSpeed.jpg diff --git a/buildroot/share/dwin/icons-6/049-ICON_SetPLAPreheat.jpg b/buildroot/share/dwin/icons-7/049-ICON_SetPLAPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/049-ICON_SetPLAPreheat.jpg rename to buildroot/share/dwin/icons-7/049-ICON_SetPLAPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/050-ICON_SetABSPreheat.jpg b/buildroot/share/dwin/icons-7/050-ICON_SetABSPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/050-ICON_SetABSPreheat.jpg rename to buildroot/share/dwin/icons-7/050-ICON_SetABSPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/051-ICON_MaxSpeed.jpg b/buildroot/share/dwin/icons-7/051-ICON_MaxSpeed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/051-ICON_MaxSpeed.jpg rename to buildroot/share/dwin/icons-7/051-ICON_MaxSpeed.jpg diff --git a/buildroot/share/dwin/icons-6/052-ICON_MaxAccelerated.jpg b/buildroot/share/dwin/icons-7/052-ICON_MaxAccelerated.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/052-ICON_MaxAccelerated.jpg rename to buildroot/share/dwin/icons-7/052-ICON_MaxAccelerated.jpg diff --git a/buildroot/share/dwin/icons-6/053-ICON_MaxJerk.jpg b/buildroot/share/dwin/icons-7/053-ICON_MaxJerk.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/053-ICON_MaxJerk.jpg rename to buildroot/share/dwin/icons-7/053-ICON_MaxJerk.jpg diff --git a/buildroot/share/dwin/icons-6/054-ICON_Step.jpg b/buildroot/share/dwin/icons-7/054-ICON_Step.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/054-ICON_Step.jpg rename to buildroot/share/dwin/icons-7/054-ICON_Step.jpg diff --git a/buildroot/share/dwin/icons-6/055-ICON_PrintSize.jpg b/buildroot/share/dwin/icons-7/055-ICON_PrintSize.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/055-ICON_PrintSize.jpg rename to buildroot/share/dwin/icons-7/055-ICON_PrintSize.jpg diff --git a/buildroot/share/dwin/icons-6/056-ICON_Version.jpg b/buildroot/share/dwin/icons-7/056-ICON_Version.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/056-ICON_Version.jpg rename to buildroot/share/dwin/icons-7/056-ICON_Version.jpg diff --git a/buildroot/share/dwin/icons-6/057-ICON_Contact.jpg b/buildroot/share/dwin/icons-7/057-ICON_Contact.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/057-ICON_Contact.jpg rename to buildroot/share/dwin/icons-7/057-ICON_Contact.jpg diff --git a/buildroot/share/dwin/icons-6/058-ICON_StockConfiguraton.jpg b/buildroot/share/dwin/icons-7/058-ICON_StockConfiguraton.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/058-ICON_StockConfiguraton.jpg rename to buildroot/share/dwin/icons-7/058-ICON_StockConfiguraton.jpg diff --git a/buildroot/share/dwin/icons-6/059-ICON_MaxSpeedX.jpg b/buildroot/share/dwin/icons-7/059-ICON_MaxSpeedX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/059-ICON_MaxSpeedX.jpg rename to buildroot/share/dwin/icons-7/059-ICON_MaxSpeedX.jpg diff --git a/buildroot/share/dwin/icons-6/060-ICON_MaxSpeedY.jpg b/buildroot/share/dwin/icons-7/060-ICON_MaxSpeedY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/060-ICON_MaxSpeedY.jpg rename to buildroot/share/dwin/icons-7/060-ICON_MaxSpeedY.jpg diff --git a/buildroot/share/dwin/icons-6/061-ICON_MaxSpeedZ.jpg b/buildroot/share/dwin/icons-7/061-ICON_MaxSpeedZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/061-ICON_MaxSpeedZ.jpg rename to buildroot/share/dwin/icons-7/061-ICON_MaxSpeedZ.jpg diff --git a/buildroot/share/dwin/icons-6/062-ICON_MaxSpeedE.jpg b/buildroot/share/dwin/icons-7/062-ICON_MaxSpeedE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/062-ICON_MaxSpeedE.jpg rename to buildroot/share/dwin/icons-7/062-ICON_MaxSpeedE.jpg diff --git a/buildroot/share/dwin/icons-6/063-ICON_MaxAccX.jpg b/buildroot/share/dwin/icons-7/063-ICON_MaxAccX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/063-ICON_MaxAccX.jpg rename to buildroot/share/dwin/icons-7/063-ICON_MaxAccX.jpg diff --git a/buildroot/share/dwin/icons-6/064-ICON_MaxAccY.jpg b/buildroot/share/dwin/icons-7/064-ICON_MaxAccY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/064-ICON_MaxAccY.jpg rename to buildroot/share/dwin/icons-7/064-ICON_MaxAccY.jpg diff --git a/buildroot/share/dwin/icons-6/065-ICON_MaxAccZ.jpg b/buildroot/share/dwin/icons-7/065-ICON_MaxAccZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/065-ICON_MaxAccZ.jpg rename to buildroot/share/dwin/icons-7/065-ICON_MaxAccZ.jpg diff --git a/buildroot/share/dwin/icons-6/066-ICON_MaxAccE.jpg b/buildroot/share/dwin/icons-7/066-ICON_MaxAccE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/066-ICON_MaxAccE.jpg rename to buildroot/share/dwin/icons-7/066-ICON_MaxAccE.jpg diff --git a/buildroot/share/dwin/icons-6/067-ICON_MaxSpeedJerkX.jpg b/buildroot/share/dwin/icons-7/067-ICON_MaxSpeedJerkX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/067-ICON_MaxSpeedJerkX.jpg rename to buildroot/share/dwin/icons-7/067-ICON_MaxSpeedJerkX.jpg diff --git a/buildroot/share/dwin/icons-6/068-ICON_MaxSpeedJerkY.jpg b/buildroot/share/dwin/icons-7/068-ICON_MaxSpeedJerkY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/068-ICON_MaxSpeedJerkY.jpg rename to buildroot/share/dwin/icons-7/068-ICON_MaxSpeedJerkY.jpg diff --git a/buildroot/share/dwin/icons-6/069-ICON_MaxSpeedJerkZ.jpg b/buildroot/share/dwin/icons-7/069-ICON_MaxSpeedJerkZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/069-ICON_MaxSpeedJerkZ.jpg rename to buildroot/share/dwin/icons-7/069-ICON_MaxSpeedJerkZ.jpg diff --git a/buildroot/share/dwin/icons-6/070-ICON_MaxSpeedJerkE.jpg b/buildroot/share/dwin/icons-7/070-ICON_MaxSpeedJerkE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/070-ICON_MaxSpeedJerkE.jpg rename to buildroot/share/dwin/icons-7/070-ICON_MaxSpeedJerkE.jpg diff --git a/buildroot/share/dwin/icons-6/071-ICON_StepX.jpg b/buildroot/share/dwin/icons-7/071-ICON_StepX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/071-ICON_StepX.jpg rename to buildroot/share/dwin/icons-7/071-ICON_StepX.jpg diff --git a/buildroot/share/dwin/icons-6/072-ICON_StepY.jpg b/buildroot/share/dwin/icons-7/072-ICON_StepY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/072-ICON_StepY.jpg rename to buildroot/share/dwin/icons-7/072-ICON_StepY.jpg diff --git a/buildroot/share/dwin/icons-6/073-ICON_StepZ.jpg b/buildroot/share/dwin/icons-7/073-ICON_StepZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/073-ICON_StepZ.jpg rename to buildroot/share/dwin/icons-7/073-ICON_StepZ.jpg diff --git a/buildroot/share/dwin/icons-6/074-ICON_StepE.jpg b/buildroot/share/dwin/icons-7/074-ICON_StepE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/074-ICON_StepE.jpg rename to buildroot/share/dwin/icons-7/074-ICON_StepE.jpg diff --git a/buildroot/share/dwin/icons-6/075-ICON_Setspeed.jpg b/buildroot/share/dwin/icons-7/075-ICON_Setspeed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/075-ICON_Setspeed.jpg rename to buildroot/share/dwin/icons-7/075-ICON_Setspeed.jpg diff --git a/buildroot/share/dwin/icons-6/076-ICON_SetZOffset.jpg b/buildroot/share/dwin/icons-7/076-ICON_SetZOffset.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/076-ICON_SetZOffset.jpg rename to buildroot/share/dwin/icons-7/076-ICON_SetZOffset.jpg diff --git a/buildroot/share/dwin/icons-6/077-ICON_Rectangle.jpg b/buildroot/share/dwin/icons-7/077-ICON_Rectangle.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/077-ICON_Rectangle.jpg rename to buildroot/share/dwin/icons-7/077-ICON_Rectangle.jpg diff --git a/buildroot/share/dwin/icons-6/078-ICON_BLTouch.jpg b/buildroot/share/dwin/icons-7/078-ICON_BLTouch.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/078-ICON_BLTouch.jpg rename to buildroot/share/dwin/icons-7/078-ICON_BLTouch.jpg diff --git a/buildroot/share/dwin/icons-6/079-ICON_TempTooLow.jpg b/buildroot/share/dwin/icons-7/079-ICON_TempTooLow.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/079-ICON_TempTooLow.jpg rename to buildroot/share/dwin/icons-7/079-ICON_TempTooLow.jpg diff --git a/buildroot/share/dwin/icons-6/080-ICON_AutoLeveling.jpg b/buildroot/share/dwin/icons-7/080-ICON_AutoLeveling.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/080-ICON_AutoLeveling.jpg rename to buildroot/share/dwin/icons-7/080-ICON_AutoLeveling.jpg diff --git a/buildroot/share/dwin/icons-6/081-ICON_TempTooHigh.jpg b/buildroot/share/dwin/icons-7/081-ICON_TempTooHigh.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/081-ICON_TempTooHigh.jpg rename to buildroot/share/dwin/icons-7/081-ICON_TempTooHigh.jpg diff --git a/buildroot/share/dwin/icons-6/082-ICON_NoTips_C.jpg b/buildroot/share/dwin/icons-7/082-ICON_NoTips_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/082-ICON_NoTips_C.jpg rename to buildroot/share/dwin/icons-7/082-ICON_NoTips_C.jpg diff --git a/buildroot/share/dwin/icons-6/083-ICON_NoTips_E.jpg b/buildroot/share/dwin/icons-7/083-ICON_NoTips_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/083-ICON_NoTips_E.jpg rename to buildroot/share/dwin/icons-7/083-ICON_NoTips_E.jpg diff --git a/buildroot/share/dwin/icons-6/084-ICON_Continue_C.jpg b/buildroot/share/dwin/icons-7/084-ICON_Continue_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/084-ICON_Continue_C.jpg rename to buildroot/share/dwin/icons-7/084-ICON_Continue_C.jpg diff --git a/buildroot/share/dwin/icons-6/085-ICON_Continue_E.jpg b/buildroot/share/dwin/icons-7/085-ICON_Continue_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/085-ICON_Continue_E.jpg rename to buildroot/share/dwin/icons-7/085-ICON_Continue_E.jpg diff --git a/buildroot/share/dwin/icons-6/086-ICON_Cancel_C.jpg b/buildroot/share/dwin/icons-7/086-ICON_Cancel_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/086-ICON_Cancel_C.jpg rename to buildroot/share/dwin/icons-7/086-ICON_Cancel_C.jpg diff --git a/buildroot/share/dwin/icons-6/087-ICON_Cancel_E.jpg b/buildroot/share/dwin/icons-7/087-ICON_Cancel_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/087-ICON_Cancel_E.jpg rename to buildroot/share/dwin/icons-7/087-ICON_Cancel_E.jpg diff --git a/buildroot/share/dwin/icons-6/088-ICON_Confirm_C.jpg b/buildroot/share/dwin/icons-7/088-ICON_Confirm_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/088-ICON_Confirm_C.jpg rename to buildroot/share/dwin/icons-7/088-ICON_Confirm_C.jpg diff --git a/buildroot/share/dwin/icons-6/089-ICON_Confirm_E.jpg b/buildroot/share/dwin/icons-7/089-ICON_Confirm_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/089-ICON_Confirm_E.jpg rename to buildroot/share/dwin/icons-7/089-ICON_Confirm_E.jpg diff --git a/buildroot/share/dwin/icons-6/090-ICON_Info_0.jpg b/buildroot/share/dwin/icons-7/090-ICON_Info_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/090-ICON_Info_0.jpg rename to buildroot/share/dwin/icons-7/090-ICON_Info_0.jpg diff --git a/buildroot/share/dwin/icons-6/091-ICON_Info_1.jpg b/buildroot/share/dwin/icons-7/091-ICON_Info_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/091-ICON_Info_1.jpg rename to buildroot/share/dwin/icons-7/091-ICON_Info_1.jpg diff --git a/buildroot/share/dwin/make_jpgs.sh b/buildroot/share/dwin/make_jpgs.sh index 0acace7388df..c114757a0622 100755 --- a/buildroot/share/dwin/make_jpgs.sh +++ b/buildroot/share/dwin/make_jpgs.sh @@ -1,31 +1,31 @@ #!/usr/bin/env bash -mkdir -p icons-3 +mkdir -p icons-4 -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_off.svg ./icons-3/001-ICON_HotendOff.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_on.svg ./icons-3/002-ICON_HotendOn.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_off.svg ./icons-4/001-ICON_HotendOff.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_on.svg ./icons-4/002-ICON_HotendOn.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_off.svg ./icons-3/003-ICON_BedOff.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_on.svg ./icons-3/004-ICON_BedOn.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_off.svg ./icons-4/003-ICON_BedOff.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_on.svg ./icons-4/004-ICON_BedOn.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/fan.svg ./icons-3/005-ICON_Fan0.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 22.5 ./icons-svg/fan.svg ./icons-3/006-ICON_Fan1.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 45 ./icons-svg/fan.svg ./icons-3/007-ICON_Fan2.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 67.5 ./icons-svg/fan.svg ./icons-3/008-ICON_Fan3.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/fan.svg ./icons-4/005-ICON_Fan0.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 22.5 ./icons-svg/fan.svg ./icons-4/006-ICON_Fan1.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 45 ./icons-svg/fan.svg ./icons-4/007-ICON_Fan2.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 67.5 ./icons-svg/fan.svg ./icons-4/008-ICON_Fan3.jpg -convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/halted.svg ./icons-3/009-ICON_Halted.jpg -convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/question.svg ./icons-3/010-ICON_Question.jpg -convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/alert.svg ./icons-3/011-ICON_Alert.jpg +convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/halted.svg ./icons-4/009-ICON_Halted.jpg +convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/question.svg ./icons-4/010-ICON_Question.jpg +convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/alert.svg ./icons-4/011-ICON_Alert.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_cw.svg ./icons-3/012-ICON_RotateCW.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_ccw.svg ./icons-3/013-ICON_RotateCCW.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/up_arrow.svg ./icons-3/014-ICON_UpArrow.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/down_arrow.svg ./icons-3/015-ICON_DownArrow.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_cw.svg ./icons-4/012-ICON_RotateCW.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_ccw.svg ./icons-4/013-ICON_RotateCCW.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/up_arrow.svg ./icons-4/014-ICON_UpArrow.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/down_arrow.svg ./icons-4/015-ICON_DownArrow.jpg -convert -size 48x8 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bedline.svg ./icons-3/016-ICON_Bedline.jpg +convert -size 48x8 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bedline.svg ./icons-4/016-ICON_Bedline.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_off.svg ./icons-3/017-ICON_BedLeveledOff.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_on.svg ./icons-3/018-ICON_BedLeveledOn.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_off.svg ./icons-4/017-ICON_BedLeveledOff.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_on.svg ./icons-4/018-ICON_BedLeveledOn.jpg -rm 3.ICO -./bin/makeIco.py icons-3 3.ICO +rm -f 4.ICO +./bin/makeIco.py icons-4 4.ICO From b44e68e2ab5be3804d67eb646ebd567c2ffaee84 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 25 Dec 2023 00:21:58 +0000 Subject: [PATCH 037/236] [cron] Bump distribution date (2023-12-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 a2f0cc81abaa..a1a04872f69e 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-12-24" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 3fd20c352542..8be02e09ae85 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-12-24" + #define STRING_DISTRIBUTION_DATE "2023-12-25" #endif /** From d9a388bab86381843691af939dd023c6d534cf50 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 24 Dec 2023 21:31:54 -0600 Subject: [PATCH 038/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20some=20serial=20ch?= =?UTF-8?q?ars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/mstring.h | 2 +- Marlin/src/feature/runout.h | 2 +- Marlin/src/module/temperature.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/core/mstring.h b/Marlin/src/core/mstring.h index 0ea53fef1b48..7662f0f1a6ec 100644 --- a/Marlin/src/core/mstring.h +++ b/Marlin/src/core/mstring.h @@ -98,7 +98,7 @@ class MString { void debug(FSTR_P const f) { #if ENABLED(MSTRING_DEBUG) - SERIAL_ECHOLN(f, ':', uintptr_t(str), ' ', length(), ' ', str); + SERIAL_ECHOLN(f, AS_CHAR(':'), uintptr_t(str), AS_CHAR(' '), length(), AS_CHAR(' '), str); #endif } diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 847413d25ad6..43c034020ad3 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -159,7 +159,7 @@ class TFilamentMonitor : public FilamentMonitorBase { if (ran_out) { #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) SERIAL_ECHOPGM("Runout Sensors: "); - for (uint8_t i = 0; i < 8; ++i) SERIAL_ECHO('0' + char(runout_flags[i])); + for (uint8_t i = 0; i < 8; ++i) SERIAL_CHAR('0' + char(runout_flags[i])); SERIAL_ECHOLNPGM(" -> ", extruder, " RUN OUT"); #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index afde7d3b3497..d3aa37c6abd6 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1487,7 +1487,7 @@ void Temperature::_temp_error( OPTCODE(HAS_TEMP_CHAMBER, case H_CHAMBER: SERIAL_ECHOPGM(STR_HEATER_CHAMBER); break) OPTCODE(HAS_TEMP_BED, case H_BED: SERIAL_ECHOPGM(STR_HEATER_BED); break) default: - if (real_heater_id >= 0) SERIAL_ECHO('E', real_heater_id); + if (real_heater_id >= 0) SERIAL_ECHO(AS_CHAR('E'), real_heater_id); } #if ENABLED(ERR_INCLUDE_TEMP) SERIAL_ECHOLNPGM(STR_DETECTED_TEMP_B, deg, STR_DETECTED_TEMP_E); From 89fdfcfaf9df44b0782d3ef900aa28531d777058 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 24 Dec 2023 19:37:20 -0800 Subject: [PATCH 039/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MARKFORGED=5FINVER?= =?UTF-8?q?SE=20typos=20(#26558)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26516 --- 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 8dda2eec4001..9c1668619ba9 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3361,12 +3361,12 @@ void Stepper::endstop_triggered(const AxisEnum axis) { ) * double(0.5) #elif ENABLED(MARKFORGED_XY) axis == CORE_AXIS_1 - ? count_position[CORE_AXIS_1] ENABLED(MARKFORGED_INVERSE, +, -) count_position[CORE_AXIS_2] + ? count_position[CORE_AXIS_1] TERN(MARKFORGED_INVERSE, +, -) count_position[CORE_AXIS_2] : count_position[CORE_AXIS_2] #elif ENABLED(MARKFORGED_YX) axis == CORE_AXIS_1 ? count_position[CORE_AXIS_1] - : count_position[CORE_AXIS_2] ENABLED(MARKFORGED_INVERSE, +, -) count_position[CORE_AXIS_1] + : count_position[CORE_AXIS_2] TERN(MARKFORGED_INVERSE, +, -) count_position[CORE_AXIS_1] #else // !IS_CORE count_position[axis] #endif From bb557e5195a6177bc7386fce0176274aede60b64 Mon Sep 17 00:00:00 2001 From: Dennis <16547088+soligen2010@users.noreply.github.com> Date: Sun, 24 Dec 2023 22:40:20 -0500 Subject: [PATCH 040/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20string=20buffer=20?= =?UTF-8?q?warning=20(#26550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/core/mstring.h | 2 +- Marlin/src/core/types.h | 4 +-- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 6 ++-- .../lcd/dogm/status_screen_lite_ST7920.cpp | 31 +++++++++---------- Marlin/src/lcd/marlinui.cpp | 10 ++++-- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Marlin/src/core/mstring.h b/Marlin/src/core/mstring.h index 7662f0f1a6ec..819c1ab74f6f 100644 --- a/Marlin/src/core/mstring.h +++ b/Marlin/src/core/mstring.h @@ -136,7 +136,7 @@ class MString { MString& setn(FSTR_P const f, int len) { return setn_P(FTOP(f), len); } // set(repchr_t('-', 10)) - MString& set(const repchr_t &s) { int c = _MIN(s.count, SIZE); memset(str, s.asc, c); str[c] = '\0'; debug(F("")); return *this; } + MString& set(const repchr_t &s) { int c = _MIN(s.count, SIZE); if (c >= 0) { if (c > 0) memset(str, s.asc, c); str[c] = '\0'; } debug(F("repchr_t")); return *this; } // set(spaces_t(10)) MString& set(const spaces_t &s) { repchr_t r(' ', s.count); return set(r); } diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index bcbf2f07aa45..74a60fa4087b 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -309,10 +309,10 @@ typedef struct WFloat { float value; char width; char prec; typedef struct PFloat { float value; char prec; PFloat(float v, char p) : value(v), prec(p) {} } p_float_t; -typedef struct RepChr { char asc; uint8_t count; +typedef struct RepChr { char asc; int8_t count; RepChr(char a, uint8_t c) : asc(a), count(c) {} } repchr_t; -typedef struct Spaces { uint8_t count; +typedef struct Spaces { int8_t count; Spaces(uint8_t c) : count(c) {} } spaces_t; diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index ad9e38266162..e294d9c3df9b 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -479,16 +479,16 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const // Prepare strings for progress display #if ANY(HAS_EXTRA_PROGRESS, HAS_PRINT_PROGRESS) static MarlinUI::progress_t progress = 0; - static MString<12> progressString; + static MString<13> progressString; #endif #if HAS_EXTRA_PROGRESS #if HAS_TIME_DISPLAY static void prepare_time_string(const duration_t &time, char prefix) { - char str[10]; + char str[13]; const uint8_t time_len = time.toDigital(str, time.value >= 60*60*24L); // 5 to 8 chars - progressString.set(prefix, ':', spaces_t(10 - time_len), str); // 2 to 5 spaces + progressString.set(prefix, ':', spaces_t(10 - time_len), str); // 2 to 5 spaces } #endif #if ENABLED(SHOW_PROGRESS_PERCENT) diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 2039d9963581..4eb031e5385a 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -662,39 +662,36 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { // Process progress strings #if HAS_PRINT_PROGRESS - static char screenstr[8]; + static MString<8> screenstr; #if HAS_TIME_DISPLAY char * ST7920_Lite_Status_Screen::prepare_time_string(const duration_t &time, char prefix) { - static char str[6]; - memset(&screenstr, ' ', 8); // fill with spaces to avoid artifacts, not doing right-justification to save cycles - screenstr[0] = prefix; - TERN_(HOTENDS == 1, screenstr[1] = 0x07;) // add bullet • separator when there is space - int str_length = time.toDigital(str); - memcpy(&screenstr[TERN(HOTENDS == 1, 2, 1)], str, str_length); //memcpy because we can't have terminator - return screenstr; + static char time_str[6]; + (void)time.toDigital(time_str); // Up to 5 chars + screenstr = prefix; + if (HOTENDS == 1) screenstr += char(0x07); // Add bullet • separator when there is space + screenstr += time_str; + screenstr += Spaces(3); + return &screenstr; } #endif void ST7920_Lite_Status_Screen::draw_progress_string(uint8_t addr, const char *str) { set_ddram_address(addr); begin_data(); - write_str(str, TERN(HOTENDS == 1, 8, 6)); + write_str(str, HOTENDS == 1 ? 8 : 6); } - #define PPOS (DDRAM_LINE_3 + TERN(HOTENDS == 1, 4, 5)) // progress string position, in 16-bit words + constexpr uint8_t PPOS = (DDRAM_LINE_3 + (HOTENDS == 1 ? 4 : 5)); // Progress string position, in 16-bit words #if ENABLED(SHOW_PROGRESS_PERCENT) void MarlinUI::drawPercent() { lightUI.drawPercent(); } void ST7920_Lite_Status_Screen::drawPercent() { - #define LSHIFT TERN(HOTENDS == 1, 0, 1) const uint8_t progress = ui.get_progress_percent(); - memset(&screenstr, ' ', 8); // fill with spaces to avoid artifacts - if (progress){ - memcpy(&screenstr[2 - LSHIFT], \ - TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(ui.get_progress_permyriad()), ui8tostr3rj(progress)), \ - TERN(PRINT_PROGRESS_SHOW_DECIMALS, 4, 3)); - screenstr[(TERN(PRINT_PROGRESS_SHOW_DECIMALS, 6, 5) - LSHIFT)] = '%'; + if (progress) { + screenstr += Spaces(1 + (HOTENDS == 1)); + screenstr += TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(ui.get_progress_permyriad()), ui8tostr3rj(progress)); + screenstr += "% "; draw_progress_string(PPOS, screenstr); } } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 60fb298dfcde..4c5dec47616c 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1035,9 +1035,13 @@ void MarlinUI::init() { uint8_t abs_diff = ABS(encoderDiff); #if ENCODER_PULSES_PER_STEP > 1 - static int8_t lastEncoderDiff; - TERN_(HAS_TOUCH_SLEEP, if (lastEncoderDiff != encoderDiff) wakeup_screen()); - lastEncoderDiff = encoderDiff; + #if HAS_TOUCH_SLEEP + static int8_t lastEncoderDiff; + if (lastEncoderDiff != encoderDiff) { + wakeup_screen(); + lastEncoderDiff = encoderDiff; + } + #endif #endif const bool encoderPastThreshold = (abs_diff >= epps); From dbf81f40de4b47b2374c6f7f229e01b504e4eb7f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 26 Dec 2023 00:20:41 +0000 Subject: [PATCH 041/236] [cron] Bump distribution date (2023-12-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 a1a04872f69e..2d207e80dc8c 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-12-25" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 8be02e09ae85..7f25f5fe3ad5 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-12-25" + #define STRING_DISTRIBUTION_DATE "2023-12-26" #endif /** From 76030239283577ba1baca705e07182bb34345b64 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Dec 2023 20:58:38 -0600 Subject: [PATCH 042/236] =?UTF-8?q?=F0=9F=94=A8=20Apply=20signature.py=20h?= =?UTF-8?q?elp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/PlatformIO/scripts/signature.py | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index bfe7ab4a7394..2d024c366287 100755 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -8,32 +8,32 @@ from datetime import datetime from pathlib import Path -''' -Return all enabled #define items from a given C header file in a dictionary. -A "#define" in a multi-line comment could produce a false positive if it's not -preceded by a non-space character (like * in a multi-line comment). - -Output: -Each entry is a dictionary with a 'name' and a 'section' key. We end up with: - { MOTHERBOARD: { name: "MOTHERBOARD", section: "hardware" }, ... } - -The 'name' key might get dropped as redundant, but it's useful for debugging. - -Because the option names are the keys, only the last occurrence is retained. -Use the Schema class for a more complete list of options, soon with full parsing. - -This list is used to filter what is actually a config-defined option versus -defines from elsewhere. - -While the Schema class parses the configurations on its own, this script will -get the preprocessor output and get the intersection of the enabled options from -our crude scraping method and the actual compiler output. -We end up with the actual configured state, -better than what the config files say. You can then use the -a decent reflection of all enabled options that (probably) came from -resulting config.ini to produce more exact configuration files. -''' def enabled_defines(filepath): + ''' + Return all enabled #define items from a given C header file in a dictionary. + A "#define" in a multi-line comment could produce a false positive if it's not + preceded by a non-space character (like * in a multi-line comment). + + Output: + Each entry is a dictionary with a 'name' and a 'section' key. We end up with: + { MOTHERBOARD: { name: "MOTHERBOARD", section: "hardware" }, ... } + + The 'name' key might get dropped as redundant, but it's useful for debugging. + + Because the option names are the keys, only the last occurrence is retained. + Use the Schema class for a more complete list of options, soon with full parsing. + + This list is used to filter what is actually a config-defined option versus + defines from elsewhere. + + While the Schema class parses the configurations on its own, this script will + get the preprocessor output and get the intersection of the enabled options from + our crude scraping method and the actual compiler output. + We end up with the actual configured state, + better than what the config files say. You can then use the + a decent reflection of all enabled options that (probably) came from + resulting config.ini to produce more exact configuration files. + ''' outdict = {} section = "user" spatt = re.compile(r".*@section +([-a-zA-Z0-9_\s]+)$") # must match @section ... @@ -74,12 +74,12 @@ def compress_file(filepath, storedname, outpath): with zipfile.ZipFile(outpath, 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf: zipf.write(filepath, arcname=storedname, compress_type=zipfile.ZIP_BZIP2, compresslevel=9) -''' -Compute the build signature by extracting all configuration settings and -building a unique reversible signature that can be included in the binary. -The signature can be reversed to get a 1:1 equivalent configuration file. -''' def compute_build_signature(env): + ''' + Compute the build signature by extracting all configuration settings and + building a unique reversible signature that can be included in the binary. + The signature can be reversed to get a 1:1 equivalent configuration file. + ''' if 'BUILD_SIGNATURE' in env: return env.Append(BUILD_SIGNATURE=1) From 06b9e400423c0e03ff1abac0c294661e44f5b93f Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 26 Dec 2023 15:43:06 -0800 Subject: [PATCH 043/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Use?= =?UTF-8?q?=20MAX31865=20flag=20(#26574)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h | 6 +++--- Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h index dd8812fe2af9..72a6db73354e 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h @@ -26,15 +26,15 @@ // // Temperature Sensors // -#if TEMP_SENSOR_0 == -5 +#define TEMP_0_PIN PF4 // TH0 + +#if TEMP_SENSOR_0_IS_MAX31865 #define TEMP_0_CS_PIN PF8 // Max31865 CS #define TEMP_0_SCK_PIN PA5 #define TEMP_0_MISO_PIN PA6 #define TEMP_0_MOSI_PIN PA7 #define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865 #define FORCE_SOFT_SPI -#else - #define TEMP_0_PIN PF4 // TH0 #endif #if !defined(Z_MIN_PROBE_PIN) && DISABLED(BLTOUCH) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h index 82216dec170f..43b3d6852237 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h @@ -214,19 +214,18 @@ // Temperature Sensors // #define TEMP_BED_PIN PF3 // TB +#define TEMP_0_PIN PF4 // TH0 #define TEMP_1_PIN PF5 // TH1 #define TEMP_2_PIN PF6 // TH2 #define TEMP_3_PIN PF7 // TH3 -#if TEMP_SENSOR_0 == -5 +#if TEMP_SENSOR_0_IS_MAX31865 #define TEMP_0_CS_PIN PF8 // Max31865 CS #define TEMP_0_SCK_PIN PA5 #define TEMP_0_MISO_PIN PA6 #define TEMP_0_MOSI_PIN PA7 #define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865 #define FORCE_SOFT_SPI -#else - #define TEMP_0_PIN PF4 // TH0 #endif // From c485f513d70acc838b7a1554c955fdaf5ef3df7f Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 26 Dec 2023 15:45:42 -0800 Subject: [PATCH 044/236] =?UTF-8?q?=E2=9C=A8=20BigTreeTech=20Kraken=20V1.0?= =?UTF-8?q?=20(STM32H723ZG)=20(#26565)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: bigtreetech <38851044+bigtreetech@users.noreply.github.com> --- Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + .../src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h | 674 +++++++++++++++++ .../PlatformIO/boards/marlin_STM32H723ZG.json | 61 ++ .../variants/MARLIN_H723ZG/PeripheralPins.c | 688 ++++++++++++++++++ .../variants/MARLIN_H723ZG/PinNamesVar.h | 117 +++ .../variants/MARLIN_H723ZG/ldscript.ld | 174 +++++ .../variant_MARLIN_STM32H723ZG.cpp | 317 ++++++++ .../variant_MARLIN_STM32H723ZG.h | 309 ++++++++ ini/stm32h7.ini | 7 + 10 files changed, 2350 insertions(+) create mode 100644 Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h create mode 100644 buildroot/share/PlatformIO/boards/marlin_STM32H723ZG.json create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723ZG/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723ZG/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723ZG/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 49570241e7fe..5730ecbd4f90 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -482,6 +482,7 @@ #define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723ZE) #define BOARD_BTT_OCTOPUS_PRO_V1_0_1 6009 // BigTreeTech Octopus Pro v1.0.1 (STM32H723ZE) #define BOARD_BTT_OCTOPUS_PRO_V1_1 6010 // BigTreeTech Octopus Pro v1.1 (STM32H723ZE) +#define BOARD_BTT_KRAKEN_V1_0 6011 // BigTreeTech Kraken v1.0 (STM32H723ZG) // // Espressif ESP32 WiFi diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 0728f5899498..b881c849ebd8 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -841,6 +841,8 @@ #include "stm32h7/pins_BTT_OCTOPUS_PRO_V1_0_1.h" // STM32H7 env:STM32H723ZE_btt #elif MB(BTT_OCTOPUS_PRO_V1_1) #include "stm32h7/pins_BTT_OCTOPUS_PRO_V1_1.h" // STM32H7 env:STM32H723ZE_btt +#elif MB(BTT_KRAKEN_V1_0) + #include "stm32h7/pins_BTT_KRAKEN_V1_0.h" // STM32H7 env:STM32H723ZG_btt #elif MB(TEENSY41) #include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41 #elif MB(T41U5XBB) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h new file mode 100644 index 000000000000..ad24d902f92e --- /dev/null +++ b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h @@ -0,0 +1,674 @@ +/** + * 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 "BTT Kraken V1.0" +#define BOARD_WEBSITE_URL "github.com/bigtreetech/BIGTREETECH-Kraken" + +#define USES_DIAG_JUMPERS + +// +// EEPROM +// +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) + #undef NO_EEPROM_SELECTED + #ifndef FLASH_EEPROM_EMULATION + #define FLASH_EEPROM_EMULATION + #endif + #define EEPROM_PAGE_SIZE (0x800UL) // 2K + #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE +#endif + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 8 + +// +// Servos +// +#define SERVO0_PIN PE9 // PROBE +#define SERVO1_PIN PE7 // MOTOR + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PC15 // MIN1 +#define Y_DIAG_PIN PF0 // MIN2 +#define Z_DIAG_PIN PF1 // MIN3 +#define E0_DIAG_PIN PF2 // MIN4 +#define E1_DIAG_PIN PF3 // MIN5 +#define E2_DIAG_PIN PF4 // MIN6 +#define E3_DIAG_PIN PF10 // MIN7 +#define E4_DIAG_PIN PC0 // MIN8 + +// +// 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 // MIN4 + #else + #define X_MIN_PIN E0_DIAG_PIN // MIN4 + #endif +#elif NEEDS_X_MINMAX + #ifndef X_MIN_PIN + #define X_MIN_PIN X_DIAG_PIN // MIN1 + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN E0_DIAG_PIN // MIN4 + #endif +#else + #define X_STOP_PIN X_DIAG_PIN // MIN1 +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN + #if Y_HOME_TO_MIN + #define Y_MAX_PIN E1_DIAG_PIN // MIN5 + #else + #define Y_MIN_PIN E1_DIAG_PIN // MIN5 + #endif +#elif NEEDS_Y_MINMAX + #ifndef Y_MIN_PIN + #define Y_MIN_PIN Y_DIAG_PIN // MIN2 + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN E1_DIAG_PIN // MIN5 + #endif +#else + #define Y_STOP_PIN Y_DIAG_PIN // MIN2 +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN + #if Z_HOME_TO_MIN + #define Z_MAX_PIN E2_DIAG_PIN // MIN6 + #else + #define Z_MIN_PIN E2_DIAG_PIN // MIN6 + #endif +#elif NEEDS_Z_MINMAX + #ifndef Z_MIN_PIN + #define Z_MIN_PIN Z_DIAG_PIN // MIN3 + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN E2_DIAG_PIN // MIN6 + #endif +#else + #define Z_STOP_PIN Z_DIAG_PIN // MIN3 +#endif + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PG1 // PROBE (BLTouch, MicroProbe, etc.) + //#define Z_MIN_PROBE_PIN PD11 // IND-DET (Inductive probe) +#endif + +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN E0_DIAG_PIN // MIN4 +#define FIL_RUNOUT2_PIN E1_DIAG_PIN // MIN5 +#define FIL_RUNOUT3_PIN E2_DIAG_PIN // MIN6 +#define FIL_RUNOUT4_PIN E3_DIAG_PIN // MIN7 +#define FIL_RUNOUT5_PIN E4_DIAG_PIN // MIN8 + +// +// Steppers +// +#define X_STEP_PIN PC14 // S1 (Motor 1) +#define X_DIR_PIN PC13 +#define X_ENABLE_PIN PE6 +#ifndef X_CS_PIN + #define X_CS_PIN PD6 +#endif + +#define Y_STEP_PIN PE5 // S2 (Motor 2) +#define Y_DIR_PIN PE4 +#define Y_ENABLE_PIN PE3 +#ifndef Y_CS_PIN + #define Y_CS_PIN PD5 +#endif + +#define Z_STEP_PIN PE2 // S3 (Motor 3) +#define Z_DIR_PIN PE1 +#define Z_ENABLE_PIN PE0 +#ifndef Z_CS_PIN + #define Z_CS_PIN PD4 +#endif + +#define E0_STEP_PIN PB9 // S4 (Motor 4) +#define E0_DIR_PIN PB8 +#define E0_ENABLE_PIN PB7 +#ifndef E0_CS_PIN + #define E0_CS_PIN PD3 +#endif + +#define E1_STEP_PIN PG9 // S5 (Motor 5) +#define E1_DIR_PIN PG10 +#define E1_ENABLE_PIN PG13 +#ifndef E1_CS_PIN + #define E1_CS_PIN PD2 +#endif + +#define E2_STEP_PIN PG11 // S6 (Motor 6) +#define E2_DIR_PIN PD7 +#define E2_ENABLE_PIN PG12 +#ifndef E2_CS_PIN + #define E2_CS_PIN PA15 +#endif + +#define E3_STEP_PIN PB4 // S7 (Motor 7) +#define E3_DIR_PIN PB3 +#define E3_ENABLE_PIN PB5 +#ifndef E3_CS_PIN + #define E3_CS_PIN PA9 +#endif + +#define E4_STEP_PIN PG15 // S8 (Motor 8) +#define E4_DIR_PIN PB6 +#define E4_ENABLE_PIN PG14 +#ifndef E4_CS_PIN + #define E4_CS_PIN PA10 +#endif + +// +// Integrated TMC2160 driver defaults +// +#if (HAS_X_AXIS && !AXIS_DRIVER_TYPE_X(TMC2160)) \ + || (HAS_Y_AXIS && !AXIS_DRIVER_TYPE_Y(TMC2160)) \ + || (NUM_Z_STEPPERS >= 1 && !AXIS_DRIVER_TYPE_Z(TMC2160)) \ + || (NUM_Z_STEPPERS >= 2 && !AXIS_DRIVER_TYPE_Z2(TMC2160)) \ + || (NUM_Z_STEPPERS >= 3 && !AXIS_DRIVER_TYPE_Z3(TMC2160)) \ + || (NUM_Z_STEPPERS >= 4 && !AXIS_DRIVER_TYPE_Z4(TMC2160)) \ + || (EXTRUDERS >= 1 && !AXIS_DRIVER_TYPE_E0(TMC2160)) \ + || (EXTRUDERS >= 2 && !AXIS_DRIVER_TYPE_E1(TMC2160)) \ + || (EXTRUDERS >= 3 && !AXIS_DRIVER_TYPE_E2(TMC2160)) \ + || (EXTRUDERS >= 4 && !AXIS_DRIVER_TYPE_E3(TMC2160)) \ + || (EXTRUDERS >= 5 && !AXIS_DRIVER_TYPE_E4(TMC2160)) + #error "All DRIVER TYPEs must be TMC2160 for BOARD_BTT_KRAKEN_V1_0." +#endif + +// RSENSE defaults +#if HAS_X_AXIS + static_assert(X_RSENSE == 0.022, "X_RSENSE (S1 / Motor 1) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if HAS_Y_AXIS + static_assert(Y_RSENSE == 0.022, "Y_RSENSE (S2 / Motor 2) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if NUM_Z_STEPPERS >= 1 + static_assert(Z_RSENSE == 0.022, "Z_RSENSE (S3 / Motor 3) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if NUM_Z_STEPPERS >= 2 + static_assert(Z2_RSENSE == 0.075, "Z2_RSENSE (S5 / Motor 5) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if NUM_Z_STEPPERS >= 3 + static_assert(Z3_RSENSE == 0.075, "Z3_RSENSE (S6 / Motor 6) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if NUM_Z_STEPPERS >= 4 + static_assert(Z4_RSENSE == 0.075, "Z4_RSENSE (S7 / Motor 7) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if EXTRUDERS >= 1 + static_assert(E0_RSENSE == 0.022, "E0_RSENSE (S4 / Motor 4) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if EXTRUDERS >= 2 + static_assert(E1_RSENSE == 0.075, "E1_RSENSE (S5 / Motor 5) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if EXTRUDERS >= 3 + static_assert(E2_RSENSE == 0.075, "E2_RSENSE (S6 / Motor 6) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if EXTRUDERS >= 4 + static_assert(E3_RSENSE == 0.075, "E3_RSENSE (S7 / Motor 7) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif +#if EXTRUDERS >= 5 + static_assert(E4_RSENSE == 0.075, "E4_RSENSE (S8 / Motor 8) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PB1 // TH0 +#define TEMP_1_PIN PC5 // TH1 +#define TEMP_2_PIN PC4 // TH2 +#define TEMP_3_PIN PA7 // TH3 +#define TEMP_BED_PIN PB0 // THB + +#if TEMP_SENSOR_0_IS_MAX31865 + #define TEMP_0_CS_PIN PC9 // 31865 (1) + #define TEMP_0_SCK_PIN PC10 + #define TEMP_0_MISO_PIN PC11 + #define TEMP_0_MOSI_PIN PC12 + #define SOFTWARE_SPI // MAX31865 and LCD SD share a set of SPIs, Set SD to software SPI + #define FORCE_SOFT_SPI +#endif +#if TEMP_SENSOR_1_IS_MAX31865 + #define TEMP_1_CS_PIN PA8 // 31865 (2) + #define TEMP_1_SCK_PIN PC10 + #define TEMP_1_MISO_PIN PC11 + #define TEMP_1_MOSI_PIN PC12 +#endif + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PF5 // BED-OUT +#define HEATER_0_PIN PF6 // HE0 +#define HEATER_1_PIN PF7 // HE1 +#define HEATER_2_PIN PF9 // HE2 +#define HEATER_3_PIN PF8 // HE3 + +#define FAN0_PIN PA0 // FAN0 (3 wire) +#define FAN1_PIN PA1 // FAN1 (3 wire) +#define FAN2_PIN PA2 // FAN2 (3 wire) +#define FAN3_PIN PA3 // FAN3 (3 wire) +#define FAN4_PIN PA4 // FAN4 (3 wire) +#define FAN5_PIN PA5 // FAN5 (3 wire) +#define FAN6_PIN PA6 // FAN6 (4 wire) +#define FAN7_PIN PE8 // FAN7 (4 wire) + +#ifndef E0_FAN_TACHO_PIN + //#define E0_FAN_TACHO_PIN PC1 // FAN6 +#endif +#ifndef E1_FAN_TACHO_PIN + //#define E1_FAN_TACHO_PIN PG0 // FAN7 +#endif + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PD10 // PS-ON +#endif + +// +// Misc. Functions +// +#define LED_PIN PA14 + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN PC2 +#endif +#ifndef FILWIDTH2_PIN + #define FILWIDTH2_PIN PC3 +#endif + +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #if HAS_WIRED_LCD + #define SDCARD_CONNECTION LCD + #else + #define SDCARD_CONNECTION ONBOARD + #endif +#endif + +// +// Default pins for TMC software SPI +// This board only supports SW SPI for stepper drivers +// +#if HAS_TMC_SPI + #define TMC_USE_SW_SPI + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PC8 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PC7 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PC6 + #endif +#endif + +/** ------ ------ + * (BEEPER) PG5 | 1 2 | PG4 (BTN_ENC) (MISO) PE13 | 1 2 | PE12 (SCK) + * (LCD_EN) PG3 | 3 4 | PG2 (LCD_RS) (BTN_EN1) PG8 | 3 4 | PE11 (SD_SS) + * (LCD_D4) PD15 5 6 | PD14 (LCD_D5) (BTN_EN2) PG7 5 6 | PE14 (MOSI) + * (LCD_D6) PD13 | 7 8 | PD12 (LCD_D7) (SD_DETECT) PG6 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN PG5 +#define EXP1_02_PIN PG4 +#define EXP1_03_PIN PG3 +#define EXP1_04_PIN PG2 +#define EXP1_05_PIN PD15 +#define EXP1_06_PIN PD14 +#define EXP1_07_PIN PD13 +#define EXP1_08_PIN PD12 + +#define EXP2_01_PIN PE13 +#define EXP2_02_PIN PE12 +#define EXP2_03_PIN PG8 +#define EXP2_04_PIN PE11 +#define EXP2_05_PIN PG7 +#define EXP2_06_PIN PE14 +#define EXP2_07_PIN PG6 +#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_KRAKEN_V1_0 onboard SD requires SD_DETECT_STATE set to HIGH." + #endif + #define SDSS PB12 + #define SD_SS_PIN SDSS + #define SD_SCK_PIN PB13 + #define SD_MISO_PIN PB14 + #define SD_MOSI_PIN PB15 + #define SD_DETECT_PIN PE15 + #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 BOARD_BTT_KRAKEN_V1_0." +#endif + +#if ENABLED(BTT_MOTOR_EXPANSION) + /** + * ------ ------ + * M3DIAG | 1 2 | M3RX M3STP | 1 2 | M3DIR + * M2DIAG | 3 4 | M2RX M2STP | 3 4 | M2DIR + * M1DIAG 5 6 | M1RX M1DIR 5 6 | M1STP + * M3EN | 7 8 | M2EN M1EN | 7 8 | -- + * GND | 9 10 | -- GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + + // M1 on Driver Expansion Module + #define E4_STEP_PIN EXP2_06_PIN + #define E4_DIR_PIN EXP2_05_PIN + #define E4_ENABLE_PIN EXP2_07_PIN + #define E4_DIAG_PIN EXP1_05_PIN + #define E4_CS_PIN EXP1_06_PIN + #if HAS_TMC_UART + #define E4_SERIAL_TX_PIN EXP1_06_PIN + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN + #endif + + // M2 on Driver Expansion Module + #define E5_STEP_PIN EXP2_03_PIN + #define E5_DIR_PIN EXP2_04_PIN + #define E5_ENABLE_PIN EXP1_08_PIN + #define E5_DIAG_PIN EXP1_03_PIN + #define E5_CS_PIN EXP1_04_PIN + #if HAS_TMC_UART + #define E5_SERIAL_TX_PIN EXP1_04_PIN + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN + #endif + + // M3 on Driver Expansion Module + #define E6_STEP_PIN EXP2_01_PIN + #define E6_DIR_PIN EXP2_02_PIN + #define E6_ENABLE_PIN EXP1_07_PIN + #define E6_DIAG_PIN EXP1_01_PIN + #define E6_CS_PIN EXP1_02_PIN + #if HAS_TMC_UART + #define E6_SERIAL_TX_PIN EXP1_02_PIN + #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN + #endif + +#endif // BTT_MOTOR_EXPANSION + +// +// LCDs and Controllers +// +#if IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS EXP2_03_PIN + #endif + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI + /** + * ------ ------ --- + * | 1 2 | | 1 2 | 1 | + * | 3 4 | RX | 3 4 | TX | 2 | RX + * ENT 5 6 | BEEP ENT 5 6 | BEEP | 3 | TX + * B | 7 8 | A B | 7 8 | A | 4 | + * GND | 9 10 | VCC GND | 9 10 | VCC 5 | + * ------ ------ --- + * EXP1 DWIN TFT + * + * DWIN pins are labeled as printed on DWIN PCB. GND, VCC, A, B, ENT & BEEP can be connected in the same + * orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX. + */ + + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + #define BEEPER_PIN EXP1_06_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_07_PIN + #define BTN_ENC EXP1_05_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_07_PIN + + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN + + #define LCD_PINS_EN 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_EN 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 LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if ANY(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 // Config for Classic UI (emulated DOGM) and Color UI + + #define TFT_SCK_PIN EXP2_02_PIN + #define TFT_MISO_PIN EXP2_01_PIN + #define TFT_MOSI_PIN EXP2_06_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #if ENABLED(BTT_TFT35_SPI_V1_0) + + /** + * ------ ------ + * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK + * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS + * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI + * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET + * GND | 9 10 | VCC GND | 9 10 | NC + * ------ ------ + * EXP1 EXP2 + * + * 480x320, 3.5", SPI Display with Rotary Encoder. + * Stock Display for the BIQU B1 SE Series. + * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf + */ + #define TFT_CS_PIN EXP2_04_PIN + #define TFT_DC_PIN EXP2_07_PIN + #define TFT_A0_PIN TFT_DC_PIN + + #define TOUCH_CS_PIN EXP1_04_PIN + #define TOUCH_SCK_PIN EXP1_05_PIN + #define TOUCH_MISO_PIN EXP1_06_PIN + #define TOUCH_MOSI_PIN EXP1_03_PIN + #define TOUCH_INT_PIN EXP1_07_PIN + + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X 17540 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y -11388 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X -21 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y 337 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + + #elif ENABLED(MKS_TS35_V2_0) + + /** ------ ------ + * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK + * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS + * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI + * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET + * GND | 9 10 | VCC GND | 9 10 | VCC + * ------ ------ + * EXP1 EXP2 + */ + #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS + #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS + #define TFT_A0_PIN TFT_DC_PIN + + #define TFT_RESET_PIN EXP1_04_PIN + + #define LCD_BACKLIGHT_PIN EXP1_03_PIN + #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI + + #define LCD_READ_ID 0xD3 + #define LCD_USE_DMA_SPI + + #define TFT_BUFFER_WORDS 14400 + + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17253 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11579 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 514 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -24 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + + #endif + +#endif + +// +// NeoPixel LED +// +#if DISABLED(FYSETC_MINI_12864_2_1) && !defined(NEOPIXEL_PIN) + #define NEOPIXEL_PIN PF12 // RGB1 +#endif +#ifndef NEOPIXEL2_PIN + #define NEOPIXEL2_PIN PF11 // RGB2 +#endif diff --git a/buildroot/share/PlatformIO/boards/marlin_STM32H723ZG.json b/buildroot/share/PlatformIO/boards/marlin_STM32H723ZG.json new file mode 100644 index 000000000000..28698389c3b8 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_STM32H723ZG.json @@ -0,0 +1,61 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m7", + "extra_flags": "-DSTM32H7xx -DSTM32H723xx", + "f_cpu": "550000000L", + "mcu": "stm32h723zgt6", + "product_line": "STM32H723xx", + "variant": "MARLIN_H723ZG" + }, + "connectivity": [ + "can", + "ethernet" + ], + "debug": { + "jlink_device": "STM32H723ZG", + "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": "STM32H723ZG (564k RAM. 1024k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 577536, + "maximum_size": 1048576, + "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/stm32h723zg.html", + "vendor": "ST" +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/PeripheralPins.c new file mode 100644 index 000000000000..70048173e787 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/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_H723ZG/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/PinNamesVar.h new file mode 100644 index 000000000000..ad9d80a62518 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/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_H723ZG/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/ldscript.ld new file mode 100644 index 000000000000..63228610336b --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/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_H723ZG/variant_MARLIN_STM32H723ZG.cpp b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.cpp new file mode 100644 index 000000000000..4506cf5ce6b5 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.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_H723ZG/variant_MARLIN_STM32H723ZG.h b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h new file mode 100644 index 000000000000..1b518f01cfa4 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h @@ -0,0 +1,309 @@ +/* + ******************************************************************************* + * 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 +#define NUM_ANALOG_FIRST PA0 + +// 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/stm32h7.ini b/ini/stm32h7.ini index cdc2a29c8002..0a66f6d91e57 100644 --- a/ini/stm32h7.ini +++ b/ini/stm32h7.ini @@ -130,3 +130,10 @@ debug_tool = cmsis-dap [env:STM32H723ZE_btt] extends = STM32H723Zx_btt board = marlin_STM32H723ZE + +# +# BigTreeTech Kraken V1.0 (STM32H723ZGT6 ARM Cortex-M7) +# +[env:STM32H723ZG_btt] +extends = STM32H723Zx_btt +board = marlin_STM32H723ZG From bd36644d85bef0ff02f701203365ce16c5db3dc0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Dec 2023 17:52:46 -0600 Subject: [PATCH 045/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Mov?= =?UTF-8?q?e=20U8G=20defines=20to=20HALs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/u8g/LCD_defines.h | 29 +++++ Marlin/src/HAL/DUE/u8g/LCD_defines.h | 34 ++++++ .../u8g_com_HAL_DUE_shared_hw_spi.cpp | 0 .../u8g_com_HAL_DUE_st7920_sw_spi.cpp | 0 .../{dogm => u8g}/u8g_com_HAL_DUE_sw_spi.cpp | 0 .../u8g_com_HAL_DUE_sw_spi_shared.cpp | 0 .../u8g_com_HAL_DUE_sw_spi_shared.h | 0 Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h | 4 + Marlin/src/HAL/ESP32/u8g/LCD_defines.h | 29 +++++ Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp | 8 +- Marlin/src/HAL/HC32/u8g/LCD_defines.h | 26 ++++ Marlin/src/HAL/LINUX/u8g/LCD_defines.h | 26 ++++ Marlin/src/HAL/LPC1768/Servo.h | 1 - Marlin/src/HAL/LPC1768/u8g/LCD_defines.h | 33 +++--- .../u8g/u8g_com_HAL_LPC1768_hw_spi.cpp | 1 - .../u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp | 1 - .../u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp | 1 - .../u8g/u8g_com_HAL_LPC1768_sw_spi.cpp | 8 +- Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h | 20 +--- .../NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp | 4 +- Marlin/src/HAL/SAMD21/u8g/LCD_defines.h | 14 +-- Marlin/src/HAL/SAMD51/u8g/LCD_defines.h | 29 +++++ Marlin/src/HAL/STM32/u8g/LCD_defines.h | 32 +++++ .../STM32F1/dogm/u8g_com_stm32duino_swspi.cpp | 8 +- Marlin/src/HAL/STM32F1/u8g/LCD_defines.h | 34 ++++++ Marlin/src/HAL/TEENSY31_32/u8g/LCD_defines.h | 26 ++++ Marlin/src/HAL/TEENSY35_36/u8g/LCD_defines.h | 26 ++++ Marlin/src/HAL/TEENSY40_41/u8g/LCD_defines.h | 26 ++++ Marlin/src/lcd/dogm/HAL_LCD_com_defines.h | 112 +++--------------- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 8 +- 30 files changed, 376 insertions(+), 164 deletions(-) create mode 100644 Marlin/src/HAL/AVR/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/DUE/u8g/LCD_defines.h rename Marlin/src/HAL/DUE/{dogm => u8g}/u8g_com_HAL_DUE_shared_hw_spi.cpp (100%) rename Marlin/src/HAL/DUE/{dogm => u8g}/u8g_com_HAL_DUE_st7920_sw_spi.cpp (100%) rename Marlin/src/HAL/DUE/{dogm => u8g}/u8g_com_HAL_DUE_sw_spi.cpp (100%) rename Marlin/src/HAL/DUE/{dogm => u8g}/u8g_com_HAL_DUE_sw_spi_shared.cpp (100%) rename Marlin/src/HAL/DUE/{dogm => u8g}/u8g_com_HAL_DUE_sw_spi_shared.h (100%) create mode 100644 Marlin/src/HAL/ESP32/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/HC32/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/LINUX/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/SAMD51/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/STM32/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/STM32F1/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/TEENSY31_32/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/TEENSY35_36/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/TEENSY40_41/u8g/LCD_defines.h diff --git a/Marlin/src/HAL/AVR/u8g/LCD_defines.h b/Marlin/src/HAL/AVR/u8g/LCD_defines.h new file mode 100644 index 000000000000..91858c0dbf5c --- /dev/null +++ b/Marlin/src/HAL/AVR/u8g/LCD_defines.h @@ -0,0 +1,29 @@ +/** + * 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 + +/** + * AVR LCD-specific defines + */ + +uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn diff --git a/Marlin/src/HAL/DUE/u8g/LCD_defines.h b/Marlin/src/HAL/DUE/u8g/LCD_defines.h new file mode 100644 index 000000000000..e85f13514f6c --- /dev/null +++ b/Marlin/src/HAL/DUE/u8g/LCD_defines.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 + +/** + * DUE (SAM3X8E) LCD-specific defines + */ + +uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + +#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn +#define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_DUE_shared_hw_spi_fn +#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_DUE_ST7920_sw_spi_fn diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_shared_hw_spi.cpp similarity index 100% rename from Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp rename to Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_shared_hw_spi.cpp diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_st7920_sw_spi.cpp similarity index 100% rename from Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp rename to Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_st7920_sw_spi.cpp diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp b/Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_sw_spi.cpp similarity index 100% rename from Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp rename to Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_sw_spi.cpp diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp b/Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_sw_spi_shared.cpp similarity index 100% rename from Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp rename to Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_sw_spi_shared.cpp diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h b/Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_sw_spi_shared.h similarity index 100% rename from Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h rename to Marlin/src/HAL/DUE/u8g/u8g_com_HAL_DUE_sw_spi_shared.h diff --git a/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h b/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h index 5f1c4b16019d..07d2efe0bdbd 100644 --- a/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h @@ -20,3 +20,7 @@ * */ #pragma once + +#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1) + #define U8G_HW_SPI_ESP32 1 +#endif diff --git a/Marlin/src/HAL/ESP32/u8g/LCD_defines.h b/Marlin/src/HAL/ESP32/u8g/LCD_defines.h new file mode 100644 index 000000000000..3696d60d7ca3 --- /dev/null +++ b/Marlin/src/HAL/ESP32/u8g/LCD_defines.h @@ -0,0 +1,29 @@ +/** + * 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 + +/** + * ESP32 LCD-specific defines + */ + +uint8_t u8g_esp32_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +#define U8G_COM_HAL_HW_SPI_FN u8g_esp32_hw_spi_fn diff --git a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp index 012604dbfb8b..a4c1980adc73 100644 --- a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp +++ b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp @@ -25,7 +25,7 @@ #include "../../inc/MarlinConfig.h" -#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1) +#if U8G_HW_SPI_ESP32 #include #include "../shared/HAL_SPI.h" @@ -41,7 +41,6 @@ static SPISettings spiConfig; - #ifndef LCD_SPI_SPEED #ifdef SD_SPI_SPEED #define LCD_SPI_SPEED SD_SPI_SPEED // Assume SPI speed shared with SD @@ -50,7 +49,7 @@ static SPISettings spiConfig; #endif #endif -uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { +uint8_t u8g_esp32_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT #if ENABLED(PAUSE_LCD_FOR_BUSY_SD) @@ -101,6 +100,5 @@ uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt return 1; } -#endif // MKS_MINI_12864 || FYSETC_MINI_12864_2_1 - +#endif // U8G_HW_SPI_ESP32 #endif // ARDUINO_ARCH_ESP32 diff --git a/Marlin/src/HAL/HC32/u8g/LCD_defines.h b/Marlin/src/HAL/HC32/u8g/LCD_defines.h new file mode 100644 index 000000000000..8dc94bca7f3f --- /dev/null +++ b/Marlin/src/HAL/HC32/u8g/LCD_defines.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 + +/** + * HC32 LCD-specific defines + */ diff --git a/Marlin/src/HAL/LINUX/u8g/LCD_defines.h b/Marlin/src/HAL/LINUX/u8g/LCD_defines.h new file mode 100644 index 000000000000..6caa0240cad0 --- /dev/null +++ b/Marlin/src/HAL/LINUX/u8g/LCD_defines.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 + +/** + * Linux LCD-specific defines + */ diff --git a/Marlin/src/HAL/LPC1768/Servo.h b/Marlin/src/HAL/LPC1768/Servo.h index f02f503a67da..221001c9483c 100644 --- a/Marlin/src/HAL/LPC1768/Servo.h +++ b/Marlin/src/HAL/LPC1768/Servo.h @@ -39,7 +39,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#pragma once /** * Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers - diff --git a/Marlin/src/HAL/LPC1768/u8g/LCD_defines.h b/Marlin/src/HAL/LPC1768/u8g/LCD_defines.h index d2260037b6a7..5b58f1223ab5 100644 --- a/Marlin/src/HAL/LPC1768/u8g/LCD_defines.h +++ b/Marlin/src/HAL/LPC1768/u8g/LCD_defines.h @@ -25,25 +25,22 @@ * LPC1768 LCD-specific defines */ -// The following are optional depending on the platform. +#ifndef U8G_HAL_LINKS -// definitions of HAL specific com and device drivers. -uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); -uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); -uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); -uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); -uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #define U8G_COM_SSD_I2C_HAL u8g_com_arduino_ssd_i2c_fn // See U8glib-HAL +#else -// connect U8g com generic com names to the desired driver -#define U8G_COM_HW_SPI u8g_com_HAL_LPC1768_hw_spi_fn // use LPC1768 specific hardware SPI routine -#define U8G_COM_SW_SPI u8g_com_HAL_LPC1768_sw_spi_fn // use LPC1768 specific software SPI routine -#define U8G_COM_ST7920_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn -#define U8G_COM_ST7920_SW_SPI u8g_com_HAL_LPC1768_ST7920_sw_spi_fn -#define U8G_COM_SSD_I2C u8g_com_HAL_LPC1768_ssd_hw_i2c_fn + uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); -// let these default for now -#define U8G_COM_PARALLEL u8g_com_null_fn -#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 + #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn + #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_LPC1768_hw_spi_fn + #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_LPC1768_ST7920_sw_spi_fn + #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn + #define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn + +#endif diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp index 0118f92847de..406fc4840c21 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp @@ -125,5 +125,4 @@ uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, } #endif // HAS_MARLINUI_U8GLIB - #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp index bf76eaf0f491..3dea365ac7b8 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp @@ -194,5 +194,4 @@ uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v } #endif // HAS_MARLINUI_U8GLIB - #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp index ce7b33801931..c029dc068013 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp @@ -134,5 +134,4 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar } #endif // HAS_MARLINUI_U8GLIB - #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp index f6ed7b0e7e8a..4edd0d38861e 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -131,7 +131,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck static uint8_t SPI_speed = 0; -static void u8g_sw_spi_HAL_LPC1768_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { +static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); #else @@ -176,13 +176,13 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, break; case U8G_COM_MSG_WRITE_BYTE: - u8g_sw_spi_HAL_LPC1768_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], arg_val); + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], arg_val); break; case U8G_COM_MSG_WRITE_SEQ: { uint8_t *ptr = (uint8_t *)arg_ptr; while (arg_val > 0) { - u8g_sw_spi_HAL_LPC1768_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], *ptr++); + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], *ptr++); arg_val--; } } @@ -191,7 +191,7 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, case U8G_COM_MSG_WRITE_SEQ_P: { uint8_t *ptr = (uint8_t *)arg_ptr; while (arg_val > 0) { - u8g_sw_spi_HAL_LPC1768_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], u8g_pgm_read(ptr)); + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], u8g_pgm_read(ptr)); ptr++; arg_val--; } diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h index 2a50eddcd407..63701ca334ed 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h @@ -21,22 +21,14 @@ */ #pragma once +/** + * Native/Simulator LCD-specific defines + */ + void usleep(uint64_t microsec); -// The following are optional depending on the platform. -// definitions of HAL specific com and device drivers. uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); -// connect U8g com generic com names to the desired driver -#define U8G_COM_SW_SPI u8g_com_sw_spi_fn -#define U8G_COM_ST7920_SW_SPI u8g_com_ST7920_sw_spi_fn - -// let these default for now -#define U8G_COM_HW_SPI u8g_com_null_fn -#define U8G_COM_ST7920_HW_SPI u8g_com_null_fn -#define U8G_COM_SSD_I2C u8g_com_null_fn -#define U8G_COM_PARALLEL u8g_com_null_fn -#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 +#define U8G_COM_HAL_SW_SPI_FN u8g_com_sw_spi_fn +#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_ST7920_sw_spi_fn diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp index a3254774bfdf..46f2798afaa6 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp @@ -100,6 +100,7 @@ static void u8g_com_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) { swSpiTransfer(val & 0x0F0, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); swSpiTransfer(val << 4, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); } + #ifdef __cplusplus extern "C" { #endif @@ -128,7 +129,7 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void break; case U8G_COM_MSG_RESET: - if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val); + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val); break; case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ @@ -163,6 +164,7 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void } return 1; } + #ifdef __cplusplus } #endif diff --git a/Marlin/src/HAL/SAMD21/u8g/LCD_defines.h b/Marlin/src/HAL/SAMD21/u8g/LCD_defines.h index fa98725d2262..d6fe93117bd7 100644 --- a/Marlin/src/HAL/SAMD21/u8g/LCD_defines.h +++ b/Marlin/src/HAL/SAMD21/u8g/LCD_defines.h @@ -19,23 +19,11 @@ * along with this program. If not, see . * */ - -/** - * SAMD21 HAL developed by Bart Meijer (brupje) - * Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician) - */ #pragma once /** * SAMD21 LCD-specific defines */ -// The following are optional depending on the platform. - -// definitions of HAL specific com and device drivers. -uint8_t u8g_com_samd21_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - -// connect U8g com generic com names to the desired driver -#define U8G_COM_HW_SPI u8g_com_samd21_st7920_hw_spi_fn // use SAMD21 specific hardware SPI routine -#define U8G_COM_ST7920_HW_SPI u8g_com_samd21_st7920_hw_spi_fn +#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_samd21_st7920_hw_spi_fn diff --git a/Marlin/src/HAL/SAMD51/u8g/LCD_defines.h b/Marlin/src/HAL/SAMD51/u8g/LCD_defines.h new file mode 100644 index 000000000000..658a2c0fc1c5 --- /dev/null +++ b/Marlin/src/HAL/SAMD51/u8g/LCD_defines.h @@ -0,0 +1,29 @@ +/** + * 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 + +/** + * SAMD51 LCD-specific defines + */ + +#define U8G_COM_HAL_HW_SPI_FN u8g_com_samd51_hw_spi_fn // See U8glib-HAL +#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_samd51_st7920_hw_spi_fn // See U8glib-HAL diff --git a/Marlin/src/HAL/STM32/u8g/LCD_defines.h b/Marlin/src/HAL/STM32/u8g/LCD_defines.h new file mode 100644 index 000000000000..35f1674d69dc --- /dev/null +++ b/Marlin/src/HAL/STM32/u8g/LCD_defines.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 + +/** + * STM32 LCD-specific defines + */ + +uint8_t u8g_com_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL +uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL + +#define U8G_COM_HAL_SW_SPI_FN u8g_com_std_sw_spi_fn +#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn diff --git a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp index c57350aa2efd..fc421897c4ec 100644 --- a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp +++ b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp @@ -88,7 +88,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c return b; } -static void u8g_sw_spi_HAL_STM32F1_shift_out(uint8_t val) { +static void u8g_sw_spi_shift_out(uint8_t val) { #if ENABLED(FYSETC_MINI_12864) swSpiTransfer_mode_3(val, SPI_speed); #else @@ -139,13 +139,13 @@ uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, break; case U8G_COM_MSG_WRITE_BYTE: - u8g_sw_spi_HAL_STM32F1_shift_out(arg_val); + u8g_sw_spi_shift_out(arg_val); break; case U8G_COM_MSG_WRITE_SEQ: { uint8_t *ptr = (uint8_t *)arg_ptr; while (arg_val > 0) { - u8g_sw_spi_HAL_STM32F1_shift_out(*ptr++); + u8g_sw_spi_shift_out(*ptr++); arg_val--; } } break; @@ -153,7 +153,7 @@ uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, case U8G_COM_MSG_WRITE_SEQ_P: { uint8_t *ptr = (uint8_t *)arg_ptr; while (arg_val > 0) { - u8g_sw_spi_HAL_STM32F1_shift_out(u8g_pgm_read(ptr)); + u8g_sw_spi_shift_out(u8g_pgm_read(ptr)); ptr++; arg_val--; } diff --git a/Marlin/src/HAL/STM32F1/u8g/LCD_defines.h b/Marlin/src/HAL/STM32F1/u8g/LCD_defines.h new file mode 100644 index 000000000000..4bd461cb39d2 --- /dev/null +++ b/Marlin/src/HAL/STM32F1/u8g/LCD_defines.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 + +/** + * STM32F1 (Maple) LCD-specific defines + */ + +uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL + +#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn +#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn // See U8glib-HAL +#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn // See U8glib-HAL +#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn // See U8glib-HAL diff --git a/Marlin/src/HAL/TEENSY31_32/u8g/LCD_defines.h b/Marlin/src/HAL/TEENSY31_32/u8g/LCD_defines.h new file mode 100644 index 000000000000..a13e7e837f25 --- /dev/null +++ b/Marlin/src/HAL/TEENSY31_32/u8g/LCD_defines.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 + +/** + * Teensy 3.1/3.2 LCD-specific defines + */ diff --git a/Marlin/src/HAL/TEENSY35_36/u8g/LCD_defines.h b/Marlin/src/HAL/TEENSY35_36/u8g/LCD_defines.h new file mode 100644 index 000000000000..511085781cca --- /dev/null +++ b/Marlin/src/HAL/TEENSY35_36/u8g/LCD_defines.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 + +/** + * Teensy 3.5/3.6 LCD-specific defines + */ diff --git a/Marlin/src/HAL/TEENSY40_41/u8g/LCD_defines.h b/Marlin/src/HAL/TEENSY40_41/u8g/LCD_defines.h new file mode 100644 index 000000000000..349f8c039913 --- /dev/null +++ b/Marlin/src/HAL/TEENSY40_41/u8g/LCD_defines.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 + +/** + * Teensy 4.0/4.1 LCD-specific defines + */ diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index 6df641315895..a70e2b7b8b66 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -21,117 +21,35 @@ */ #pragma once -// Use this file to select the com driver for device drivers that are NOT in the U8G library +/** + * Assign custom or standard U8G device drivers + */ #include -#ifndef U8G_HAL_LINKS // Defined by LPC1768/9 environments in platform.ini - - #ifdef __SAM3X8E__ - - uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn - #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_DUE_shared_hw_spi_fn - #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_DUE_ST7920_sw_spi_fn - - #elif defined(__SAMD51__) - - #define U8G_COM_HAL_HW_SPI_FN u8g_com_samd51_hw_spi_fn - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_samd51_st7920_hw_spi_fn - - #elif defined(__SAMD21__) - - uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_samd21_st7920_hw_spi_fn - - #elif defined(__STM32F1__) - - uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn - #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn - #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn - - #elif defined(ARDUINO_ARCH_STM32) - - uint8_t u8g_com_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_std_sw_spi_fn - #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn - - #elif defined(ESP32) +#include HAL_PATH(../.., u8g/LCD_defines.h) - uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_HW_SPI_FN u8g_eps_hw_spi_fn - - #elif defined(__AVR__) - - uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn - - #endif - - #ifndef U8G_COM_HAL_SW_SPI_FN - #define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn - #endif - #ifndef U8G_COM_HAL_HW_SPI_FN - #define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn - #endif - #ifndef U8G_COM_ST7920_HAL_SW_SPI - #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn - #endif - #ifndef U8G_COM_ST7920_HAL_HW_SPI - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn - #endif - - // This can't be invoked from the current platformio.ini - #ifdef TARGET_LPC1768 - uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #endif - - #define U8G_COM_SSD_I2C_HAL u8g_com_arduino_ssd_i2c_fn - -#elif defined(TARGET_LPC1768) - - uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn - #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_LPC1768_hw_spi_fn - #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_LPC1768_ST7920_sw_spi_fn - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn - #define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn - -#elif defined(__PLAT_NATIVE_SIM__) - uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_sw_spi_fn - #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_ST7920_sw_spi_fn +#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT + uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #define U8G_COM_HAL_TFT_FN u8g_com_hal_tft_fn #endif +// U8G_HAL_LINKS is defined for LPC1768/9 and Native envs by -DU8G_HAL_LINKS in platform.ini #ifndef U8G_COM_HAL_SW_SPI_FN - #define U8G_COM_HAL_SW_SPI_FN u8g_com_null_fn + #define U8G_COM_HAL_SW_SPI_FN TERN(U8G_HAL_LINKS, u8g_com_null_fn, u8g_com_arduino_std_sw_spi_fn) #endif #ifndef U8G_COM_HAL_HW_SPI_FN - #define U8G_COM_HAL_HW_SPI_FN u8g_com_null_fn + #define U8G_COM_HAL_HW_SPI_FN TERN(U8G_HAL_LINKS, u8g_com_null_fn, u8g_com_arduino_hw_spi_fn) #endif #ifndef U8G_COM_ST7920_HAL_SW_SPI - #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_null_fn + #define U8G_COM_ST7920_HAL_SW_SPI TERN(U8G_HAL_LINKS, u8g_com_null_fn, u8g_com_arduino_st7920_spi_fn) #endif #ifndef U8G_COM_ST7920_HAL_HW_SPI - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_null_fn + #define U8G_COM_ST7920_HAL_HW_SPI TERN(U8G_HAL_LINKS, u8g_com_null_fn, u8g_com_arduino_st7920_hw_spi_fn) #endif #ifndef U8G_COM_SSD_I2C_HAL - #define U8G_COM_SSD_I2C_HAL u8g_com_null_fn + #define U8G_COM_SSD_I2C_HAL TERN(U8G_HAL_LINKS, u8g_com_null_fn, u8g_com_arduino_ssd_i2c_fn) #endif -#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT - uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_TFT_FN u8g_com_hal_tft_fn -#else - #define U8G_COM_HAL_TFT_FN u8g_com_null_fn +#ifndef U8G_COM_HAL_TFT_FN + #define U8G_COM_HAL_TFT_FN u8g_com_null_fn #endif diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index e844eee25183..11cd7b14ba55 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -20,12 +20,12 @@ * */ -// NOTE - the HAL version of the rrd device uses a generic ST7920 device. See the -// file u8g_dev_st7920_128x64_HAL.cpp for the HAL version. +// NOTE - the HAL version of the rrd device uses a generic ST7920 device. +// See u8g_dev_st7920_128x64_HAL.cpp for the HAL version. #include "../../inc/MarlinConfigPre.h" -#if !defined(U8G_HAL_LINKS) && ANY(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32) +#if ANY(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32) #include "../../inc/MarlinConfig.h" @@ -193,4 +193,4 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_rrd_st7920_128x64_fn, &u8 #endif #endif // IS_U8GLIB_ST7920 -#endif // !U8G_HAL_LINKS && (__AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32) +#endif // __AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32 From 38406634107fe90c4be452858d17eed541129b09 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 27 Dec 2023 00:28:24 +0000 Subject: [PATCH 046/236] [cron] Bump distribution date (2023-12-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 2d207e80dc8c..3694a91972c5 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-12-26" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 7f25f5fe3ad5..cef0c4cd8fb8 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-12-26" + #define STRING_DISTRIBUTION_DATE "2023-12-27" #endif /** From 858954baad45b0edb31429a2b50a5fff9c4067fe Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Dec 2023 00:13:26 -0600 Subject: [PATCH 047/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Upd?= =?UTF-8?q?ate=20Uncrustify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/bin/uncrust | 3 +- .../share/extras/{header.h => file_header.h} | 2 +- buildroot/share/extras/func_header.h | 5 + buildroot/share/extras/uncrustify.cfg | 3723 ++++++++++++++++- 4 files changed, 3649 insertions(+), 84 deletions(-) rename buildroot/share/extras/{header.h => file_header.h} (92%) create mode 100644 buildroot/share/extras/func_header.h diff --git a/buildroot/bin/uncrust b/buildroot/bin/uncrust index 7898f73c8c77..7c894174b8b5 100755 --- a/buildroot/bin/uncrust +++ b/buildroot/bin/uncrust @@ -4,9 +4,10 @@ # TMPDIR=`mktemp -d` +HERE=`dirname "$0"` # Reformat a single file to tmp/ -if uncrustify -l CPP -c ./buildroot/share/extras/uncrustify.cfg -f "$1" >$TMPDIR/uncrustify.out ; then +if uncrustify -l CPP -c "$HERE/../share/extras/uncrustify.cfg" -f "$1" >$TMPDIR/uncrustify.out ; then cp "$TMPDIR/uncrustify.out" "$1" ; # Replace the original file else echo "Something went wrong with uncrustify." diff --git a/buildroot/share/extras/header.h b/buildroot/share/extras/file_header.h similarity index 92% rename from buildroot/share/extras/header.h rename to buildroot/share/extras/file_header.h index e40471dface9..0c868aebb36f 100644 --- a/buildroot/share/extras/header.h +++ b/buildroot/share/extras/file_header.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm diff --git a/buildroot/share/extras/func_header.h b/buildroot/share/extras/func_header.h new file mode 100644 index 000000000000..bc1eff10d573 --- /dev/null +++ b/buildroot/share/extras/func_header.h @@ -0,0 +1,5 @@ +/** + * $(function) : Description pending + * + * $(javaparam) + */ diff --git a/buildroot/share/extras/uncrustify.cfg b/buildroot/share/extras/uncrustify.cfg index 82044f8c7b9a..f332d2daf416 100644 --- a/buildroot/share/extras/uncrustify.cfg +++ b/buildroot/share/extras/uncrustify.cfg @@ -1,84 +1,3643 @@ # # Uncrustify Configuration File -# File Created With UncrustifyX 0.4.3 (252) -# -align_assign_span = 1 -cmt_cpp_to_c = false -cmt_indent_multi = false -cmt_insert_file_header = "./header.h" -cmt_reflow_mode = 1 -cmt_sp_after_star_cont = 1 -cmt_sp_before_star_cont = 1 -cmt_star_cont = true -eat_blanks_after_open_brace = false -eat_blanks_before_close_brace = false -indent_align_assign = false -indent_case_brace = 0 -indent_columns = 2 -indent_cpp_lambda_body = false -indent_func_call_param = true -indent_func_def_param = true -indent_switch_case = 2 -indent_with_tabs = 0 -input_tab_size = 2 -mod_add_long_ifdef_else_comment = 40 -mod_add_long_ifdef_endif_comment = 40 -mod_full_brace_do = false -mod_full_brace_for = false -mod_full_brace_if = false -mod_full_brace_if_chain = 1 -mod_full_brace_while = false -mod_remove_extra_semicolon = true -newlines = lf -nl_after_brace_close = true -nl_after_brace_open = true -nl_assign_leave_one_liners = true -nl_brace_else = add -nl_class_leave_one_liners = true -nl_create_for_one_liner = true -nl_create_if_one_liner = false -nl_create_while_one_liner = true -nl_else_brace = remove -nl_end_of_file = add -nl_enum_brace = remove -nl_enum_leave_one_liners = true -nl_fdef_brace = remove -nl_for_brace = remove -nl_func_leave_one_liners = true -nl_getset_leave_one_liners = true -nl_if_brace = remove -nl_if_leave_one_liners = true -nl_multi_line_sparen_close = add -nl_squeeze_ifdef = false -nl_struct_brace = remove -nl_switch_brace = remove -nl_union_brace = remove -pp_define_at_level = true -pp_if_indent_code = true -pp_indent = add -pp_indent_at_level = true -pp_indent_count = 2 -pp_indent_if = 0 -sp_after_comma = add -sp_after_semi = add -sp_after_sparen = add -sp_arith = add -sp_assign = add -sp_assign_default = remove -sp_before_comma = remove -sp_before_sparen = add -sp_bool = add -sp_brace_else = add -sp_cmt_cpp_start = add -sp_compare = add -sp_cond_colon = add -sp_cond_question = add -sp_else_brace = add -sp_endif_cmt = true -sp_fparen_brace = add -sp_func_call_paren = remove -sp_func_proto_paren = remove -sp_inside_sparen = remove -sp_inside_square = remove -sp_paren_brace = add -sp_paren_paren = remove +# Created with Uncrustify 0.77.1_f +# + +# +# General options +# + +# The type of line endings. +# +# Default: auto +newlines = lf # lf/crlf/cr/auto + +# The original size of tabs in the input. +# +# Default: 8 +input_tab_size = 2 # unsigned number + +# The size of tabs in the output (only used if align_with_tabs=true). +# +# Default: 8 +output_tab_size = 8 # unsigned number + +# The ASCII value of the string escape char, usually 92 (\) or (Pawn) 94 (^). +# +# Default: 92 +string_escape_char = 92 # unsigned number + +# Alternate string escape char (usually only used for Pawn). +# Only works right before the quote char. +string_escape_char2 = 0 # unsigned number + +# Replace tab characters found in string literals with the escape sequence \t +# instead. +string_replace_tab_chars = false # true/false + +# Allow interpreting '>=' and '>>=' as part of a template in code like +# 'void f(list>=val);'. If true, 'assert(x<0 && y>=3)' will be broken. +# Improvements to template detection may make this option obsolete. +tok_split_gte = false # true/false + +# Disable formatting of NL_CONT ('\\n') ended lines (e.g. multi-line macros). +disable_processing_nl_cont = false # true/false + +# Specify the marker used in comments to disable processing of part of the +# file. +# +# Default: *INDENT-OFF* +disable_processing_cmt = " *INDENT-OFF*" # string + +# Specify the marker used in comments to (re)enable processing in a file. +# +# Default: *INDENT-ON* +enable_processing_cmt = " *INDENT-ON*" # string + +# Enable parsing of digraphs. +enable_digraphs = false # true/false + +# Option to allow both disable_processing_cmt and enable_processing_cmt +# strings, if specified, to be interpreted as ECMAScript regular expressions. +# If true, a regex search will be performed within comments according to the +# specified patterns in order to disable/enable processing. +processing_cmt_as_regex = false # true/false + +# Add or remove the UTF-8 BOM (recommend 'remove'). +utf8_bom = ignore # ignore/add/remove/force/not_defined + +# If the file contains bytes with values between 128 and 255, but is not +# UTF-8, then output as UTF-8. +utf8_byte = false # true/false + +# Force the output encoding to UTF-8. +utf8_force = false # true/false + +# +# Spacing options +# + +# Add or remove space around non-assignment symbolic operators ('+', '/', '%', +# '<<', and so forth). +sp_arith = add # ignore/add/remove/force/not_defined + +# Add or remove space around arithmetic operators '+' and '-'. +# +# Overrides sp_arith. +sp_arith_additive = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around assignment operator '=', '+=', etc. +sp_assign = add # ignore/add/remove/force/not_defined + +# Add or remove space around '=' in C++11 lambda capture specifications. +# +# Overrides sp_assign. +sp_cpp_lambda_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the capture specification of a C++11 lambda when +# an argument list is present, as in '[] (int x){ ... }'. +sp_cpp_lambda_square_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the capture specification of a C++11 lambda with +# no argument list is present, as in '[] { ... }'. +sp_cpp_lambda_square_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the opening parenthesis and before the closing +# parenthesis of a argument list of a C++11 lambda, as in +# '[]( int x ){ ... }'. +sp_cpp_lambda_argument_list = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the argument list of a C++11 lambda, as in +# '[](int x) { ... }'. +sp_cpp_lambda_paren_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a lambda body and its call operator of an +# immediately invoked lambda, as in '[]( ... ){ ... } ( ... )'. +sp_cpp_lambda_fparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around assignment operator '=' in a prototype. +# +# If set to ignore, use sp_assign. +sp_assign_default = remove # ignore/add/remove/force/not_defined + +# Add or remove space before assignment operator '=', '+=', etc. +# +# Overrides sp_assign. +sp_before_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after assignment operator '=', '+=', etc. +# +# Overrides sp_assign. +sp_after_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove space in 'enum {'. +# +# Default: add +sp_enum_brace = add # ignore/add/remove/force/not_defined + +# Add or remove space in 'NS_ENUM ('. +sp_enum_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around assignment '=' in enum. +sp_enum_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before assignment '=' in enum. +# +# Overrides sp_enum_assign. +sp_enum_before_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after assignment '=' in enum. +# +# Overrides sp_enum_assign. +sp_enum_after_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around assignment ':' in enum. +sp_enum_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around preprocessor '##' concatenation operator. +# +# Default: add +sp_pp_concat = add # ignore/add/remove/force/not_defined + +# Add or remove space after preprocessor '#' stringify operator. +# Also affects the '#@' charizing operator. +sp_pp_stringify = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before preprocessor '#' stringify operator +# as in '#define x(y) L#y'. +sp_before_pp_stringify = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around boolean operators '&&' and '||'. +sp_bool = add # ignore/add/remove/force/not_defined + +# Add or remove space around compare operator '<', '>', '==', etc. +sp_compare = add # ignore/add/remove/force/not_defined + +# Add or remove space inside '(' and ')'. +sp_inside_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between nested parentheses, i.e. '((' vs. ') )'. +sp_paren_paren = remove # ignore/add/remove/force/not_defined + +# Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. +sp_cparen_oparen = ignore # ignore/add/remove/force/not_defined + +# Whether to balance spaces inside nested parentheses. +sp_balance_nested_parens = false # true/false + +# Add or remove space between ')' and '{'. +sp_paren_brace = add # ignore/add/remove/force/not_defined + +# Add or remove space between nested braces, i.e. '{{' vs. '{ {'. +sp_brace_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before pointer star '*'. +sp_before_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before pointer star '*' that isn't followed by a +# variable name. If set to ignore, sp_before_ptr_star is used instead. +sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a qualifier and a pointer star '*' that isn't +# followed by a variable name, as in '(char const *)'. If set to ignore, +# sp_before_ptr_star is used instead. +sp_qualifier_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between pointer stars '*', as in 'int ***a;'. +sp_between_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after pointer star '*', if followed by a word. +# +# Overrides sp_type_func. +sp_after_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after pointer caret '^', if followed by a word. +sp_after_ptr_block_caret = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after pointer star '*', if followed by a qualifier. +sp_after_ptr_star_qualifier = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after a pointer star '*', if followed by a function +# prototype or function definition. +# +# Overrides sp_after_ptr_star and sp_type_func. +sp_after_ptr_star_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after a pointer star '*' in the trailing return of a +# function prototype or function definition. +sp_after_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the pointer star '*' and the name of the variable +# in a function pointer definition. +sp_ptr_star_func_var = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the pointer star '*' and the name of the type +# in a function pointer type definition. +sp_ptr_star_func_type = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after a pointer star '*', if followed by an open +# parenthesis, as in 'void* (*)()'. +sp_ptr_star_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a pointer star '*', if followed by a function +# prototype or function definition. If set to ignore, sp_before_ptr_star is +# used instead. +sp_before_ptr_star_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a qualifier and a pointer star '*' followed by +# the name of the function in a function prototype or definition, as in +# 'char const *foo()`. If set to ignore, sp_before_ptr_star is used instead. +sp_qualifier_ptr_star_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a pointer star '*' in the trailing return of a +# function prototype or function definition. +sp_before_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a qualifier and a pointer star '*' in the +# trailing return of a function prototype or function definition, as in +# 'auto foo() -> char const *'. +sp_qualifier_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a reference sign '&'. +sp_before_byref = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a reference sign '&' that isn't followed by a +# variable name. If set to ignore, sp_before_byref is used instead. +sp_before_unnamed_byref = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after reference sign '&', if followed by a word. +# +# Overrides sp_type_func. +sp_after_byref = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after a reference sign '&', if followed by a function +# prototype or function definition. +# +# Overrides sp_after_byref and sp_type_func. +sp_after_byref_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a reference sign '&', if followed by a function +# prototype or function definition. +sp_before_byref_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after a reference sign '&', if followed by an open +# parenthesis, as in 'char& (*)()'. +sp_byref_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between type and word. In cases where total removal of +# whitespace would be a syntax error, a value of 'remove' is treated the same +# as 'force'. +# +# This also affects some other instances of space following a type that are +# not covered by other options; for example, between the return type and +# parenthesis of a function type template argument, between the type and +# parenthesis of an array parameter, or between 'decltype(...)' and the +# following word. +# +# Default: force +sp_after_type = force # ignore/add/remove/force/not_defined + +# Add or remove space between 'decltype(...)' and word, +# brace or function call. +sp_after_decltype = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space before the parenthesis in the D constructs +# 'template Foo(' and 'class Foo('. +sp_before_template_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'template' and '<'. +# If set to ignore, sp_before_angle is used. +sp_template_angle = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before '<'. +sp_before_angle = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside '<' and '>'. +sp_inside_angle = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside '<>'. +sp_inside_angle_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '>' and ':'. +sp_angle_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after '>'. +sp_after_angle = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '>' and '(' as found in 'new List(foo);'. +sp_angle_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '>' and '()' as found in 'new List();'. +sp_angle_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '>' and a word as in 'List m;' or +# 'template static ...'. +sp_angle_word = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '>' and '>' in '>>' (template stuff). +# +# Default: add +sp_angle_shift = add # ignore/add/remove/force/not_defined + +# (C++11) Permit removal of the space between '>>' in 'foo >'. Note +# that sp_angle_shift cannot remove the space without this option. +sp_permit_cpp11_shift = false # true/false + +# Add or remove space before '(' of control statements ('if', 'for', 'switch', +# 'while', etc.). +sp_before_sparen = add # ignore/add/remove/force/not_defined + +# Add or remove space inside '(' and ')' of control statements other than +# 'for'. +sp_inside_sparen = remove # ignore/add/remove/force/not_defined + +# Add or remove space after '(' of control statements other than 'for'. +# +# Overrides sp_inside_sparen. +sp_inside_sparen_open = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before ')' of control statements other than 'for'. +# +# Overrides sp_inside_sparen. +sp_inside_sparen_close = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside '(' and ')' of 'for' statements. +sp_inside_for = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after '(' of 'for' statements. +# +# Overrides sp_inside_for. +sp_inside_for_open = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before ')' of 'for' statements. +# +# Overrides sp_inside_for. +sp_inside_for_close = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '((' or '))' of control statements. +sp_sparen_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after ')' of control statements. +sp_after_sparen = add # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and '{' of control statements. +sp_sparen_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'do' and '{'. +sp_do_brace_open = force # ignore/add/remove/force/not_defined + +# Add or remove space between '}' and 'while'. +sp_brace_close_while = force # ignore/add/remove/force/not_defined + +# Add or remove space between 'while' and '('. Overrides sp_before_sparen. +sp_while_paren_open = force # ignore/add/remove/force/not_defined + +# (D) Add or remove space between 'invariant' and '('. +sp_invariant_paren = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space after the ')' in 'invariant (C) c'. +sp_after_invariant_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before empty statement ';' on 'if', 'for' and 'while'. +sp_special_semi = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before ';'. +# +# Default: remove +sp_before_semi = remove # ignore/add/remove/force/not_defined + +# Add or remove space before ';' in non-empty 'for' statements. +sp_before_semi_for = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a semicolon of an empty left part of a for +# statement, as in 'for ( ; ; )'. +sp_before_semi_for_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the semicolons of an empty middle part of a for +# statement, as in 'for ( ; ; )'. +sp_between_semi_for_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after ';', except when followed by a comment. +# +# Default: add +sp_after_semi = add # ignore/add/remove/force/not_defined + +# Add or remove space after ';' in non-empty 'for' statements. +# +# Default: force +sp_after_semi_for = force # ignore/add/remove/force/not_defined + +# Add or remove space after the final semicolon of an empty part of a for +# statement, as in 'for ( ; ; )'. +sp_after_semi_for_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before '[' (except '[]'). +sp_before_square = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before '[' for a variable definition. +# +# Default: remove +sp_before_vardef_square = remove # ignore/add/remove/force/not_defined + +# Add or remove space before '[' for asm block. +sp_before_square_asm_block = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before '[]'. +sp_before_squares = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before C++17 structured bindings. +sp_cpp_before_struct_binding = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside a non-empty '[' and ']'. +sp_inside_square = remove # ignore/add/remove/force/not_defined + +# Add or remove space inside '[]'. +sp_inside_square_empty = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and +# ']'. If set to ignore, sp_inside_square is used. +sp_inside_square_oc_array = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after ',', i.e. 'a,b' vs. 'a, b'. +sp_after_comma = add # ignore/add/remove/force/not_defined + +# Add or remove space before ',', i.e. 'a,b' vs. 'a ,b'. +# +# Default: remove +sp_before_comma = remove # ignore/add/remove/force/not_defined + +# (C#, Vala) Add or remove space between ',' and ']' in multidimensional array type +# like 'int[,,]'. +sp_after_mdatype_commas = ignore # ignore/add/remove/force/not_defined + +# (C#, Vala) Add or remove space between '[' and ',' in multidimensional array type +# like 'int[,,]'. +sp_before_mdatype_commas = ignore # ignore/add/remove/force/not_defined + +# (C#, Vala) Add or remove space between ',' in multidimensional array type +# like 'int[,,]'. +sp_between_mdatype_commas = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between an open parenthesis and comma, +# i.e. '(,' vs. '( ,'. +# +# Default: force +sp_paren_comma = force # ignore/add/remove/force/not_defined + +# Add or remove space between a type and ':'. +sp_type_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the variadic '...' when preceded by a +# non-punctuator. +# The value REMOVE will be overridden with FORCE +sp_after_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before the variadic '...' when preceded by a +# non-punctuator. +# The value REMOVE will be overridden with FORCE +sp_before_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a type and '...'. +sp_type_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a '*' and '...'. +sp_ptr_type_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and '...'. +sp_paren_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '&&' and '...'. +sp_byref_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and a qualifier such as 'const'. +sp_paren_qualifier = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and 'noexcept'. +sp_paren_noexcept = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after class ':'. +sp_after_class_colon = add # ignore/add/remove/force/not_defined + +# Add or remove space before class ':'. +sp_before_class_colon = add # ignore/add/remove/force/not_defined + +# Add or remove space after class constructor ':'. +# +# Default: add +sp_after_constr_colon = add # ignore/add/remove/force/not_defined + +# Add or remove space before class constructor ':'. +# +# Default: add +sp_before_constr_colon = add # ignore/add/remove/force/not_defined + +# Add or remove space before case ':'. +# +# Default: remove +sp_before_case_colon = remove # ignore/add/remove/force/not_defined + +# Add or remove space between 'operator' and operator sign. +sp_after_operator = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the operator symbol and the open parenthesis, as +# in 'operator ++('. +sp_after_operator_sym = ignore # ignore/add/remove/force/not_defined + +# Overrides sp_after_operator_sym when the operator has no arguments, as in +# 'operator *()'. +sp_after_operator_sym_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after C/D cast, i.e. 'cast(int)a' vs. 'cast(int) a' or +# '(int)a' vs. '(int) a'. +sp_after_cast = ignore # ignore/add/remove/force/not_defined + +# Add or remove spaces inside cast parentheses. +sp_inside_paren_cast = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the type and open parenthesis in a C++ cast, +# i.e. 'int(exp)' vs. 'int (exp)'. +sp_cpp_cast_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'sizeof' and '('. +sp_sizeof_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'sizeof' and '...'. +sp_sizeof_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'sizeof...' and '('. +sp_sizeof_ellipsis_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '...' and a parameter pack. +sp_ellipsis_parameter_pack = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a parameter pack and '...'. +sp_parameter_pack_ellipsis = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'decltype' and '('. +sp_decltype_paren = ignore # ignore/add/remove/force/not_defined + +# (Pawn) Add or remove space after the tag keyword. +sp_after_tag = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside enum '{' and '}'. +sp_inside_braces_enum = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside struct/union '{' and '}'. +sp_inside_braces_struct = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space inside Objective-C boxed dictionary '{' and '}' +sp_inside_braces_oc_dict = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after open brace in an unnamed temporary +# direct-list-initialization +# if statement is a brace_init_lst +# works only if sp_brace_brace is set to ignore. +sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before close brace in an unnamed temporary +# direct-list-initialization +# if statement is a brace_init_lst +# works only if sp_brace_brace is set to ignore. +sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside an unnamed temporary direct-list-initialization +# if statement is a brace_init_lst +# works only if sp_brace_brace is set to ignore +# works only if sp_before_type_brace_init_lst_close is set to ignore. +sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside '{' and '}'. +sp_inside_braces = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside '{}'. +sp_inside_braces_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around trailing return operator '->'. +sp_trailing_return = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between return type and function name. A minimum of 1 +# is forced except for pointer return types. +sp_type_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between type and open brace of an unnamed temporary +# direct-list-initialization. +sp_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between function name and '(' on function declaration. +sp_func_proto_paren = remove # ignore/add/remove/force/not_defined + +# Add or remove space between function name and '()' on function declaration +# without parameters. +sp_func_proto_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between function name and '(' with a typedef specifier. +sp_func_type_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between alias name and '(' of a non-pointer function type typedef. +sp_func_def_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between function name and '()' on function definition +# without parameters. +sp_func_def_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside empty function '()'. +# Overrides sp_after_angle unless use_sp_after_angle_always is set to true. +sp_inside_fparens = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside function '(' and ')'. +sp_inside_fparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside user functor '(' and ')'. +sp_func_call_user_inside_rparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside empty functor '()'. +# Overrides sp_after_angle unless use_sp_after_angle_always is set to true. +sp_inside_rparens = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside functor '(' and ')'. +sp_inside_rparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside the first parentheses in a function type, as in +# 'void (*x)(...)'. +sp_inside_tparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the ')' and '(' in a function type, as in +# 'void (*x)(...)'. +sp_after_tparen_close = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between ']' and '(' when part of a function call. +sp_square_fparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and '{' of function. +sp_fparen_brace = force # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and '{' of a function call in object +# initialization. +# +# Overrides sp_fparen_brace. +sp_fparen_brace_initializer = ignore # ignore/add/remove/force/not_defined + +# (Java) Add or remove space between ')' and '{{' of double brace initializer. +sp_fparen_dbrace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between function name and '(' on function calls. +sp_func_call_paren = remove # ignore/add/remove/force/not_defined + +# Add or remove space between function name and '()' on function calls without +# parameters. If set to ignore (the default), sp_func_call_paren is used. +sp_func_call_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between the user function name and '(' on function +# calls. You need to set a keyword to be a user function in the config file, +# like: +# set func_call_user tr _ i18n +sp_func_call_user_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside user function '(' and ')'. +sp_func_call_user_inside_fparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between nested parentheses with user functions, +# i.e. '((' vs. '( ('. +sp_func_call_user_paren_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a constructor/destructor and the open +# parenthesis. +sp_func_class_paren = remove # ignore/add/remove/force/not_defined + +# Add or remove space between a constructor without parameters or destructor +# and '()'. +sp_func_class_paren_empty = remove # ignore/add/remove/force/not_defined + +# Add or remove space after 'return'. +# +# Default: force +sp_return = force # ignore/add/remove/force/not_defined + +# Add or remove space between 'return' and '('. +sp_return_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'return' and '{'. +sp_return_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '__attribute__' and '('. +sp_attribute_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'defined' and '(' in '#if defined (FOO)'. +sp_defined_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'throw' and '(' in 'throw (something)'. +sp_throw_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'throw' and anything other than '(' as in +# '@throw [...];'. +sp_after_throw = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'catch' and '(' in 'catch (something) { }'. +# If set to ignore, sp_before_sparen is used. +sp_catch_paren = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@catch' and '(' +# in '@catch (something) { }'. If set to ignore, sp_catch_paren is used. +sp_oc_catch_paren = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before Objective-C protocol list +# as in '@protocol Protocol' or '@interface MyClass : NSObject'. +sp_before_oc_proto_list = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between class name and '(' +# in '@interface className(categoryName):BaseClass' +sp_oc_classname_paren = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space between 'version' and '(' +# in 'version (something) { }'. If set to ignore, sp_before_sparen is used. +sp_version_paren = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space between 'scope' and '(' +# in 'scope (something) { }'. If set to ignore, sp_before_sparen is used. +sp_scope_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'super' and '(' in 'super (something)'. +# +# Default: remove +sp_super_paren = remove # ignore/add/remove/force/not_defined + +# Add or remove space between 'this' and '(' in 'this (something)'. +# +# Default: remove +sp_this_paren = remove # ignore/add/remove/force/not_defined + +# Add or remove space between a macro name and its definition. +sp_macro = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a macro function ')' and its definition. +sp_macro_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'else' and '{' if on the same line. +sp_else_brace = add # ignore/add/remove/force/not_defined + +# Add or remove space between '}' and 'else' if on the same line. +sp_brace_else = force # ignore/add/remove/force/not_defined + +# Add or remove space between '}' and the name of a typedef on the same line. +sp_brace_typedef = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before the '{' of a 'catch' statement, if the '{' and +# 'catch' are on the same line, as in 'catch (decl) {'. +sp_catch_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before the '{' of a '@catch' statement, if the '{' +# and '@catch' are on the same line, as in '@catch (decl) {'. +# If set to ignore, sp_catch_brace is used. +sp_oc_catch_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '}' and 'catch' if on the same line. +sp_brace_catch = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '}' and '@catch' if on the same line. +# If set to ignore, sp_brace_catch is used. +sp_oc_brace_catch = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'finally' and '{' if on the same line. +sp_finally_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between '}' and 'finally' if on the same line. +sp_brace_finally = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'try' and '{' if on the same line. +sp_try_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between get/set and '{' if on the same line. +sp_getset_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a variable and '{' for C++ uniform +# initialization. +sp_word_brace_init_lst = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between a variable and '{' for a namespace. +# +# Default: add +sp_word_brace_ns = add # ignore/add/remove/force/not_defined + +# Add or remove space before the '::' operator. +sp_before_dc = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the '::' operator. +sp_after_dc = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove around the D named array initializer ':' operator. +sp_d_array_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the '!' (not) unary operator. +# +# Default: remove +sp_not = remove # ignore/add/remove/force/not_defined + +# Add or remove space between two '!' (not) unary operators. +# If set to ignore, sp_not will be used. +sp_not_not = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the '~' (invert) unary operator. +# +# Default: remove +sp_inv = remove # ignore/add/remove/force/not_defined + +# Add or remove space after the '&' (address-of) unary operator. This does not +# affect the spacing after a '&' that is part of a type. +# +# Default: remove +sp_addr = remove # ignore/add/remove/force/not_defined + +# Add or remove space around the '.' or '->' operators. +# +# Default: remove +sp_member = remove # ignore/add/remove/force/not_defined + +# Add or remove space after the '*' (dereference) unary operator. This does +# not affect the spacing after a '*' that is part of a type. +# +# Default: remove +sp_deref = remove # ignore/add/remove/force/not_defined + +# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. +# +# Default: remove +sp_sign = remove # ignore/add/remove/force/not_defined + +# Add or remove space between '++' and '--' the word to which it is being +# applied, as in '(--x)' or 'y++;'. +# +# Default: remove +sp_incdec = remove # ignore/add/remove/force/not_defined + +# Add or remove space before a backslash-newline at the end of a line. +# +# Default: add +sp_before_nl_cont = add # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the scope '+' or '-', as in '-(void) foo;' +# or '+(int) bar;'. +sp_after_oc_scope = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the colon in message specs, +# i.e. '-(int) f:(int) x;' vs. '-(int) f: (int) x;'. +sp_after_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before the colon in message specs, +# i.e. '-(int) f: (int) x;' vs. '-(int) f : (int) x;'. +sp_before_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};'. +sp_after_oc_dict_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};'. +sp_before_oc_dict_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the colon in message specs, +# i.e. '[object setValue:1];' vs. '[object setValue: 1];'. +sp_after_send_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before the colon in message specs, +# i.e. '[object setValue:1];' vs. '[object setValue :1];'. +sp_before_send_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the (type) in message specs, +# i.e. '-(int)f: (int) x;' vs. '-(int)f: (int)x;'. +sp_after_oc_type = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the first (type) in message specs, +# i.e. '-(int) f:(int)x;' vs. '-(int)f:(int)x;'. +sp_after_oc_return_type = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@selector' and '(', +# i.e. '@selector(msgName)' vs. '@selector (msgName)'. +# Also applies to '@protocol()' constructs. +sp_after_oc_at_sel = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@selector(x)' and the following word, +# i.e. '@selector(foo) a:' vs. '@selector(foo)a:'. +sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space inside '@selector' parentheses, +# i.e. '@selector(foo)' vs. '@selector( foo )'. +# Also applies to '@protocol()' constructs. +sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before a block pointer caret, +# i.e. '^int (int arg){...}' vs. ' ^int (int arg){...}'. +sp_before_oc_block_caret = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after a block pointer caret, +# i.e. '^int (int arg){...}' vs. '^ int (int arg){...}'. +sp_after_oc_block_caret = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between the receiver and selector in a message, +# as in '[receiver selector ...]'. +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after '@property'. +sp_after_oc_property = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@synchronized' and the open parenthesis, +# i.e. '@synchronized(foo)' vs. '@synchronized (foo)'. +sp_after_oc_synchronized = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around the ':' in 'b ? t : f'. +sp_cond_colon = add # ignore/add/remove/force/not_defined + +# Add or remove space before the ':' in 'b ? t : f'. +# +# Overrides sp_cond_colon. +sp_cond_colon_before = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the ':' in 'b ? t : f'. +# +# Overrides sp_cond_colon. +sp_cond_colon_after = ignore # ignore/add/remove/force/not_defined + +# Add or remove space around the '?' in 'b ? t : f'. +sp_cond_question = add # ignore/add/remove/force/not_defined + +# Add or remove space before the '?' in 'b ? t : f'. +# +# Overrides sp_cond_question. +sp_cond_question_before = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the '?' in 'b ? t : f'. +# +# Overrides sp_cond_question. +sp_cond_question_after = ignore # ignore/add/remove/force/not_defined + +# In the abbreviated ternary form '(a ?: b)', add or remove space between '?' +# and ':'. +# +# Overrides all other sp_cond_* options. +sp_cond_ternary_short = ignore # ignore/add/remove/force/not_defined + +# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make +# sense here. +sp_case_label = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space around the D '..' operator. +sp_range = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after ':' in a Java/C++11 range-based 'for', +# as in 'for (Type var : expr)'. +sp_after_for_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before ':' in a Java/C++11 range-based 'for', +# as in 'for (Type var : expr)'. +sp_before_for_colon = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space between 'extern' and '(' as in 'extern (C)'. +sp_extern_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the opening of a C++ comment, as in '// A'. +sp_cmt_cpp_start = add # ignore/add/remove/force/not_defined + +# remove space after the '//' and the pvs command '-V1234', +# only works with sp_cmt_cpp_start set to add or force. +sp_cmt_cpp_pvs = false # true/false + +# remove space after the '//' and the command 'lint', +# only works with sp_cmt_cpp_start set to add or force. +sp_cmt_cpp_lint = false # true/false + +# Add or remove space in a C++ region marker comment, as in '// BEGIN'. +# A region marker is defined as a comment which is not preceded by other text +# (i.e. the comment is the first non-whitespace on the line), and which starts +# with either 'BEGIN' or 'END'. +# +# Overrides sp_cmt_cpp_start. +sp_cmt_cpp_region = ignore # ignore/add/remove/force/not_defined + +# If true, space added with sp_cmt_cpp_start will be added after Doxygen +# sequences like '///', '///<', '//!' and '//!<'. +sp_cmt_cpp_doxygen = force # true/false + +# If true, space added with sp_cmt_cpp_start will be added after Qt translator +# or meta-data comments like '//:', '//=', and '//~'. +sp_cmt_cpp_qttr = false # true/false + +# Add or remove space between #else or #endif and a trailing comment. +sp_endif_cmt = add # ignore/add/remove/force/not_defined + +# Add or remove space after 'new', 'delete' and 'delete[]'. +sp_after_new = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between 'new' and '(' in 'new()'. +sp_between_new_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space between ')' and type in 'new(foo) BAR'. +sp_after_newop_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space inside parentheses of the new operator +# as in 'new(foo) BAR'. +sp_inside_newop_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the open parenthesis of the new operator, +# as in 'new(foo) BAR'. +# +# Overrides sp_inside_newop_paren. +sp_inside_newop_paren_open = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before the close parenthesis of the new operator, +# as in 'new(foo) BAR'. +# +# Overrides sp_inside_newop_paren. +sp_inside_newop_paren_close = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before a trailing comment. +sp_before_tr_cmt = ignore # ignore/add/remove/force/not_defined + +# Number of spaces before a trailing comment. +sp_num_before_tr_cmt = 0 # unsigned number + +# Add or remove space before an embedded comment. +# +# Default: force +sp_before_emb_cmt = force # ignore/add/remove/force/not_defined + +# Number of spaces before an embedded comment. +# +# Default: 1 +sp_num_before_emb_cmt = 1 # unsigned number + +# Add or remove space after an embedded comment. +# +# Default: force +sp_after_emb_cmt = force # ignore/add/remove/force/not_defined + +# Number of spaces after an embedded comment. +# +# Default: 1 +sp_num_after_emb_cmt = 1 # unsigned number + +# (Java) Add or remove space between an annotation and the open parenthesis. +sp_annotation_paren = ignore # ignore/add/remove/force/not_defined + +# If true, vbrace tokens are dropped to the previous token and skipped. +sp_skip_vbrace_tokens = false # true/false + +# Add or remove space after 'noexcept'. +sp_after_noexcept = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after '_'. +sp_vala_after_translation = ignore # ignore/add/remove/force/not_defined + +# If true, a is inserted after #define. +force_tab_after_define = false # true/false + +# +# Indenting options +# + +# The number of columns to indent per level. Usually 2, 3, 4, or 8. +# +# Default: 8 +indent_columns = 2 # unsigned number + +# Whether to ignore indent for the first continuation line. Subsequent +# continuation lines will still be indented to match the first. +indent_ignore_first_continue = false # true/false + +# The continuation indent. If non-zero, this overrides the indent of '(', '[' +# and '=' continuation indents. Negative values are OK; negative value is +# absolute and not increased for each '(' or '[' level. +# +# For FreeBSD, this is set to 4. +# Requires indent_ignore_first_continue=false. +indent_continue = 0 # number + +# The continuation indent, only for class header line(s). If non-zero, this +# overrides the indent of 'class' continuation indents. +# Requires indent_ignore_first_continue=false. +indent_continue_class_head = 0 # unsigned number + +# Whether to indent empty lines (i.e. lines which contain only spaces before +# the newline character). +indent_single_newlines = false # true/false + +# The continuation indent for func_*_param if they are true. If non-zero, this +# overrides the indent. +indent_param = 0 # unsigned number + +# How to use tabs when indenting code. +# +# 0: Spaces only +# 1: Indent with tabs to brace level, align with spaces (default) +# 2: Indent and align with tabs, using spaces when not on a tabstop +# +# Default: 1 +indent_with_tabs = 0 # unsigned number + +# Whether to indent comments that are not at a brace level with tabs on a +# tabstop. Requires indent_with_tabs=2. If false, will use spaces. +indent_cmt_with_tabs = false # true/false + +# Whether to indent strings broken by '\' so that they line up. +indent_align_string = false # true/false + +# The number of spaces to indent multi-line XML strings. +# Requires indent_align_string=true. +indent_xml_string = 0 # unsigned number + +# Spaces to indent '{' from level. +indent_brace = 0 # unsigned number + +# Whether braces are indented to the body level. +indent_braces = false # true/false + +# Whether to disable indenting function braces if indent_braces=true. +indent_braces_no_func = false # true/false + +# Whether to disable indenting class braces if indent_braces=true. +indent_braces_no_class = false # true/false + +# Whether to disable indenting struct braces if indent_braces=true. +indent_braces_no_struct = false # true/false + +# Whether to indent based on the size of the brace parent, +# i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. +indent_brace_parent = false # true/false + +# Whether to indent based on the open parenthesis instead of the open brace +# in '({\n'. +indent_paren_open_brace = false # true/false + +# (C#) Whether to indent the brace of a C# delegate by another level. +indent_cs_delegate_brace = false # true/false + +# (C#) Whether to indent a C# delegate (to handle delegates with no brace) by +# another level. +indent_cs_delegate_body = false # true/false + +# Whether to indent the body of a 'namespace'. +indent_namespace = false # true/false + +# Whether to indent only the first namespace, and not any nested namespaces. +# Requires indent_namespace=true. +indent_namespace_single_indent = false # true/false + +# The number of spaces to indent a namespace block. +# If set to zero, use the value indent_columns +indent_namespace_level = 0 # unsigned number + +# If the body of the namespace is longer than this number, it won't be +# indented. Requires indent_namespace=true. 0 means no limit. +indent_namespace_limit = 0 # unsigned number + +# Whether to indent only in inner namespaces (nested in other namespaces). +# Requires indent_namespace=true. +indent_namespace_inner_only = false # true/false + +# Whether the 'extern "C"' body is indented. +indent_extern = false # true/false + +# Whether the 'class' body is indented. +indent_class = true # true/false + +# Whether to ignore indent for the leading base class colon. +indent_ignore_before_class_colon = false # true/false + +# Additional indent before the leading base class colon. +# Negative values decrease indent down to the first column. +# Requires indent_ignore_before_class_colon=false and a newline break before +# the colon (see pos_class_colon and nl_class_colon) +indent_before_class_colon = 0 # number + +# Whether to indent the stuff after a leading base class colon. +indent_class_colon = false # true/false + +# Whether to indent based on a class colon instead of the stuff after the +# colon. Requires indent_class_colon=true. +indent_class_on_colon = false # true/false + +# Whether to ignore indent for a leading class initializer colon. +indent_ignore_before_constr_colon = false # true/false + +# Whether to indent the stuff after a leading class initializer colon. +indent_constr_colon = false # true/false + +# Virtual indent from the ':' for leading member initializers. +# +# Default: 2 +indent_ctor_init_leading = 2 # unsigned number + +# Virtual indent from the ':' for following member initializers. +# +# Default: 2 +indent_ctor_init_following = 2 # unsigned number + +# Additional indent for constructor initializer list. +# Negative values decrease indent down to the first column. +indent_ctor_init = 0 # number + +# Whether to indent 'if' following 'else' as a new block under the 'else'. +# If false, 'else\nif' is treated as 'else if' for indenting purposes. +indent_else_if = false # true/false + +# Amount to indent variable declarations after a open brace. +# +# <0: Relative +# >=0: Absolute +indent_var_def_blk = 0 # number + +# Whether to indent continued variable declarations instead of aligning. +indent_var_def_cont = false # true/false + +# How to indent continued shift expressions ('<<' and '>>'). +# Set align_left_shift=false when using this. +# 0: Align shift operators instead of indenting them (default) +# 1: Indent by one level +# -1: Preserve original indentation +indent_shift = 0 # number + +# Whether to force indentation of function definitions to start in column 1. +indent_func_def_force_col1 = false # true/false + +# Whether to indent continued function call parameters one indent level, +# rather than aligning parameters under the open parenthesis. +indent_func_call_param = true # true/false + +# Whether to indent continued function definition parameters one indent level, +# rather than aligning parameters under the open parenthesis. +indent_func_def_param = true # true/false + +# for function definitions, only if indent_func_def_param is false +# Allows to align params when appropriate and indent them when not +# behave as if it was true if paren position is more than this value +# if paren position is more than the option value +indent_func_def_param_paren_pos_threshold = 0 # unsigned number + +# Whether to indent continued function call prototype one indent level, +# rather than aligning parameters under the open parenthesis. +indent_func_proto_param = false # true/false + +# Whether to indent continued function call declaration one indent level, +# rather than aligning parameters under the open parenthesis. +indent_func_class_param = false # true/false + +# Whether to indent continued class variable constructors one indent level, +# rather than aligning parameters under the open parenthesis. +indent_func_ctor_var_param = false # true/false + +# Whether to indent continued template parameter list one indent level, +# rather than aligning parameters under the open parenthesis. +indent_template_param = false # true/false + +# Double the indent for indent_func_xxx_param options. +# Use both values of the options indent_columns and indent_param. +indent_func_param_double = false # true/false + +# Indentation column for standalone 'const' qualifier on a function +# prototype. +indent_func_const = 0 # unsigned number + +# Indentation column for standalone 'throw' qualifier on a function +# prototype. +indent_func_throw = 0 # unsigned number + +# How to indent within a macro followed by a brace on the same line +# This allows reducing the indent in macros that have (for example) +# `do { ... } while (0)` blocks bracketing them. +# +# true: add an indent for the brace on the same line as the macro +# false: do not add an indent for the brace on the same line as the macro +# +# Default: true +indent_macro_brace = true # true/false + +# The number of spaces to indent a continued '->' or '.'. +# Usually set to 0, 1, or indent_columns. +indent_member = 0 # unsigned number + +# Whether lines broken at '.' or '->' should be indented by a single indent. +# The indent_member option will not be effective if this is set to true. +indent_member_single = false # true/false + +# Spaces to indent single line ('//') comments on lines before code. +indent_single_line_comments_before = 0 # unsigned number + +# Spaces to indent single line ('//') comments on lines after code. +indent_single_line_comments_after = 0 # unsigned number + +# When opening a paren for a control statement (if, for, while, etc), increase +# the indent level by this value. Negative values decrease the indent level. +indent_sparen_extra = 0 # number + +# Whether to indent trailing single line ('//') comments relative to the code +# instead of trying to keep the same absolute column. +indent_relative_single_line_comments = false # true/false + +# Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns. +# It might be wise to choose the same value for the option indent_case_brace. +indent_switch_case = 2 # unsigned number + +# Spaces to indent the body of a 'switch' before any 'case'. +# Usually the same as indent_columns or indent_switch_case. +indent_switch_body = 0 # unsigned number + +# Whether to ignore indent for '{' following 'case'. +indent_ignore_case_brace = false # true/false + +# Spaces to indent '{' from 'case'. By default, the brace will appear under +# the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK. +# It might be wise to choose the same value for the option indent_switch_case. +indent_case_brace = 0 # number + +# indent 'break' with 'case' from 'switch'. +indent_switch_break_with_case = false # true/false + +# Whether to indent preprocessor statements inside of switch statements. +# +# Default: true +indent_switch_pp = true # true/false + +# Spaces to shift the 'case' line, without affecting any other lines. +# Usually 0. +indent_case_shift = 0 # unsigned number + +# Whether to align comments before 'case' with the 'case'. +# +# Default: true +indent_case_comment = true # true/false + +# Whether to indent comments not found in first column. +# +# Default: true +indent_comment = true # true/false + +# Whether to indent comments found in first column. +indent_col1_comment = true # true/false + +# Whether to indent multi string literal in first column. +indent_col1_multi_string_literal = false # true/false + +# Align comments on adjacent lines that are this many columns apart or less. +# +# Default: 3 +indent_comment_align_thresh = 3 # unsigned number + +# Whether to ignore indent for goto labels. +indent_ignore_label = false # true/false + +# How to indent goto labels. Requires indent_ignore_label=false. +# +# >0: Absolute column where 1 is the leftmost column +# <=0: Subtract from brace indent +# +# Default: 1 +indent_label = 1 # number + +# How to indent access specifiers that are followed by a +# colon. +# +# >0: Absolute column where 1 is the leftmost column +# <=0: Subtract from brace indent +# +# Default: 1 +indent_access_spec = 1 # number + +# Whether to indent the code after an access specifier by one level. +# If true, this option forces 'indent_access_spec=0'. +indent_access_spec_body = false # true/false + +# If an open parenthesis is followed by a newline, whether to indent the next +# line so that it lines up after the open parenthesis (not recommended). +indent_paren_nl = false # true/false + +# How to indent a close parenthesis after a newline. +# +# 0: Indent to body level (default) +# 1: Align under the open parenthesis +# 2: Indent to the brace level +# -1: Preserve original indentation +indent_paren_close = 0 # number + +# Whether to indent the open parenthesis of a function definition, +# if the parenthesis is on its own line. +indent_paren_after_func_def = false # true/false + +# Whether to indent the open parenthesis of a function declaration, +# if the parenthesis is on its own line. +indent_paren_after_func_decl = false # true/false + +# Whether to indent the open parenthesis of a function call, +# if the parenthesis is on its own line. +indent_paren_after_func_call = false # true/false + +# How to indent a comma when inside braces. +# 0: Indent by one level (default) +# 1: Align under the open brace +# -1: Preserve original indentation +indent_comma_brace = 0 # number + +# How to indent a comma when inside parentheses. +# 0: Indent by one level (default) +# 1: Align under the open parenthesis +# -1: Preserve original indentation +indent_comma_paren = 0 # number + +# How to indent a Boolean operator when inside parentheses. +# 0: Indent by one level (default) +# 1: Align under the open parenthesis +# -1: Preserve original indentation +indent_bool_paren = 0 # number + +# Whether to ignore the indentation of a Boolean operator when outside +# parentheses. +indent_ignore_bool = false # true/false + +# Whether to ignore the indentation of an arithmetic operator. +indent_ignore_arith = false # true/false + +# Whether to indent a semicolon when inside a for parenthesis. +# If true, aligns under the open for parenthesis. +indent_semicolon_for_paren = false # true/false + +# Whether to ignore the indentation of a semicolon outside of a 'for' +# statement. +indent_ignore_semicolon = false # true/false + +# Whether to align the first expression to following ones +# if indent_bool_paren=1. +indent_first_bool_expr = false # true/false + +# Whether to align the first expression to following ones +# if indent_semicolon_for_paren=true. +indent_first_for_expr = false # true/false + +# If an open square is followed by a newline, whether to indent the next line +# so that it lines up after the open square (not recommended). +indent_square_nl = false # true/false + +# (ESQL/C) Whether to preserve the relative indent of 'EXEC SQL' bodies. +indent_preserve_sql = false # true/false + +# Whether to ignore the indentation of an assignment operator. +indent_ignore_assign = false # true/false + +# Whether to align continued statements at the '='. If false or if the '=' is +# followed by a newline, the next line is indent one tab. +# +# Default: true +indent_align_assign = false # true/false + +# If true, the indentation of the chunks after a '=' sequence will be set at +# LHS token indentation column before '='. +indent_off_after_assign = false # true/false + +# Whether to align continued statements at the '('. If false or the '(' is +# followed by a newline, the next line indent is one tab. +# +# Default: true +indent_align_paren = true # true/false + +# (OC) Whether to indent Objective-C code inside message selectors. +indent_oc_inside_msg_sel = false # true/false + +# (OC) Whether to indent Objective-C blocks at brace level instead of usual +# rules. +indent_oc_block = false # true/false + +# (OC) Indent for Objective-C blocks in a message relative to the parameter +# name. +# +# =0: Use indent_oc_block rules +# >0: Use specified number of spaces to indent +indent_oc_block_msg = 0 # unsigned number + +# (OC) Minimum indent for subsequent parameters +indent_oc_msg_colon = 0 # unsigned number + +# (OC) Whether to prioritize aligning with initial colon (and stripping spaces +# from lines, if necessary). +# +# Default: true +indent_oc_msg_prioritize_first_colon = true # true/false + +# (OC) Whether to indent blocks the way that Xcode does by default +# (from the keyword if the parameter is on its own line; otherwise, from the +# previous indentation level). Requires indent_oc_block_msg=true. +indent_oc_block_msg_xcode_style = false # true/false + +# (OC) Whether to indent blocks from where the brace is, relative to a +# message keyword. Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_keyword = false # true/false + +# (OC) Whether to indent blocks from where the brace is, relative to a message +# colon. Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_colon = false # true/false + +# (OC) Whether to indent blocks from where the block caret is. +# Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_caret = false # true/false + +# (OC) Whether to indent blocks from where the brace caret is. +# Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_brace = false # true/false + +# When indenting after virtual brace open and newline add further spaces to +# reach this minimum indent. +indent_min_vbrace_open = 0 # unsigned number + +# Whether to add further spaces after regular indent to reach next tabstop +# when indenting after virtual brace open and newline. +indent_vbrace_open_on_tabstop = false # true/false + +# How to indent after a brace followed by another token (not a newline). +# true: indent all contained lines to match the token +# false: indent all contained lines to match the brace +# +# Default: true +indent_token_after_brace = true # true/false + +# Whether to indent the body of a C++11 lambda. +indent_cpp_lambda_body = false # true/false + +# How to indent compound literals that are being returned. +# true: add both the indent from return & the compound literal open brace +# (i.e. 2 indent levels) +# false: only indent 1 level, don't add the indent for the open brace, only +# add the indent for the return. +# +# Default: true +indent_compound_literal_return = true # true/false + +# (C#) Whether to indent a 'using' block if no braces are used. +# +# Default: true +indent_using_block = true # true/false + +# How to indent the continuation of ternary operator. +# +# 0: Off (default) +# 1: When the `if_false` is a continuation, indent it under the `if_true` branch +# 2: When the `:` is a continuation, indent it under `?` +indent_ternary_operator = 0 # unsigned number + +# Whether to indent the statements inside ternary operator. +indent_inside_ternary_operator = false # true/false + +# If true, the indentation of the chunks after a `return` sequence will be set at return indentation column. +indent_off_after_return = false # true/false + +# If true, the indentation of the chunks after a `return new` sequence will be set at return indentation column. +indent_off_after_return_new = false # true/false + +# If true, the tokens after return are indented with regular single indentation. By default (false) the indentation is after the return token. +indent_single_after_return = false # true/false + +# Whether to ignore indent and alignment for 'asm' blocks (i.e. assume they +# have their own indentation). +indent_ignore_asm_block = false # true/false + +# Don't indent the close parenthesis of a function definition, +# if the parenthesis is on its own line. +donot_indent_func_def_close_paren = false # true/false + +# +# Newline adding and removing options +# + +# Whether to collapse empty blocks between '{' and '}' except for functions. +# Use nl_collapse_empty_body_functions to specify how empty function braces +# should be formatted. +nl_collapse_empty_body = false # true/false + +# Whether to collapse empty blocks between '{' and '}' for functions only. +# If true, overrides nl_inside_empty_func. +nl_collapse_empty_body_functions = false # true/false + +# Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'. +nl_assign_leave_one_liners = true # true/false + +# Don't split one-line braced statements inside a 'class xx { }' body. +nl_class_leave_one_liners = true # true/false + +# Don't split one-line enums, as in 'enum foo { BAR = 15 };' +nl_enum_leave_one_liners = true # true/false + +# Don't split one-line get or set functions. +nl_getset_leave_one_liners = true # true/false + +# (C#) Don't split one-line property get or set functions. +nl_cs_property_leave_one_liners = false # true/false + +# Don't split one-line function definitions, as in 'int foo() { return 0; }'. +# might modify nl_func_type_name +nl_func_leave_one_liners = true # true/false + +# Don't split one-line C++11 lambdas, as in '[]() { return 0; }'. +nl_cpp_lambda_leave_one_liners = false # true/false + +# Don't split one-line if/else statements, as in 'if(...) b++;'. +nl_if_leave_one_liners = true # true/false + +# Don't split one-line while statements, as in 'while(...) b++;'. +nl_while_leave_one_liners = false # true/false + +# Don't split one-line do statements, as in 'do { b++; } while(...);'. +nl_do_leave_one_liners = true # true/false + +# Don't split one-line for statements, as in 'for(...) b++;'. +nl_for_leave_one_liners = false # true/false + +# (OC) Don't split one-line Objective-C messages. +nl_oc_msg_leave_one_liner = false # true/false + +# (OC) Add or remove newline between method declaration and '{'. +nl_oc_mdef_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between Objective-C block signature and '{'. +nl_oc_block_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove blank line before '@interface' statement. +nl_oc_before_interface = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove blank line before '@implementation' statement. +nl_oc_before_implementation = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove blank line before '@end' statement. +nl_oc_before_end = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between '@interface' and '{'. +nl_oc_interface_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between '@implementation' and '{'. +nl_oc_implementation_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newlines at the start of the file. +nl_start_of_file = ignore # ignore/add/remove/force/not_defined + +# The minimum number of newlines at the start of the file (only used if +# nl_start_of_file is 'add' or 'force'). +nl_start_of_file_min = 0 # unsigned number + +# Add or remove newline at the end of the file. +nl_end_of_file = add # ignore/add/remove/force/not_defined + +# The minimum number of newlines at the end of the file (only used if +# nl_end_of_file is 'add' or 'force'). +nl_end_of_file_min = 0 # unsigned number + +# Add or remove newline between '=' and '{'. +nl_assign_brace = remove # ignore/add/remove/force/not_defined + +# (D) Add or remove newline between '=' and '['. +nl_assign_square = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between '[]' and '{'. +nl_tsquare_brace = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove newline after '= ['. Will also affect the newline before +# the ']'. +nl_after_square_assign = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between a function call's ')' and '{', as in +# 'list_for_each(item, &list) { }'. +nl_fcall_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'enum' and '{'. +nl_enum_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between 'enum' and 'class'. +nl_enum_class = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'enum class' and the identifier. +nl_enum_class_identifier = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'enum class' type and ':'. +nl_enum_identifier_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'enum class identifier :' and type. +nl_enum_colon_type = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'struct and '{'. +nl_struct_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between 'union' and '{'. +nl_union_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between 'if' and '{'. +nl_if_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between '}' and 'else'. +nl_brace_else = add # ignore/add/remove/force/not_defined + +# Add or remove newline between 'else if' and '{'. If set to ignore, +# nl_if_brace is used instead. +nl_elseif_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'else' and '{'. +nl_else_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between 'else' and 'if'. +nl_else_if = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline before '{' opening brace +nl_before_opening_brace_func_class_def = remove # ignore/add/remove/force/not_defined + +# Add or remove newline before 'if'/'else if' closing parenthesis. +nl_before_if_closing_paren = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between '}' and 'finally'. +nl_brace_finally = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'finally' and '{'. +nl_finally_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'try' and '{'. +nl_try_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between get/set and '{'. +nl_getset_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'for' and '{'. +nl_for_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline before the '{' of a 'catch' statement, as in +# 'catch (decl) {'. +nl_catch_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline before the '{' of a '@catch' statement, as in +# '@catch (decl) {'. If set to ignore, nl_catch_brace is used. +nl_oc_catch_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between '}' and 'catch'. +nl_brace_catch = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between '}' and '@catch'. If set to ignore, +# nl_brace_catch is used. +nl_oc_brace_catch = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between '}' and ']'. +nl_brace_square = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between '}' and ')' in a function invocation. +nl_brace_fparen = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'while' and '{'. +nl_while_brace = remove # ignore/add/remove/force/not_defined + +# (D) Add or remove newline between 'scope (x)' and '{'. +nl_scope_brace = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove newline between 'unittest' and '{'. +nl_unittest_brace = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove newline between 'version (x)' and '{'. +nl_version_brace = ignore # ignore/add/remove/force/not_defined + +# (C#) Add or remove newline between 'using' and '{'. +nl_using_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between two open or close braces. Due to general +# newline/brace handling, REMOVE may not work. +nl_brace_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'do' and '{'. +nl_do_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between '}' and 'while' of 'do' statement. +nl_brace_while = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'switch' and '{'. +nl_switch_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between 'synchronized' and '{'. +nl_synchronized_brace = ignore # ignore/add/remove/force/not_defined + +# Add a newline between ')' and '{' if the ')' is on a different line than the +# if/for/etc. +# +# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch and +# nl_catch_brace. +nl_multi_line_cond = false # true/false + +# Add a newline after '(' if an if/for/while/switch condition spans multiple +# lines +nl_multi_line_sparen_open = ignore # ignore/add/remove/force/not_defined + +# Add a newline before ')' if an if/for/while/switch condition spans multiple +# lines. Overrides nl_before_if_closing_paren if both are specified. +nl_multi_line_sparen_close = add # ignore/add/remove/force/not_defined + +# Force a newline in a define after the macro name for multi-line defines. +nl_multi_line_define = false # true/false + +# Whether to add a newline before 'case', and a blank line before a 'case' +# statement that follows a ';' or '}'. +nl_before_case = false # true/false + +# Whether to add a newline after a 'case' statement. +nl_after_case = false # true/false + +# Add or remove newline between a case ':' and '{'. +# +# Overrides nl_after_case. +nl_case_colon_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between ')' and 'throw'. +nl_before_throw = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'namespace' and '{'. +nl_namespace_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template class. +nl_template_class = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template class declaration. +# +# Overrides nl_template_class. +nl_template_class_decl = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<>' of a specialized class declaration. +# +# Overrides nl_template_class_decl. +nl_template_class_decl_special = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template class definition. +# +# Overrides nl_template_class. +nl_template_class_def = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<>' of a specialized class definition. +# +# Overrides nl_template_class_def. +nl_template_class_def_special = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template function. +nl_template_func = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template function +# declaration. +# +# Overrides nl_template_func. +nl_template_func_decl = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<>' of a specialized function +# declaration. +# +# Overrides nl_template_func_decl. +nl_template_func_decl_special = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template function +# definition. +# +# Overrides nl_template_func. +nl_template_func_def = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<>' of a specialized function +# definition. +# +# Overrides nl_template_func_def. +nl_template_func_def_special = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after 'template<...>' of a template variable. +nl_template_var = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'template<...>' and 'using' of a templated +# type alias. +nl_template_using = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'class' and '{'. +nl_class_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline before or after (depending on pos_class_comma, +# may not be IGNORE) each',' in the base class list. +nl_class_init_args = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after each ',' in the constructor member +# initialization. Related to nl_constr_colon, pos_constr_colon and +# pos_constr_comma. +nl_constr_init_args = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline before first element, after comma, and after last +# element, in 'enum'. +nl_enum_own_lines = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between return type and function name in a function +# definition. +# might be modified by nl_func_leave_one_liners +nl_func_type_name = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between return type and function name inside a class +# definition. If set to ignore, nl_func_type_name or nl_func_proto_type_name +# is used instead. +nl_func_type_name_class = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between class specification and '::' +# in 'void A::f() { }'. Only appears in separate member implementation (does +# not appear with in-line implementation). +nl_func_class_scope = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between function scope and name, as in +# 'void A :: f() { }'. +nl_func_scope_name = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between return type and function name in a prototype. +nl_func_proto_type_name = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between a function name and the opening '(' in the +# declaration. +nl_func_paren = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_paren for functions with no parameters. +nl_func_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between a function name and the opening '(' in the +# definition. +nl_func_def_paren = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_def_paren for functions with no parameters. +nl_func_def_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between a function name and the opening '(' in the +# call. +nl_func_call_paren = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_call_paren for functions with no parameters. +nl_func_call_paren_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after '(' in a function declaration. +nl_func_decl_start = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after '(' in a function definition. +nl_func_def_start = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_decl_start when there is only one parameter. +nl_func_decl_start_single = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_def_start when there is only one parameter. +nl_func_def_start_single = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after '(' in a function declaration if '(' and ')' +# are in different lines. If false, nl_func_decl_start is used instead. +nl_func_decl_start_multi_line = false # true/false + +# Whether to add a newline after '(' in a function definition if '(' and ')' +# are in different lines. If false, nl_func_def_start is used instead. +nl_func_def_start_multi_line = false # true/false + +# Add or remove newline after each ',' in a function declaration. +nl_func_decl_args = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after each ',' in a function definition. +nl_func_def_args = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline after each ',' in a function call. +nl_func_call_args = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after each ',' in a function declaration if '(' +# and ')' are in different lines. If false, nl_func_decl_args is used instead. +nl_func_decl_args_multi_line = false # true/false + +# Whether to add a newline after each ',' in a function definition if '(' +# and ')' are in different lines. If false, nl_func_def_args is used instead. +nl_func_def_args_multi_line = false # true/false + +# Add or remove newline before the ')' in a function declaration. +nl_func_decl_end = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline before the ')' in a function definition. +nl_func_def_end = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_decl_end when there is only one parameter. +nl_func_decl_end_single = ignore # ignore/add/remove/force/not_defined + +# Overrides nl_func_def_end when there is only one parameter. +nl_func_def_end_single = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline before ')' in a function declaration if '(' and ')' +# are in different lines. If false, nl_func_decl_end is used instead. +nl_func_decl_end_multi_line = false # true/false + +# Whether to add a newline before ')' in a function definition if '(' and ')' +# are in different lines. If false, nl_func_def_end is used instead. +nl_func_def_end_multi_line = false # true/false + +# Add or remove newline between '()' in a function declaration. +nl_func_decl_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between '()' in a function definition. +nl_func_def_empty = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between '()' in a function call. +nl_func_call_empty = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after '(' in a function call, +# has preference over nl_func_call_start_multi_line. +nl_func_call_start = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline before ')' in a function call. +nl_func_call_end = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after '(' in a function call if '(' and ')' are in +# different lines. +nl_func_call_start_multi_line = false # true/false + +# Whether to add a newline after each ',' in a function call if '(' and ')' +# are in different lines. +nl_func_call_args_multi_line = false # true/false + +# Whether to add a newline before ')' in a function call if '(' and ')' are in +# different lines. +nl_func_call_end_multi_line = false # true/false + +# Whether to respect nl_func_call_XXX option in case of closure args. +nl_func_call_args_multi_line_ignore_closures = false # true/false + +# Whether to add a newline after '<' of a template parameter list. +nl_template_start = false # true/false + +# Whether to add a newline after each ',' in a template parameter list. +nl_template_args = false # true/false + +# Whether to add a newline before '>' of a template parameter list. +nl_template_end = false # true/false + +# (OC) Whether to put each Objective-C message parameter on a separate line. +# See nl_oc_msg_leave_one_liner. +nl_oc_msg_args = false # true/false + +# (OC) Minimum number of Objective-C message parameters before applying nl_oc_msg_args. +nl_oc_msg_args_min_params = 0 # unsigned number + +# (OC) Max code width of Objective-C message before applying nl_oc_msg_args. +nl_oc_msg_args_max_code_width = 0 # unsigned number + +# Add or remove newline between function signature and '{'. +nl_fdef_brace = remove # ignore/add/remove/force/not_defined + +# Add or remove newline between function signature and '{', +# if signature ends with ')'. Overrides nl_fdef_brace. +nl_fdef_brace_cond = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between C++11 lambda signature and '{'. +nl_cpp_ldef_brace = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'return' and the return expression. +nl_return_expr = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline between 'throw' and the throw expression. +nl_throw_expr = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after semicolons, except in 'for' statements. +nl_after_semicolon = false # true/false + +# (Java) Add or remove newline between the ')' and '{{' of the double brace +# initializer. +nl_paren_dbrace_open = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after the type in an unnamed temporary +# direct-list-initialization, better: +# before a direct-list-initialization. +nl_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline after the open brace in an unnamed temporary +# direct-list-initialization. +nl_type_brace_init_lst_open = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline before the close brace in an unnamed temporary +# direct-list-initialization. +nl_type_brace_init_lst_close = ignore # ignore/add/remove/force/not_defined + +# Whether to add a newline before '{'. +nl_before_brace_open = false # true/false + +# Whether to add a newline after '{'. +nl_after_brace_open = true # true/false + +# Whether to add a newline between the open brace and a trailing single-line +# comment. Requires nl_after_brace_open=true. +nl_after_brace_open_cmt = false # true/false + +# Whether to add a newline after a virtual brace open with a non-empty body. +# These occur in un-braced if/while/do/for statement bodies. +nl_after_vbrace_open = false # true/false + +# Whether to add a newline after a virtual brace open with an empty body. +# These occur in un-braced if/while/do/for statement bodies. +nl_after_vbrace_open_empty = false # true/false + +# Whether to add a newline after '}'. Does not apply if followed by a +# necessary ';'. +nl_after_brace_close = true # true/false + +# Whether to add a newline after a virtual brace close, +# as in 'if (foo) a++; return;'. +nl_after_vbrace_close = false # true/false + +# Add or remove newline between the close brace and identifier, +# as in 'struct { int a; } b;'. Affects enumerations, unions and +# structures. If set to ignore, uses nl_after_brace_close. +nl_brace_struct_var = ignore # ignore/add/remove/force/not_defined + +# Whether to alter newlines in '#define' macros. +nl_define_macro = false # true/false + +# Whether to alter newlines between consecutive parenthesis closes. The number +# of closing parentheses in a line will depend on respective open parenthesis +# lines. +nl_squeeze_paren_close = false # true/false + +# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and +# '#endif'. Does not affect top-level #ifdefs. +nl_squeeze_ifdef = false # true/false + +# Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well. +nl_squeeze_ifdef_top_level = false # true/false + +# Add or remove blank line before 'if'. +nl_before_if = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line after 'if' statement. Add/Force work only if the +# next token is not a closing brace. +nl_after_if = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line before 'for'. +nl_before_for = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line after 'for' statement. +nl_after_for = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line before 'while'. +nl_before_while = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line after 'while' statement. +nl_after_while = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line before 'switch'. +nl_before_switch = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line after 'switch' statement. +nl_after_switch = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line before 'synchronized'. +nl_before_synchronized = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line after 'synchronized' statement. +nl_after_synchronized = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line before 'do'. +nl_before_do = ignore # ignore/add/remove/force/not_defined + +# Add or remove blank line after 'do/while' statement. +nl_after_do = ignore # ignore/add/remove/force/not_defined + +# Ignore nl_before_{if,for,switch,do,synchronized} if the control +# statement is immediately after a case statement. +# if nl_before_{if,for,switch,do} is set to remove, this option +# does nothing. +nl_before_ignore_after_case = false # true/false + +# Whether to put a blank line before 'return' statements, unless after an open +# brace. +nl_before_return = false # true/false + +# Whether to put a blank line after 'return' statements, unless followed by a +# close brace. +nl_after_return = false # true/false + +# Whether to put a blank line before a member '.' or '->' operators. +nl_before_member = ignore # ignore/add/remove/force/not_defined + +# (Java) Whether to put a blank line after a member '.' or '->' operators. +nl_after_member = ignore # ignore/add/remove/force/not_defined + +# Whether to double-space commented-entries in 'struct'/'union'/'enum'. +nl_ds_struct_enum_cmt = false # true/false + +# Whether to force a newline before '}' of a 'struct'/'union'/'enum'. +# (Lower priority than eat_blanks_before_close_brace.) +nl_ds_struct_enum_close_brace = false # true/false + +# Add or remove newline before or after (depending on pos_class_colon) a class +# colon, as in 'class Foo : public Bar'. +nl_class_colon = ignore # ignore/add/remove/force/not_defined + +# Add or remove newline around a class constructor colon. The exact position +# depends on nl_constr_init_args, pos_constr_colon and pos_constr_comma. +nl_constr_colon = ignore # ignore/add/remove/force/not_defined + +# Whether to collapse a two-line namespace, like 'namespace foo\n{ decl; }' +# into a single line. If true, prevents other brace newline rules from turning +# such code into four lines. If true, it also preserves one-liner namespaces. +nl_namespace_two_to_one_liner = false # true/false + +# Whether to remove a newline in simple unbraced if statements, turning them +# into one-liners, as in 'if(b)\n i++;' => 'if(b) i++;'. +nl_create_if_one_liner = false # true/false + +# Whether to remove a newline in simple unbraced for statements, turning them +# into one-liners, as in 'for (...)\n stmt;' => 'for (...) stmt;'. +nl_create_for_one_liner = true # true/false + +# Whether to remove a newline in simple unbraced while statements, turning +# them into one-liners, as in 'while (expr)\n stmt;' => 'while (expr) stmt;'. +nl_create_while_one_liner = true # true/false + +# Whether to collapse a function definition whose body (not counting braces) +# is only one line so that the entire definition (prototype, braces, body) is +# a single line. +nl_create_func_def_one_liner = false # true/false + +# Whether to split one-line simple list definitions into three lines by +# adding newlines, as in 'int a[12] = { 0 };'. +nl_create_list_one_liner = false # true/false + +# Whether to split one-line simple unbraced if statements into two lines by +# adding a newline, as in 'if(b) i++;'. +nl_split_if_one_liner = false # true/false + +# Whether to split one-line simple unbraced for statements into two lines by +# adding a newline, as in 'for (...) stmt;'. +nl_split_for_one_liner = false # true/false + +# Whether to split one-line simple unbraced while statements into two lines by +# adding a newline, as in 'while (expr) stmt;'. +nl_split_while_one_liner = false # true/false + +# Don't add a newline before a cpp-comment in a parameter list of a function +# call. +donot_add_nl_before_cpp_comment = false # true/false + +# +# Blank line options +# + +# The maximum number of consecutive newlines (3 = 2 blank lines). +nl_max = 0 # unsigned number + +# The maximum number of consecutive newlines in a function. +nl_max_blank_in_func = 0 # unsigned number + +# The number of newlines inside an empty function body. +# This option overrides eat_blanks_after_open_brace and +# eat_blanks_before_close_brace, but is ignored when +# nl_collapse_empty_body_functions=true +nl_inside_empty_func = 0 # unsigned number + +# The number of newlines before a function prototype. +nl_before_func_body_proto = 0 # unsigned number + +# The number of newlines before a multi-line function definition. Where +# applicable, this option is overridden with eat_blanks_after_open_brace=true +nl_before_func_body_def = 0 # unsigned number + +# The number of newlines before a class constructor/destructor prototype. +nl_before_func_class_proto = 0 # unsigned number + +# The number of newlines before a class constructor/destructor definition. +nl_before_func_class_def = 0 # unsigned number + +# The number of newlines after a function prototype. +nl_after_func_proto = 0 # unsigned number + +# The number of newlines after a function prototype, if not followed by +# another function prototype. +nl_after_func_proto_group = 0 # unsigned number + +# The number of newlines after a class constructor/destructor prototype. +nl_after_func_class_proto = 0 # unsigned number + +# The number of newlines after a class constructor/destructor prototype, +# if not followed by another constructor/destructor prototype. +nl_after_func_class_proto_group = 0 # unsigned number + +# Whether one-line method definitions inside a class body should be treated +# as if they were prototypes for the purposes of adding newlines. +# +# Requires nl_class_leave_one_liners=true. Overrides nl_before_func_body_def +# and nl_before_func_class_def for one-liners. +nl_class_leave_one_liner_groups = false # true/false + +# The number of newlines after '}' of a multi-line function body. +nl_after_func_body = 0 # unsigned number + +# The number of newlines after '}' of a multi-line function body in a class +# declaration. Also affects class constructors/destructors. +# +# Overrides nl_after_func_body. +nl_after_func_body_class = 0 # unsigned number + +# The number of newlines after '}' of a single line function body. Also +# affects class constructors/destructors. +# +# Overrides nl_after_func_body and nl_after_func_body_class. +nl_after_func_body_one_liner = 0 # unsigned number + +# The number of newlines before a block of typedefs. If nl_after_access_spec +# is non-zero, that option takes precedence. +# +# 0: No change (default). +nl_typedef_blk_start = 0 # unsigned number + +# The number of newlines after a block of typedefs. +# +# 0: No change (default). +nl_typedef_blk_end = 0 # unsigned number + +# The maximum number of consecutive newlines within a block of typedefs. +# +# 0: No change (default). +nl_typedef_blk_in = 0 # unsigned number + +# The minimum number of blank lines after a block of variable definitions +# at the top of a function body. If any preprocessor directives appear +# between the opening brace of the function and the variable block, then +# it is considered as not at the top of the function.Newlines are added +# before trailing preprocessor directives, if any exist. +# +# 0: No change (default). +nl_var_def_blk_end_func_top = 0 # unsigned number + +# The minimum number of empty newlines before a block of variable definitions +# not at the top of a function body. If nl_after_access_spec is non-zero, +# that option takes precedence. Newlines are not added at the top of the +# file or just after an opening brace. Newlines are added above any +# preprocessor directives before the block. +# +# 0: No change (default). +nl_var_def_blk_start = 0 # unsigned number + +# The minimum number of empty newlines after a block of variable definitions +# not at the top of a function body. Newlines are not added if the block +# is at the bottom of the file or just before a preprocessor directive. +# +# 0: No change (default). +nl_var_def_blk_end = 0 # unsigned number + +# The maximum number of consecutive newlines within a block of variable +# definitions. +# +# 0: No change (default). +nl_var_def_blk_in = 0 # unsigned number + +# The minimum number of newlines before a multi-line comment. +# Doesn't apply if after a brace open or another multi-line comment. +nl_before_block_comment = 0 # unsigned number + +# The minimum number of newlines before a single-line C comment. +# Doesn't apply if after a brace open or other single-line C comments. +nl_before_c_comment = 0 # unsigned number + +# The minimum number of newlines before a CPP comment. +# Doesn't apply if after a brace open or other CPP comments. +nl_before_cpp_comment = 0 # unsigned number + +# Whether to force a newline after a multi-line comment. +nl_after_multiline_comment = false # true/false + +# Whether to force a newline after a label's colon. +nl_after_label_colon = false # true/false + +# The number of newlines before a struct definition. +nl_before_struct = 0 # unsigned number + +# The number of newlines after '}' or ';' of a struct/enum/union definition. +nl_after_struct = 0 # unsigned number + +# The number of newlines before a class definition. +nl_before_class = 0 # unsigned number + +# The number of newlines after '}' or ';' of a class definition. +nl_after_class = 2 # unsigned number + +# The number of newlines before a namespace. +nl_before_namespace = 0 # unsigned number + +# The number of newlines after '{' of a namespace. This also adds newlines +# before the matching '}'. +# +# 0: Apply eat_blanks_after_open_brace or eat_blanks_before_close_brace if +# applicable, otherwise no change. +# +# Overrides eat_blanks_after_open_brace and eat_blanks_before_close_brace. +nl_inside_namespace = 0 # unsigned number + +# The number of newlines after '}' of a namespace. +nl_after_namespace = 0 # unsigned number + +# The number of newlines before an access specifier label. This also includes +# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count +# if after a brace open. +# +# 0: No change (default). +nl_before_access_spec = 0 # unsigned number + +# The number of newlines after an access specifier label. This also includes +# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count +# if after a brace open. +# +# 0: No change (default). +# +# Overrides nl_typedef_blk_start and nl_var_def_blk_start. +nl_after_access_spec = 0 # unsigned number + +# The number of newlines between a function definition and the function +# comment, as in '// comment\n void foo() {...}'. +# +# 0: No change (default). +nl_comment_func_def = 0 # unsigned number + +# The number of newlines after a try-catch-finally block that isn't followed +# by a brace close. +# +# 0: No change (default). +nl_after_try_catch_finally = 0 # unsigned number + +# (C#) The number of newlines before and after a property, indexer or event +# declaration. +# +# 0: No change (default). +nl_around_cs_property = 0 # unsigned number + +# (C#) The number of newlines between the get/set/add/remove handlers. +# +# 0: No change (default). +nl_between_get_set = 0 # unsigned number + +# (C#) Add or remove newline between property and the '{'. +nl_property_brace = ignore # ignore/add/remove/force/not_defined + +# Whether to remove blank lines after '{'. +eat_blanks_after_open_brace = false # true/false + +# Whether to remove blank lines before '}'. +eat_blanks_before_close_brace = false # true/false + +# How aggressively to remove extra newlines not in preprocessor. +# +# 0: No change (default) +# 1: Remove most newlines not handled by other config +# 2: Remove all newlines and reformat completely by config +nl_remove_extra_newlines = 0 # unsigned number + +# (Java) Add or remove newline after an annotation statement. Only affects +# annotations that are after a newline. +nl_after_annotation = ignore # ignore/add/remove/force/not_defined + +# (Java) Add or remove newline between two annotations. +nl_between_annotation = ignore # ignore/add/remove/force/not_defined + +# The number of newlines before a whole-file #ifdef. +# +# 0: No change (default). +nl_before_whole_file_ifdef = 0 # unsigned number + +# The number of newlines after a whole-file #ifdef. +# +# 0: No change (default). +nl_after_whole_file_ifdef = 0 # unsigned number + +# The number of newlines before a whole-file #endif. +# +# 0: No change (default). +nl_before_whole_file_endif = 0 # unsigned number + +# The number of newlines after a whole-file #endif. +# +# 0: No change (default). +nl_after_whole_file_endif = 0 # unsigned number + +# +# Positioning options +# + +# The position of arithmetic operators in wrapped expressions. +pos_arith = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of assignment in wrapped expressions. Do not affect '=' +# followed by '{'. +pos_assign = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of Boolean operators in wrapped expressions. +pos_bool = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of comparison operators in wrapped expressions. +pos_compare = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of conditional operators, as in the '?' and ':' of +# 'expr ? stmt : stmt', in wrapped expressions. +pos_conditional = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in wrapped expressions. +pos_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in enum entries. +pos_enum_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in the base class list if there is more than one +# line. Affects nl_class_init_args. +pos_class_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in the constructor initialization list. +# Related to nl_constr_colon, nl_constr_init_args and pos_constr_colon. +pos_constr_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of trailing/leading class colon, between class and base class +# list. Affects nl_class_colon. +pos_class_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of colons between constructor and member initialization. +# Related to nl_constr_colon, nl_constr_init_args and pos_constr_comma. +pos_constr_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of shift operators in wrapped expressions. +pos_shift = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# +# Line splitting options +# + +# Try to limit code width to N columns. +code_width = 0 # unsigned number + +# Whether to fully split long 'for' statements at semi-colons. +ls_for_split_full = false # true/false + +# Whether to fully split long function prototypes/calls at commas. +# The option ls_code_width has priority over the option ls_func_split_full. +ls_func_split_full = false # true/false + +# Whether to split lines as close to code_width as possible and ignore some +# groupings. +# The option ls_code_width has priority over the option ls_func_split_full. +ls_code_width = false # true/false + +# +# Code alignment options (not left column spaces/tabs) +# + +# Whether to keep non-indenting tabs. +align_keep_tabs = false # true/false + +# Whether to use tabs for aligning. +align_with_tabs = false # true/false + +# Whether to bump out to the next tab when aligning. +align_on_tabstop = false # true/false + +# Whether to right-align numbers. +align_number_right = false # true/false + +# Whether to keep whitespace not required for alignment. +align_keep_extra_space = false # true/false + +# Whether to align variable definitions in prototypes and functions. +align_func_params = false # true/false + +# The span for aligning parameter definitions in function on parameter name. +# +# 0: Don't align (default). +align_func_params_span = 0 # unsigned number + +# The threshold for aligning function parameter definitions. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_func_params_thresh = 0 # number + +# The gap for aligning function parameter definitions. +align_func_params_gap = 0 # unsigned number + +# The span for aligning constructor value. +# +# 0: Don't align (default). +align_constr_value_span = 0 # unsigned number + +# The threshold for aligning constructor value. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_constr_value_thresh = 0 # number + +# The gap for aligning constructor value. +align_constr_value_gap = 0 # unsigned number + +# Whether to align parameters in single-line functions that have the same +# name. The function names must already be aligned with each other. +align_same_func_call_params = false # true/false + +# The span for aligning function-call parameters for single line functions. +# +# 0: Don't align (default). +align_same_func_call_params_span = 0 # unsigned number + +# The threshold for aligning function-call parameters for single line +# functions. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_same_func_call_params_thresh = 0 # number + +# The span for aligning variable definitions. +# +# 0: Don't align (default). +align_var_def_span = 0 # unsigned number + +# How to consider (or treat) the '*' in the alignment of variable definitions. +# +# 0: Part of the type 'void * foo;' (default) +# 1: Part of the variable 'void *foo;' +# 2: Dangling 'void *foo;' +# Dangling: the '*' will not be taken into account when aligning. +align_var_def_star_style = 1 # unsigned number + +# How to consider (or treat) the '&' in the alignment of variable definitions. +# +# 0: Part of the type 'long & foo;' (default) +# 1: Part of the variable 'long &foo;' +# 2: Dangling 'long &foo;' +# Dangling: the '&' will not be taken into account when aligning. +align_var_def_amp_style = 0 # unsigned number + +# The threshold for aligning variable definitions. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_var_def_thresh = 0 # number + +# The gap for aligning variable definitions. +align_var_def_gap = 0 # unsigned number + +# Whether to align the colon in struct bit fields. +align_var_def_colon = false # true/false + +# The gap for aligning the colon in struct bit fields. +align_var_def_colon_gap = 0 # unsigned number + +# Whether to align any attribute after the variable name. +align_var_def_attribute = false # true/false + +# Whether to align inline struct/enum/union variable definitions. +align_var_def_inline = false # true/false + +# The span for aligning on '=' in assignments. +# +# 0: Don't align (default). +align_assign_span = 0 # unsigned number + +# The span for aligning on '=' in function prototype modifier. +# +# 0: Don't align (default). +align_assign_func_proto_span = 0 # unsigned number + +# The threshold for aligning on '=' in assignments. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_assign_thresh = 0 # number + +# Whether to align on the left most assignment when multiple +# definitions are found on the same line. +# Depends on 'align_assign_span' and 'align_assign_thresh' settings. +align_assign_on_multi_var_defs = false # true/false + +# The span for aligning on '{' in braced init list. +# +# 0: Don't align (default). +align_braced_init_list_span = 0 # unsigned number + +# The threshold for aligning on '{' in braced init list. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_braced_init_list_thresh = 0 # number + +# How to apply align_assign_span to function declaration "assignments", i.e. +# 'virtual void foo() = 0' or '~foo() = {default|delete}'. +# +# 0: Align with other assignments (default) +# 1: Align with each other, ignoring regular assignments +# 2: Don't align +align_assign_decl_func = 0 # unsigned number + +# The span for aligning on '=' in enums. +# +# 0: Don't align (default). +align_enum_equ_span = 0 # unsigned number + +# The threshold for aligning on '=' in enums. +# Use a negative number for absolute thresholds. +# +# 0: no limit (default). +align_enum_equ_thresh = 0 # number + +# The span for aligning class member definitions. +# +# 0: Don't align (default). +align_var_class_span = 0 # unsigned number + +# The threshold for aligning class member definitions. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_var_class_thresh = 0 # number + +# The gap for aligning class member definitions. +align_var_class_gap = 0 # unsigned number + +# The span for aligning struct/union member definitions. +# +# 0: Don't align (default). +align_var_struct_span = 0 # unsigned number + +# The threshold for aligning struct/union member definitions. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_var_struct_thresh = 0 # number + +# The gap for aligning struct/union member definitions. +align_var_struct_gap = 0 # unsigned number + +# The span for aligning struct initializer values. +# +# 0: Don't align (default). +align_struct_init_span = 0 # unsigned number + +# The span for aligning single-line typedefs. +# +# 0: Don't align (default). +align_typedef_span = 0 # unsigned number + +# The minimum space between the type and the synonym of a typedef. +align_typedef_gap = 0 # unsigned number + +# How to align typedef'd functions with other typedefs. +# +# 0: Don't mix them at all (default) +# 1: Align the open parenthesis with the types +# 2: Align the function type name with the other type names +align_typedef_func = 0 # unsigned number + +# How to consider (or treat) the '*' in the alignment of typedefs. +# +# 0: Part of the typedef type, 'typedef int * pint;' (default) +# 1: Part of type name: 'typedef int *pint;' +# 2: Dangling: 'typedef int *pint;' +# Dangling: the '*' will not be taken into account when aligning. +align_typedef_star_style = 1 # unsigned number + +# How to consider (or treat) the '&' in the alignment of typedefs. +# +# 0: Part of the typedef type, 'typedef int & intref;' (default) +# 1: Part of type name: 'typedef int &intref;' +# 2: Dangling: 'typedef int &intref;' +# Dangling: the '&' will not be taken into account when aligning. +align_typedef_amp_style = 0 # unsigned number + +# The span for aligning comments that end lines. +# +# 0: Don't align (default). +align_right_cmt_span = 0 # unsigned number + +# Minimum number of columns between preceding text and a trailing comment in +# order for the comment to qualify for being aligned. Must be non-zero to have +# an effect. +align_right_cmt_gap = 0 # unsigned number + +# If aligning comments, whether to mix with comments after '}' and #endif with +# less than three spaces before the comment. +align_right_cmt_mix = false # true/false + +# Whether to only align trailing comments that are at the same brace level. +align_right_cmt_same_level = false # true/false + +# Minimum column at which to align trailing comments. Comments which are +# aligned beyond this column, but which can be aligned in a lesser column, +# may be "pulled in". +# +# 0: Ignore (default). +align_right_cmt_at_col = 0 # unsigned number + +# The span for aligning function prototypes. +# +# 0: Don't align (default). +align_func_proto_span = 0 # unsigned number + +# How to consider (or treat) the '*' in the alignment of function prototypes. +# +# 0: Part of the type 'void * foo();' (default) +# 1: Part of the function 'void *foo();' +# 2: Dangling 'void *foo();' +# Dangling: the '*' will not be taken into account when aligning. +align_func_proto_star_style = 0 # unsigned number + +# How to consider (or treat) the '&' in the alignment of function prototypes. +# +# 0: Part of the type 'long & foo();' (default) +# 1: Part of the function 'long &foo();' +# 2: Dangling 'long &foo();' +# Dangling: the '&' will not be taken into account when aligning. +align_func_proto_amp_style = 0 # unsigned number + +# The threshold for aligning function prototypes. +# Use a negative number for absolute thresholds. +# +# 0: No limit (default). +align_func_proto_thresh = 0 # number + +# Minimum gap between the return type and the function name. +align_func_proto_gap = 0 # unsigned number + +# Whether to align function prototypes on the 'operator' keyword instead of +# what follows. +align_on_operator = false # true/false + +# Whether to mix aligning prototype and variable declarations. If true, +# align_var_def_XXX options are used instead of align_func_proto_XXX options. +align_mix_var_proto = false # true/false + +# Whether to align single-line functions with function prototypes. +# Uses align_func_proto_span. +align_single_line_func = false # true/false + +# Whether to align the open brace of single-line functions. +# Requires align_single_line_func=true. Uses align_func_proto_span. +align_single_line_brace = false # true/false + +# Gap for align_single_line_brace. +align_single_line_brace_gap = 0 # unsigned number + +# (OC) The span for aligning Objective-C message specifications. +# +# 0: Don't align (default). +align_oc_msg_spec_span = 0 # unsigned number + +# Whether and how to align backslashes that split a macro onto multiple lines. +# This will not work right if the macro contains a multi-line comment. +# +# 0: Do nothing (default) +# 1: Align the backslashes in the column at the end of the longest line +# 2: Align with the backslash that is farthest to the left, or, if that +# backslash is farther left than the end of the longest line, at the end of +# the longest line +# 3: Align with the backslash that is farthest to the right +align_nl_cont = 0 # unsigned number + +# Whether to align macro functions and variables together. +align_pp_define_together = true # true/false + +# The span for aligning on '#define' bodies. +# +# =0: Don't align (default) +# >0: Number of lines (including comments) between blocks +align_pp_define_span = 0 # unsigned number + +# The minimum space between label and value of a preprocessor define. +align_pp_define_gap = 0 # unsigned number + +# Whether to align lines that start with '<<' with previous '<<'. +# +# Default: true +align_left_shift = true # true/false + +# Whether to align comma-separated statements following '<<' (as used to +# initialize Eigen matrices). +align_eigen_comma_init = false # true/false + +# Whether to align text after 'asm volatile ()' colons. +align_asm_colon = false # true/false + +# (OC) Span for aligning parameters in an Objective-C message call +# on the ':'. +# +# 0: Don't align. +align_oc_msg_colon_span = 0 # unsigned number + +# (OC) Whether to always align with the first parameter, even if it is too +# short. +align_oc_msg_colon_first = false # true/false + +# (OC) Whether to align parameters in an Objective-C '+' or '-' declaration +# on the ':'. +align_oc_decl_colon = false # true/false + +# (OC) Whether to not align parameters in an Objectve-C message call if first +# colon is not on next line of the message call (the same way Xcode does +# alignment) +align_oc_msg_colon_xcode_like = false # true/false + +# +# Comment modification options +# + +# Try to wrap comments at N columns. +cmt_width = 0 # unsigned number + +# How to reflow comments. +# +# 0: No reflowing (apart from the line wrapping due to cmt_width) (default) +# 1: No touching at all +# 2: Full reflow (enable cmt_indent_multi for indent with line wrapping due to cmt_width) +cmt_reflow_mode = 1 # unsigned number + +# Path to a file that contains regular expressions describing patterns for +# which the end of one line and the beginning of the next will be folded into +# the same sentence or paragraph during full comment reflow. The regular +# expressions are described using ECMAScript syntax. The syntax for this +# specification is as follows, where "..." indicates the custom regular +# expression and "n" indicates the nth end_of_prev_line_regex and +# beg_of_next_line_regex regular expression pair: +# +# end_of_prev_line_regex[1] = "...$" +# beg_of_next_line_regex[1] = "^..." +# end_of_prev_line_regex[2] = "...$" +# beg_of_next_line_regex[2] = "^..." +# . +# . +# . +# end_of_prev_line_regex[n] = "...$" +# beg_of_next_line_regex[n] = "^..." +# +# Note that use of this option overrides the default reflow fold regular +# expressions, which are internally defined as follows: +# +# end_of_prev_line_regex[1] = "[\w,\]\)]$" +# beg_of_next_line_regex[1] = "^[\w,\[\(]" +# end_of_prev_line_regex[2] = "\.$" +# beg_of_next_line_regex[2] = "^[A-Z]" +cmt_reflow_fold_regex_file = "" # string + +# Whether to indent wrapped lines to the start of the encompassing paragraph +# during full comment reflow (cmt_reflow_mode = 2). Overrides the value +# specified by cmt_sp_after_star_cont. +# +# Note that cmt_align_doxygen_javadoc_tags overrides this option for +# paragraphs associated with javadoc tags +cmt_reflow_indent_to_paragraph_start = false # true/false + +# Whether to convert all tabs to spaces in comments. If false, tabs in +# comments are left alone, unless used for indenting. +cmt_convert_tab_to_spaces = true # true/false + +# Whether to apply changes to multi-line comments, including cmt_width, +# keyword substitution and leading chars. +# +# Default: true +cmt_indent_multi = false # true/false + +# Whether to align doxygen javadoc-style tags ('@param', '@return', etc.) +# and corresponding fields such that groups of consecutive block tags, +# parameter names, and descriptions align with one another. Overrides that +# which is specified by the cmt_sp_after_star_cont. If cmt_width > 0, it may +# be necessary to enable cmt_indent_multi and set cmt_reflow_mode = 2 +# in order to achieve the desired alignment for line-wrapping. +cmt_align_doxygen_javadoc_tags = false # true/false + +# The number of spaces to insert after the star and before doxygen +# javadoc-style tags (@param, @return, etc). Requires enabling +# cmt_align_doxygen_javadoc_tags. Overrides that which is specified by the +# cmt_sp_after_star_cont. +# +# Default: 1 +cmt_sp_before_doxygen_javadoc_tags = 1 # unsigned number + +# Whether to change trailing, single-line c-comments into cpp-comments. +cmt_trailing_single_line_c_to_cpp = true # true/false + +# Whether to group c-comments that look like they are in a block. +cmt_c_group = false # true/false + +# Whether to put an empty '/*' on the first line of the combined c-comment. +cmt_c_nl_start = true # true/false + +# Whether to add a newline before the closing '*/' of the combined c-comment. +cmt_c_nl_end = false # true/false + +# Whether to change cpp-comments into c-comments. +cmt_cpp_to_c = false # true/false + +# Whether to group cpp-comments that look like they are in a block. Only +# meaningful if cmt_cpp_to_c=true. +cmt_cpp_group = false # true/false + +# Whether to put an empty '/*' on the first line of the combined cpp-comment +# when converting to a c-comment. +# +# Requires cmt_cpp_to_c=true and cmt_cpp_group=true. +cmt_cpp_nl_start = false # true/false + +# Whether to add a newline before the closing '*/' of the combined cpp-comment +# when converting to a c-comment. +# +# Requires cmt_cpp_to_c=true and cmt_cpp_group=true. +cmt_cpp_nl_end = false # true/false + +# Whether to put a star on subsequent comment lines. +cmt_star_cont = true # true/false + +# The number of spaces to insert at the start of subsequent comment lines. +cmt_sp_before_star_cont = 1 # unsigned number + +# The number of spaces to insert after the star on subsequent comment lines. +cmt_sp_after_star_cont = 1 # unsigned number + +# For multi-line comments with a '*' lead, remove leading spaces if the first +# and last lines of the comment are the same length. +# +# Default: true +cmt_multi_check_last = true # true/false + +# For multi-line comments with a '*' lead, remove leading spaces if the first +# and last lines of the comment are the same length AND if the length is +# bigger as the first_len minimum. +# +# Default: 4 +cmt_multi_first_len_minimum = 4 # unsigned number + +# Path to a file that contains text to insert at the beginning of a file if +# the file doesn't start with a C/C++ comment. If the inserted text contains +# '$(filename)', that will be replaced with the current file's name. +cmt_insert_file_header = "./buildroot/share/extras/file_header.h" # string + +# Path to a file that contains text to insert at the end of a file if the +# file doesn't end with a C/C++ comment. If the inserted text contains +# '$(filename)', that will be replaced with the current file's name. +cmt_insert_file_footer = "" # string + +# Path to a file that contains text to insert before a function definition if +# the function isn't preceded by a C/C++ comment. If the inserted text +# contains '$(function)', '$(javaparam)' or '$(fclass)', these will be +# replaced with, respectively, the name of the function, the javadoc '@param' +# and '@return' stuff, or the name of the class to which the member function +# belongs. +cmt_insert_func_header = "" # string + +# Path to a file that contains text to insert before a class if the class +# isn't preceded by a C/C++ comment. If the inserted text contains '$(class)', +# that will be replaced with the class name. +cmt_insert_class_header = "" # string + +# Path to a file that contains text to insert before an Objective-C message +# specification, if the method isn't preceded by a C/C++ comment. If the +# inserted text contains '$(message)' or '$(javaparam)', these will be +# replaced with, respectively, the name of the function, or the javadoc +# '@param' and '@return' stuff. +cmt_insert_oc_msg_header = "" # string + +# Whether a comment should be inserted if a preprocessor is encountered when +# stepping backwards from a function name. +# +# Applies to cmt_insert_oc_msg_header, cmt_insert_func_header and +# cmt_insert_class_header. +cmt_insert_before_preproc = false # true/false + +# Whether a comment should be inserted if a function is declared inline to a +# class definition. +# +# Applies to cmt_insert_func_header. +# +# Default: true +cmt_insert_before_inlines = true # true/false + +# Whether a comment should be inserted if the function is a class constructor +# or destructor. +# +# Applies to cmt_insert_func_header. +cmt_insert_before_ctor_dtor = false # true/false + +# +# Code modifying options (non-whitespace) +# + +# Add or remove braces on a single-line 'do' statement. +mod_full_brace_do = ignore # ignore/add/remove/force/not_defined + +# Add or remove braces on a single-line 'for' statement. +mod_full_brace_for = ignore # ignore/add/remove/force/not_defined + +# (Pawn) Add or remove braces on a single-line function definition. +mod_full_brace_function = ignore # ignore/add/remove/force/not_defined + +# Add or remove braces on a single-line 'if' statement. Braces will not be +# removed if the braced statement contains an 'else'. +mod_full_brace_if = ignore # ignore/add/remove/force/not_defined + +# Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either +# have, or do not have, braces. Overrides mod_full_brace_if. +# +# 0: Don't override mod_full_brace_if +# 1: Add braces to all blocks if any block needs braces and remove braces if +# they can be removed from all blocks +# 2: Add braces to all blocks if any block already has braces, regardless of +# whether it needs them +# 3: Add braces to all blocks if any block needs braces and remove braces if +# they can be removed from all blocks, except if all blocks have braces +# despite none needing them +mod_full_brace_if_chain = 1 # unsigned number + +# Whether to add braces to all blocks of an 'if'/'else if'/'else' chain. +# If true, mod_full_brace_if_chain will only remove braces from an 'if' that +# does not have an 'else if' or 'else'. +mod_full_brace_if_chain_only = false # true/false + +# Add or remove braces on single-line 'while' statement. +mod_full_brace_while = ignore # ignore/add/remove/force/not_defined + +# Add or remove braces on single-line 'using ()' statement. +mod_full_brace_using = ignore # ignore/add/remove/force/not_defined + +# Don't remove braces around statements that span N newlines +mod_full_brace_nl = 0 # unsigned number + +# Whether to prevent removal of braces from 'if'/'for'/'while'/etc. blocks +# which span multiple lines. +# +# Affects: +# mod_full_brace_for +# mod_full_brace_if +# mod_full_brace_if_chain +# mod_full_brace_if_chain_only +# mod_full_brace_while +# mod_full_brace_using +# +# Does not affect: +# mod_full_brace_do +# mod_full_brace_function +mod_full_brace_nl_block_rem_mlcond = false # true/false + +# Add or remove unnecessary parentheses on 'return' statement. +mod_paren_on_return = ignore # ignore/add/remove/force/not_defined + +# Add or remove unnecessary parentheses on 'throw' statement. +mod_paren_on_throw = ignore # ignore/add/remove/force/not_defined + +# (Pawn) Whether to change optional semicolons to real semicolons. +mod_pawn_semicolon = false # true/false + +# Whether to fully parenthesize Boolean expressions in 'while' and 'if' +# statement, as in 'if (a && b > c)' => 'if (a && (b > c))'. +mod_full_paren_if_bool = false # true/false + +# Whether to fully parenthesize Boolean expressions after '=' +# statement, as in 'x = a && b > c;' => 'x = (a && (b > c));'. +mod_full_paren_assign_bool = false # true/false + +# Whether to fully parenthesize Boolean expressions after '=' +# statement, as in 'return a && b > c;' => 'return (a && (b > c));'. +mod_full_paren_return_bool = false # true/false + +# Whether to remove superfluous semicolons. +mod_remove_extra_semicolon = true # true/false + +# Whether to remove duplicate include. +mod_remove_duplicate_include = false # true/false + +# the following options (mod_XX_closebrace_comment) use different comment, +# depending of the setting of the next option. +# false: Use the c comment (default) +# true : Use the cpp comment +mod_add_force_c_closebrace_comment = false # true/false + +# If a function body exceeds the specified number of newlines and doesn't have +# a comment after the close brace, a comment will be added. +mod_add_long_function_closebrace_comment = 0 # unsigned number + +# If a namespace body exceeds the specified number of newlines and doesn't +# have a comment after the close brace, a comment will be added. +mod_add_long_namespace_closebrace_comment = 0 # unsigned number + +# If a class body exceeds the specified number of newlines and doesn't have a +# comment after the close brace, a comment will be added. +mod_add_long_class_closebrace_comment = 0 # unsigned number + +# If a switch body exceeds the specified number of newlines and doesn't have a +# comment after the close brace, a comment will be added. +mod_add_long_switch_closebrace_comment = 0 # unsigned number + +# If an #ifdef body exceeds the specified number of newlines and doesn't have +# a comment after the #endif, a comment will be added. +mod_add_long_ifdef_endif_comment = 20 # unsigned number + +# If an #ifdef or #else body exceeds the specified number of newlines and +# doesn't have a comment after the #else, a comment will be added. +mod_add_long_ifdef_else_comment = 20 # unsigned number + +# Whether to take care of the case by the mod_sort_xx options. +mod_sort_case_sensitive = false # true/false + +# Whether to sort consecutive single-line 'import' statements. +mod_sort_import = false # true/false + +# (C#) Whether to sort consecutive single-line 'using' statements. +mod_sort_using = false # true/false + +# Whether to sort consecutive single-line '#include' statements (C/C++) and +# '#import' statements (Objective-C). Be aware that this has the potential to +# break your code if your includes/imports have ordering dependencies. +mod_sort_include = false # true/false + +# Whether to prioritize '#include' and '#import' statements that contain +# filename without extension when sorting is enabled. +mod_sort_incl_import_prioritize_filename = false # true/false + +# Whether to prioritize '#include' and '#import' statements that does not +# contain extensions when sorting is enabled. +mod_sort_incl_import_prioritize_extensionless = false # true/false + +# Whether to prioritize '#include' and '#import' statements that contain +# angle over quotes when sorting is enabled. +mod_sort_incl_import_prioritize_angle_over_quotes = false # true/false + +# Whether to ignore file extension in '#include' and '#import' statements +# for sorting comparison. +mod_sort_incl_import_ignore_extension = false # true/false + +# Whether to group '#include' and '#import' statements when sorting is enabled. +mod_sort_incl_import_grouping_enabled = false # true/false + +# Whether to move a 'break' that appears after a fully braced 'case' before +# the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'. +mod_move_case_break = false # true/false + +# Whether to move a 'return' that appears after a fully braced 'case' before +# the close brace, as in 'case X: { ... } return;' => 'case X: { ... return; }'. +mod_move_case_return = false # true/false + +# Add or remove braces around a fully braced case statement. Will only remove +# braces if there are no variable declarations in the block. +mod_case_brace = ignore # ignore/add/remove/force/not_defined + +# Whether to remove a void 'return;' that appears as the last statement in a +# function. +mod_remove_empty_return = false # true/false + +# Add or remove the comma after the last value of an enumeration. +mod_enum_last_comma = ignore # ignore/add/remove/force/not_defined + +# Syntax to use for infinite loops. +# +# 0: Leave syntax alone (default) +# 1: Rewrite as `for(;;)` +# 2: Rewrite as `while(true)` +# 3: Rewrite as `do`...`while(true);` +# 4: Rewrite as `while(1)` +# 5: Rewrite as `do`...`while(1);` +# +# Infinite loops that do not already match one of these syntaxes are ignored. +# Other options that affect loop formatting will be applied after transforming +# the syntax. +mod_infinite_loop = 0 # unsigned number + +# Add or remove the 'int' keyword in 'int short'. +mod_int_short = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'short int'. +mod_short_int = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'int long'. +mod_int_long = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'long int'. +mod_long_int = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'int signed'. +mod_int_signed = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'signed int'. +mod_signed_int = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'int unsigned'. +mod_int_unsigned = ignore # ignore/add/remove/force/not_defined + +# Add or remove the 'int' keyword in 'unsigned int'. +mod_unsigned_int = ignore # ignore/add/remove/force/not_defined + +# If there is a situation where mod_int_* and mod_*_int would result in +# multiple int keywords, whether to keep the rightmost int (the default) or the +# leftmost int. +mod_int_prefer_int_on_left = false # true/false + +# (OC) Whether to organize the properties. If true, properties will be +# rearranged according to the mod_sort_oc_property_*_weight factors. +mod_sort_oc_properties = false # true/false + +# (OC) Weight of a class property modifier. +mod_sort_oc_property_class_weight = 0 # number + +# (OC) Weight of 'atomic' and 'nonatomic'. +mod_sort_oc_property_thread_safe_weight = 0 # number + +# (OC) Weight of 'readwrite' when organizing properties. +mod_sort_oc_property_readwrite_weight = 0 # number + +# (OC) Weight of a reference type specifier ('retain', 'copy', 'assign', +# 'weak', 'strong') when organizing properties. +mod_sort_oc_property_reference_weight = 0 # number + +# (OC) Weight of getter type ('getter=') when organizing properties. +mod_sort_oc_property_getter_weight = 0 # number + +# (OC) Weight of setter type ('setter=') when organizing properties. +mod_sort_oc_property_setter_weight = 0 # number + +# (OC) Weight of nullability type ('nullable', 'nonnull', 'null_unspecified', +# 'null_resettable') when organizing properties. +mod_sort_oc_property_nullability_weight = 0 # number + +# +# Preprocessor options +# + +# How to use tabs when indenting preprocessor code. +# +# -1: Use 'indent_with_tabs' setting (default) +# 0: Spaces only +# 1: Indent with tabs to brace level, align with spaces +# 2: Indent and align with tabs, using spaces when not on a tabstop +# +# Default: -1 +pp_indent_with_tabs = -1 # number + +# Add or remove indentation of preprocessor directives inside #if blocks +# at brace level 0 (file-level). +pp_indent = add # ignore/add/remove/force/not_defined + +# Whether to indent #if/#else/#endif at the brace level. If false, these are +# indented from column 1. +pp_indent_at_level = true # true/false + +# Whether to indent #if/#else/#endif at the parenthesis level if the brace +# level is 0. If false, these are indented from column 1. +pp_indent_at_level0 = false # true/false + +# Specifies the number of columns to indent preprocessors per level +# at brace level 0 (file-level). If pp_indent_at_level=false, also specifies +# the number of columns to indent preprocessors per level +# at brace level > 0 (function-level). +# +# Default: 1 +pp_indent_count = 2 # unsigned number + +# Add or remove space after # based on pp level of #if blocks. +pp_space_after = ignore # ignore/add/remove/force/not_defined + +# Sets the number of spaces per level added with pp_space_after. +pp_space_count = 0 # unsigned number + +# The indent for '#region' and '#endregion' in C# and '#pragma region' in +# C/C++. Negative values decrease indent down to the first column. +pp_indent_region = 0 # number + +# Whether to indent the code between #region and #endregion. +pp_region_indent_code = false # true/false + +# If pp_indent_at_level=true, sets the indent for #if, #else and #endif when +# not at file-level. Negative values decrease indent down to the first column. +# +# =0: Indent preprocessors using output_tab_size +# >0: Column at which all preprocessors will be indented +pp_indent_if = 0 # number + +# Whether to indent the code between #if, #else and #endif. +pp_if_indent_code = true # true/false + +# Whether to indent the body of an #if that encompasses all the code in the file. +pp_indent_in_guard = false # true/false + +# Whether to indent '#define' at the brace level. If false, these are +# indented from column 1. +pp_define_at_level = true # true/false + +# Whether to indent '#include' at the brace level. +pp_include_at_level = false # true/false + +# Whether to ignore the '#define' body while formatting. +pp_ignore_define_body = false # true/false + +# An offset value that controls the indentation of the body of a multiline #define. +# 'body' refers to all the lines of a multiline #define except the first line. +# Requires 'pp_ignore_define_body = false'. +# +# <0: Absolute column: the body indentation starts off at the specified column +# (ex. -3 ==> the body is indented starting from column 3) +# >=0: Relative to the column of the '#' of '#define' +# (ex. 3 ==> the body is indented starting 3 columns at the right of '#') +# +# Default: 8 +pp_multiline_define_body_indent = 8 # number + +# Whether to indent case statements between #if, #else, and #endif. +# Only applies to the indent of the preprocessor that the case statements +# directly inside of. +# +# Default: true +pp_indent_case = true # true/false + +# Whether to indent whole function definitions between #if, #else, and #endif. +# Only applies to the indent of the preprocessor that the function definition +# is directly inside of. +# +# Default: true +pp_indent_func_def = true # true/false + +# Whether to indent extern C blocks between #if, #else, and #endif. +# Only applies to the indent of the preprocessor that the extern block is +# directly inside of. +# +# Default: true +pp_indent_extern = true # true/false + +# How to indent braces directly inside #if, #else, and #endif. +# Requires pp_if_indent_code=true and only applies to the indent of the +# preprocessor that the braces are directly inside of. +# 0: No extra indent +# 1: Indent by one level +# -1: Preserve original indentation +# +# Default: 1 +pp_indent_brace = 1 # number + +# Whether to print warning messages for unbalanced #if and #else blocks. +# This will print a message in the following cases: +# - if an #ifdef block ends on a different indent level than +# where it started from. Example: +# +# #ifdef TEST +# int i; +# { +# int j; +# #endif +# +# - an #elif/#else block ends on a different indent level than +# the corresponding #ifdef block. Example: +# +# #ifdef TEST +# int i; +# #else +# } +# int j; +# #endif +pp_warn_unbalanced_if = false # true/false + +# +# Sort includes options +# + +# The regex for include category with priority 0. +include_category_0 = "" # string + +# The regex for include category with priority 1. +include_category_1 = "" # string + +# The regex for include category with priority 2. +include_category_2 = "" # string + +# +# Use or Do not Use options +# + +# true: indent_func_call_param will be used (default) +# false: indent_func_call_param will NOT be used +# +# Default: true +use_indent_func_call_param = true # true/false + +# The value of the indentation for a continuation line is calculated +# differently if the statement is: +# - a declaration: your case with QString fileName ... +# - an assignment: your case with pSettings = new QSettings( ... +# +# At the second case the indentation value might be used twice: +# - at the assignment +# - at the function call (if present) +# +# To prevent the double use of the indentation value, use this option with the +# value 'true'. +# +# true: indent_continue will be used only once +# false: indent_continue will be used every time (default) +# +# Requires indent_ignore_first_continue=false. +use_indent_continue_only_once = false # true/false + +# The indentation can be: +# - after the assignment, at the '[' character +# - at the beginning of the lambda body +# +# true: indentation will be at the beginning of the lambda body +# false: indentation will be after the assignment (default) +indent_cpp_lambda_only_once = false # true/false + +# Whether sp_after_angle takes precedence over sp_inside_fparen. This was the +# historic behavior, but is probably not the desired behavior, so this is off +# by default. +use_sp_after_angle_always = false # true/false + +# Whether to apply special formatting for Qt SIGNAL/SLOT macros. Essentially, +# this tries to format these so that they match Qt's normalized form (i.e. the +# result of QMetaObject::normalizedSignature), which can slightly improve the +# performance of the QObject::connect call, rather than how they would +# otherwise be formatted. +# +# See options_for_QT.cpp for details. +# +# Default: true +use_options_overriding_for_qt_macros = true # true/false + +# If true: the form feed character is removed from the list of whitespace +# characters. See https://en.cppreference.com/w/cpp/string/byte/isspace. +use_form_feed_no_more_as_whitespace_character = false # true/false + +# +# Warn levels - 1: error, 2: warning (default), 3: note +# + +# (C#) Warning is given if doing tab-to-\t replacement and we have found one +# in a C# verbatim string literal. +# +# Default: 2 +warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number + +# Limit the number of loops. +# Used by uncrustify.cpp to exit from infinite loop. +# 0: no limit. +debug_max_number_of_loops = 0 # number + +# Set the number of the line to protocol; +# Used in the function prot_the_line if the 2. parameter is zero. +# 0: nothing protocol. +debug_line_number_to_protocol = 0 # number + +# Set the number of second(s) before terminating formatting the current file, +# 0: no timeout. +# only for linux +debug_timeout = 0 # number + +# Set the number of characters to be printed if the text is too long, +# 0: do not truncate. +debug_truncate = 0 # unsigned number + +# sort (or not) the tracking info. +# +# Default: true +debug_sort_the_tracks = true # true/false + +# decode (or not) the flags as a new line. +# only if the -p option is set. +debug_decode_the_flags = false # true/false + +# insert the number of the line at the beginning of each line +set_numbering_for_html_output = false # true/false + +# Meaning of the settings: +# Ignore - do not do any changes +# Add - makes sure there is 1 or more space/brace/newline/etc +# Force - makes sure there is exactly 1 space/brace/newline/etc, +# behaves like Add in some contexts +# Remove - removes space/brace/newline/etc +# +# +# - Token(s) can be treated as specific type(s) with the 'set' option: +# `set tokenType tokenString [tokenString...]` +# +# Example: +# `set BOOL __AND__ __OR__` +# +# tokenTypes are defined in src/token_enum.h, use them without the +# 'CT_' prefix: 'CT_BOOL' => 'BOOL' +# +# +# - Token(s) can be treated as type(s) with the 'type' option. +# `type tokenString [tokenString...]` +# +# Example: +# `type int c_uint_8 Rectangle` +# +# This can also be achieved with `set TYPE int c_uint_8 Rectangle` +# +# +# To embed whitespace in tokenStrings use the '\' escape character, or quote +# the tokenStrings. These quotes are supported: "'` +# +# +# - Support for the auto detection of languages through the file ending can be +# added using the 'file_ext' command. +# `file_ext langType langString [langString..]` +# +# Example: +# `file_ext CPP .ch .cxx .cpp.in` +# +# langTypes are defined in uncrusify_types.h in the lang_flag_e enum, use +# them without the 'LANG_' prefix: 'LANG_CPP' => 'CPP' +# +# +# - Custom macro-based indentation can be set up using 'macro-open', +# 'macro-else' and 'macro-close'. +# `(macro-open | macro-else | macro-close) tokenString` +# +# Example: +# `macro-open BEGIN_TEMPLATE_MESSAGE_MAP` +# `macro-open BEGIN_MESSAGE_MAP` +# `macro-close END_MESSAGE_MAP` +# +# +# option(s) with 'not default' value: 0 +# From 10d80eb89438b403a37b907b2c4d5995ee3bd023 Mon Sep 17 00:00:00 2001 From: Taylor Talkington Date: Wed, 27 Dec 2023 02:24:16 -0500 Subject: [PATCH 048/236] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Binary=20File=20?= =?UTF-8?q?Transfer=20(BFT)=20Protocol=20(#26570)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/BinaryFileTransferProtocol.md | 234 +++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 docs/BinaryFileTransferProtocol.md diff --git a/docs/BinaryFileTransferProtocol.md b/docs/BinaryFileTransferProtocol.md new file mode 100644 index 000000000000..46c1bf9718cf --- /dev/null +++ b/docs/BinaryFileTransferProtocol.md @@ -0,0 +1,234 @@ +# Marlin Binary File Transfer (BFT) +Marlin is capable of transferring binary data to the internal storage (SD card) via serial when built with `BINARY_FILE_TRANSFER` enabled. The following is a description of the binary protocol that must be used to conduct transfers once the printer is in binary mode after running `M28 B1`. + +## Data Endianness +All data structures are **little-endian**! This means that when constructing the packets with multi-byte values, the lower bits are packed first. For example, each packet should start with a 16-bit start token with the value of `0xB5AD`. The data itself should start with a value of `0xAD` followed by `0xB5` etc. + +An example Connection SYNC packet, which is only a header and has no payload: +``` + S S P P P H + t y r a a e + a n o c y a + r c t k l d + t o e o e + c t a r + o d + l t C + y l S + p e + e n +---- -- - - ---- ---- +ADB5 00 0 1 0000 0103 +``` + +## Packet Header + +``` + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 ++-------------------------------+---------------+-------+-------+ +| Start Token (0xB5AD) | Sync Number | Prot- | Pack- | +| | | ocol | et | +| | | ID | Type | ++-------------------------------+---------------+-------+-------+ +| Payload Length | Header Checksum | ++-------------------------------+-------------------------------+ +``` + +| Field | Width | Description | +|-----------------|---------|---| +| Start Token | 16 bits | Each packet must start with the 16-bit value `0xB5AD`. | +| Sync Number | 8 bits | Synchronization value, each packet after sync should increment this value by 1. | +| Protocol ID | 4 bits | Protocol ID. `0` for Connection Control, `1` for Transfer. See Below. | +| Packet Type | 4 bits | Packet Type ID. Depends on the Protocol ID, see below. | +| Payload Length | 16 bits | Length of payload data. If this value is greater than 0, a packet payload will follow the header. | +| Header Checksum | 16 bits | 16-bit Fletchers checksum of the header data excluding the Start Token | + +## Packet Payload +If the Payload Length field of the header is non-zero, payload data is expected to follow. + +``` + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 ++-------------------------------+-------------------------------+ +| Payload Data ... | ++-------------------------------+-------------------------------+ +| ... | Packet Checksum | ++-------------------------------+-------------------------------+ +``` + +| Field | Width | Description | +|-----------------|------------------------|---| +| Payload Data | Payload Length bytes | Payload data. This should be no longer than the buffer length reported by the Connection SYNC operation. | +| Packet Checksum | 16 bits | 16-bit Fletchers checksum of the header and payload, including the Header Checksum, but excluding the Start Token. | + +## Fletchers Checksum +Data packets require a checksum for the header and a checksum for the entire packet if the packet has a payload. In both cases the checksum does not include the first two bytes of the packet, the Start Token. + +A simple example implementation: +```c++ +uint16_t cs = 0; +for (size_t i = 2; i> 8) + cslow) % 255) << 8) | cslow; +} +``` + +## General Responses + +### ok +All packets **except** the SYNC Packet (see below) are acknowledged by an `ok` message. This acknowledgement only signifies the client has received the packet and that the header was well formed. An `ok` acknowledgement does not signify successful operation in cases where the client also sends detailed response messages (see details on packet types below). Most notably, with the current implementation the client will still respond `ok` when a client sends multiple packets with the same Sync Number, but will not send the proper response or any errors. + +**NOTE**: The `ok` acknowledgement is sent before any packet type specific output. The `SYNC` value should match the Sync Number of the last packet sent, and the next packet sent should use a Sync Number of this value + 1. + +Example: +``` +ok1 +``` + +### rs +In the case of a packet being sent out of order, where the Sync Number is not the previous Sync Number + 1, an `rs` message will be sent with the last Sync Number received. + +Example: +``` +rs1 +``` + +## Connection Control (`Protocol ID` 0) +`Protocol ID` 0 packets control the binary connection itself. There are only 2 types: + +| Packet Type | Name | Description | +|---|---|---| +| 1 | SYNC | Synchronize host and client and get connection info. | +| 2 | CLOSE | Close the binary connection and switch back to ASCII. | + +### SYNC Packet +A SYNC packet should be the first packet sent by a host after enabling binary mode. On success, a sync response will be sent. + +**Note**: This is the only packet that is not acknowledged with an `ok` response. + +Returns a sync response: +``` +ss,,.. +``` + +| Value | Description | +|---|---| +| SYNC | The current Sync Number, this should be used in the next packet sent and incremented by 1 for each packet sent after. | +| BUFFER_SIZE | The client buffer size. Packet Payload Length must not exceed this value. | +| VERSION_MAJOR | The major version number of the client Marlin BFT protocol, e.g., `0`. | +| VERSION_MINOR | The minor version number of the client Marlin BFT protocol, e.g., `1`. | +| VERSION_PATCH | The patch version number of the client Marlin BFT protocol, e.g., `0`. | + +Example response: +``` +ss0,96,0.1.0 +``` + +### CLOSE Packet +A CLOSE packet should be the last packet sent by a host. On success, the client will switch back to ASCII mode. + +## Transfer Control (`Protocol ID` 1) +`Protocol ID` 1 packets control the file transfers performed over the connection: + +| Packet Type | Name | Description | +|---|---|---| +| 0 | QUERY | Query the client protocol details and compression parameters. | +| 1 | OPEN | Open a file for writing and begin accepting data to transfer. | +| 2 | CLOSE | Finish writing and close the current file. | +| 3 | WRITE | Write data to an open file. | +| 4 | ABORT | Abort file transfer. | + +### QUERY Packet +A QUERY packet should be the second packet sent by a host, after a SYNC packet. On success a query response will be sent in addition to an `ok` acknowledgement. + +Returns a query response: +``` +PFT:version:..:compression:(,) +``` + +| Value | Description | +|---|---| +| VERSION_MAJOR | The major version number of the client Marlin BFT protocol, e.g., `0`. | +| VERSION_MINOR | The minor version number of the client Marlin BFT protocol, e.g., `1`. | +| VERSION_PATCH | The patch version number of the client Marlin BFT protocol, e.g., `0`. | +| COMPRESSION_ALGO | Compression algorithm. Currently either `heatshrink` or `none` | +| COMPRESSION_PARAMS | Compression parameters, separated by commas. Currently, if `COMPRESSION_AGLO` is heatshrink, this will be the window size and lookahead size. | + +Example response: +``` +PFT:version:0.1.0:compression:heatshrink,8,4 +``` + +### OPEN Packet +Opens a file for writing. The filename and other options are specified in the Packet Payload. The filename can be a long filename if the firmware is compiled with support, however the entire Packet Payload must not be longer than the buffer length returned by the SYNC Packet. The filename value must include a null terminator. + +Payload: +``` + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 ++---------------+---------------+-------------------------------+ +| Dummy | Compression | Filename | ++---------------------------------------------------------------| +| ... | ++-------------------------------+-------------------------------+ +| ... | NULL (0x0) | Packet Checksum | ++-------------------------------+-------------------------------+ +``` + +| Field | Width | Description | +|-----------------|------------------------|---| +| Dummy | 8 bits | A boolean value indicating if this file transfer should be actually carried out or not. If `1`, the client will respond as if the file is opened and accept data transfer, but no data will be written. | +| Compression | 8 bits | A boolean value indicating if the data to be transferred will be compressed using the algorithm and parameters returned in the QUERY Packet. | +| Filename | ... | A filename including a null terminator byte. | +| Packet Checksum | 16 bits | 16-bit Fletchers checksum of the header and payload, including the Header Checksum, but excluding the Start Token. | + +Responses: + +| Response | Description | +|---|---| +| `PFT:success` | File opened and ready for write. | +| `PFT:fail` | The client couldn't open the file. | +| `PFT:busy` | The file is already open. | + +### CLOSE Packet +Closes the currently open file. + +Responses: + +| Response | Description | +|---|---| +| `PFT:success` | Buffer flushed and file closed. | +| `PFT:ioerror` | Client storage device failure. | +| `PFT:invalid` | No file open. | + +### WRITE Packet +Writes payload data to the currently open file. If the file was opened with Compression set to 1, the data will be decompressed first. Payload Length must not exceed the buffer size returned by the SYNC Packet. + +Responses: +On success, an `ok` response will be sent. On error, an `ok` response will be followed by an error response: + +| Response | Description | +|---|---| +| `PFT:ioerror` | Client storage device failure. | +| `PFT:invalid` | No file open. | + +### ABORT Packet +Closes the currently open file and remove it. + +Responses: + +| Response | Description | +|---|---| +| `PFT:success` | Transfer aborted, file removed. | + +## Typical Usage + +1. Send ASCII command `M28 B1` to initiate Binary Transfer mode. +2. Send Connection SYNC Packet, record Sync Number and Buffer Size. +3. Send Transfer QUERY Packet, using Sync Number from above. Record compression algorithm and parameters. +4. Send Transfer OPEN Packet, using last Sync Number + 1, filename and compression options. If error, send Connection CLOSE Packet and abort. +5. Send Transfer Write Packets, using last Sync Number + 1 with the file data. The Payload Length must not exceed the Buffer Size reported in step 2. On error, send a Transfer ABORT Packet, followed by a Connection CLOSE Packet and then abort transfer. +6. Send Transfer CLOSE Packet, using last Sync Number + 1. +7. Send Connection CLOSE Packet, using last Sync Number + 1. +8. Client is now in ASCII mode, transfer complete From 15f26b402123d087f62728e1f1763a2b96f8d21d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Dec 2023 01:25:51 -0600 Subject: [PATCH 049/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20AS?= =?UTF-8?q?=5FCHAR=20=3D>=20C=20(#26569)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp | 2 +- Marlin/src/HAL/shared/Delay.cpp | 2 +- Marlin/src/core/debug_section.h | 2 +- Marlin/src/core/mstring.h | 2 +- Marlin/src/core/serial.h | 2 +- Marlin/src/core/types.h | 4 ++-- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 22 +++++++++--------- Marlin/src/feature/encoder_i2c.cpp | 8 +++---- Marlin/src/feature/encoder_i2c.h | 10 ++++---- Marlin/src/feature/max7219.cpp | 2 +- Marlin/src/feature/meatpack.cpp | 2 +- Marlin/src/feature/mixing.cpp | 6 ++--- Marlin/src/feature/runout.cpp | 2 +- Marlin/src/gcode/bedlevel/G35.cpp | 4 ++-- Marlin/src/gcode/calibrate/G33.cpp | 2 +- Marlin/src/gcode/calibrate/M48.cpp | 2 +- Marlin/src/gcode/calibrate/M666.cpp | 2 +- Marlin/src/gcode/config/M92.cpp | 2 +- Marlin/src/gcode/control/M605.cpp | 2 +- Marlin/src/gcode/feature/advance/M900.cpp | 2 +- Marlin/src/gcode/feature/ft_motion/M493.cpp | 20 ++++++++-------- Marlin/src/gcode/feature/pause/G61.cpp | 2 +- Marlin/src/gcode/feature/trinamic/M569.cpp | 2 +- Marlin/src/gcode/feature/trinamic/M919.cpp | 2 +- Marlin/src/gcode/host/M360.cpp | 2 +- Marlin/src/gcode/parser.cpp | 2 +- Marlin/src/gcode/units/M149.cpp | 2 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 4 ++-- Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp | 4 ++-- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 8 +++---- Marlin/src/lcd/marlinui.cpp | 4 ++-- Marlin/src/module/motion.cpp | 24 ++++++++++---------- Marlin/src/module/temperature.cpp | 2 +- 33 files changed, 80 insertions(+), 80 deletions(-) diff --git a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp index 5ebd437c1e15..4f1797dc6a7d 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp @@ -91,7 +91,7 @@ bool PersistentStore::access_finish() { static void debug_rw(const bool write, int &pos, const uint8_t *value, const size_t size, const FRESULT s, const size_t total=0) { #if ENABLED(DEBUG_SD_EEPROM_EMULATION) FSTR_P const rw_str = write ? F("write") : F("read"); - SERIAL_ECHOLN(AS_CHAR(' '), rw_str, F("_data("), pos, AS_CHAR(','), *value, AS_CHAR(','), size, F(", ...)")); + SERIAL_ECHOLN(C(' '), rw_str, F("_data("), pos, C(','), *value, C(','), size, F(", ...)")); if (total) SERIAL_ECHOLN(F(" f_"), rw_str, F("()="), s, F("\n size="), size, F("\n bytes_"), write ? F("written=") : F("read="), total); else diff --git a/Marlin/src/HAL/shared/Delay.cpp b/Marlin/src/HAL/shared/Delay.cpp index 31c3f4576539..fd52eb2c6a39 100644 --- a/Marlin/src/HAL/shared/Delay.cpp +++ b/Marlin/src/HAL/shared/Delay.cpp @@ -109,7 +109,7 @@ #if ENABLED(MARLIN_DEV_MODE) void dump_delay_accuracy_check() { auto report_call_time = [](FSTR_P const name, FSTR_P const unit, const uint32_t cycles, const uint32_t total, const bool do_flush=true) { - SERIAL_ECHOLN(F("Calling "), name, F(" for "), cycles, AS_CHAR(' '), unit, F(" took: "), total, AS_CHAR(' '), unit); + SERIAL_ECHOLN(F("Calling "), name, F(" for "), cycles, C(' '), unit, F(" took: "), total, C(' '), unit); if (do_flush) SERIAL_FLUSHTX(); }; diff --git a/Marlin/src/core/debug_section.h b/Marlin/src/core/debug_section.h index eb3d12fdf54e..6319515b71e1 100644 --- a/Marlin/src/core/debug_section.h +++ b/Marlin/src/core/debug_section.h @@ -39,7 +39,7 @@ class SectionLog { void echo_msg(FSTR_P const fpre) { SERIAL_ECHO(fpre); - if (the_msg) SERIAL_ECHO(AS_CHAR(' '), the_msg); + if (the_msg) SERIAL_ECHO(C(' '), the_msg); SERIAL_CHAR(' '); print_xyz(xyz_pos_t(current_position)); } diff --git a/Marlin/src/core/mstring.h b/Marlin/src/core/mstring.h index 819c1ab74f6f..31e8c8c6e6ec 100644 --- a/Marlin/src/core/mstring.h +++ b/Marlin/src/core/mstring.h @@ -98,7 +98,7 @@ class MString { void debug(FSTR_P const f) { #if ENABLED(MSTRING_DEBUG) - SERIAL_ECHOLN(f, AS_CHAR(':'), uintptr_t(str), AS_CHAR(' '), length(), AS_CHAR(' '), str); + SERIAL_ECHOLN(f, C(':'), uintptr_t(str), C(' '), length(), C(' '), str); #endif } diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index 721d27211b88..ff02ebedc2d7 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -148,7 +148,7 @@ template void SERIAL_ECHOLN(T x) { SERIAL_IMPL.println(x); } // Wrapper for ECHO commands to interpret a char void SERIAL_ECHO(serial_char_t x); -#define AS_DIGIT(C) AS_CHAR('0' + (C)) +#define AS_DIGIT(n) C('0' + (n)) // Print an integer with a numeric base such as PrintBase::Hex template void SERIAL_PRINT(T x, PrintBase y) { SERIAL_IMPL.print(x, y); } diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index 74a60fa4087b..3d1250346125 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -298,9 +298,9 @@ typedef IF 255)), uint16_t, uint8_t>::ty #define MMM_TO_MMS(MM_M) feedRate_t(static_cast(MM_M) / 60.0f) #define MMS_TO_MMM(MM_S) (static_cast(MM_S) * 60.0f) -// Packaged character for AS_CHAR macro and other usage +// Packaged character for C macro and other usage typedef struct SerialChar { char c; SerialChar(char n) : c(n) { } } serial_char_t; -#define AS_CHAR(C) serial_char_t(C) +#define C(c) serial_char_t(c) // Packaged types: float with precision and/or width; a repeated space/character typedef struct WFloat { float value; char width; char prec; diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 3d0013b6d2da..c61a84894aec 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -465,7 +465,7 @@ void unified_bed_leveling::G29() { SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh."); } if (param.V_verbosity > 1) - SERIAL_ECHOLN(F("Probing around ("), param.XY_pos.x, AS_CHAR(','), param.XY_pos.y, F(").\n")); + SERIAL_ECHOLN(F("Probing around ("), param.XY_pos.x, C(','), param.XY_pos.y, F(").\n")); probe_entire_mesh(param.XY_pos, parser.seen_test('T'), parser.seen_test('E'), parser.seen_test('U')); report_current_position(); @@ -1572,14 +1572,14 @@ void unified_bed_leveling::smart_fill_mesh() { if (DEBUGGING(LEVELING)) { #if ENABLED(UBL_TILT_ON_MESH_POINTS) const xy_pos_t oldLpos = oldRpos.asLogical(); - DEBUG_ECHO(F("Calculated point: ("), p_float_t(oldRpos.x, 7), AS_CHAR(','), p_float_t(oldRpos.y, 7), - F(") logical: ("), p_float_t(oldLpos.x, 7), AS_CHAR(','), p_float_t(oldLpos.y, 7), + DEBUG_ECHO(F("Calculated point: ("), p_float_t(oldRpos.x, 7), C(','), p_float_t(oldRpos.y, 7), + F(") logical: ("), p_float_t(oldLpos.x, 7), C(','), p_float_t(oldLpos.y, 7), F(")\nSelected mesh point: ") ); #endif const xy_pos_t lpos = rpos.asLogical(); - DEBUG_ECHO( AS_CHAR('('), p_float_t(rpos.x, 7), AS_CHAR(','), p_float_t(rpos.y, 7), - F(") logical: ("), p_float_t(lpos.x, 7), AS_CHAR(','), p_float_t(lpos.y, 7), + DEBUG_ECHO( C('('), p_float_t(rpos.x, 7), C(','), p_float_t(rpos.y, 7), + F(") logical: ("), p_float_t(lpos.x, 7), C(','), p_float_t(lpos.y, 7), F(") measured: "), p_float_t(measured_z, 7), F(" correction: "), p_float_t(zcorr, 7) ); @@ -1614,7 +1614,7 @@ void unified_bed_leveling::smart_fill_mesh() { vector_3 normal = vector_3(lsf_results.A, lsf_results.B, 1).get_normal(); if (param.V_verbosity > 2) - SERIAL_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), AS_CHAR(','), p_float_t(normal.y, 7), AS_CHAR(','), p_float_t(normal.z, 7), AS_CHAR(']')); + SERIAL_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), C(','), p_float_t(normal.y, 7), C(','), p_float_t(normal.z, 7), C(']')); matrix_3x3 rotation = matrix_3x3::create_look_at(vector_3(lsf_results.A, lsf_results.B, 1)); @@ -1622,14 +1622,14 @@ void unified_bed_leveling::smart_fill_mesh() { float mx = get_mesh_x(i), my = get_mesh_y(j), mz = z_values[i][j]; if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> ")); + DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> ")); DEBUG_DELAY(20); } rotation.apply_rotation_xyz(mx, my, mz); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> ")); + DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> ")); DEBUG_DELAY(20); } @@ -1641,7 +1641,7 @@ void unified_bed_leveling::smart_fill_mesh() { rotation.debug(F("rotation matrix:\n")); DEBUG_ECHOLN(F("LSF Results A="), p_float_t(lsf_results.A, 7), F(" B="), p_float_t(lsf_results.B, 7), F(" D="), p_float_t(lsf_results.D, 7)); DEBUG_DELAY(55); - DEBUG_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), AS_CHAR(','), p_float_t(normal.y, 7), AS_CHAR(','), p_float_t(normal.z, 7), AS_CHAR(']')); + DEBUG_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), C(','), p_float_t(normal.y, 7), C(','), p_float_t(normal.z, 7), C(']')); DEBUG_EOL(); /** @@ -1659,7 +1659,7 @@ void unified_bed_leveling::smart_fill_mesh() { }; auto debug_pt = [](const int num, const xy_pos_t &pos, const_float_t zadd) { d_from(); - DEBUG_ECHOLN(F("Point "), num, AS_CHAR(':'), p_float_t(normed(pos, zadd), 6), F(" Z error = "), p_float_t(zadd - get_z_correction(pos), 6)); + DEBUG_ECHOLN(F("Point "), num, C(':'), p_float_t(normed(pos, zadd), 6), F(" Z error = "), p_float_t(zadd - get_z_correction(pos), 6)); }; debug_pt(1, probe_pt[0], normal.z * gotz[0]); debug_pt(2, probe_pt[1], normal.z * gotz[1]); @@ -1668,7 +1668,7 @@ void unified_bed_leveling::smart_fill_mesh() { constexpr xy_float_t safe_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT }; d_from(); DEBUG_ECHOLN(F("safe home with Z="), F("0 : "), p_float_t(normed(safe_xy, 0), 6)); d_from(); DEBUG_ECHOLN(F("safe home with Z="), F("mesh value "), p_float_t(normed(safe_xy, get_z_correction(safe_xy)), 6)); - DEBUG_ECHO(F(" Z error = ("), Z_SAFE_HOMING_X_POINT, AS_CHAR(','), Z_SAFE_HOMING_Y_POINT, F(") = "), p_float_t(get_z_correction(safe_xy), 6)); + DEBUG_ECHO(F(" Z error = ("), Z_SAFE_HOMING_X_POINT, C(','), Z_SAFE_HOMING_Y_POINT, F(") = "), p_float_t(get_z_correction(safe_xy), 6)); #endif #endif } // DEBUGGING(LEVELING) diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index a367cea48dc6..5a0564ee71d1 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -49,7 +49,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) { initialized = true; - SERIAL_ECHOLNPGM("Setting up encoder on ", AS_CHAR(AXIS_CHAR(encoderAxis)), " axis, addr = ", address); + SERIAL_ECHOLNPGM("Setting up encoder on ", C(AXIS_CHAR(encoderAxis)), " axis, addr = ", address); position = get_position(); } @@ -67,7 +67,7 @@ void I2CPositionEncoder::update() { /* if (trusted) { //commented out as part of the note below trusted = false; - SERIAL_ECHOLNPGM("Fault detected on ", AS_CHAR(AXIS_CHAR(encoderAxis)), " axis encoder. Disengaging error correction until module is trusted again."); + SERIAL_ECHOLNPGM("Fault detected on ", C(AXIS_CHAR(encoderAxis)), " axis encoder. Disengaging error correction until module is trusted again."); } */ return; @@ -92,7 +92,7 @@ void I2CPositionEncoder::update() { if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) { trusted = true; - SERIAL_ECHOLNPGM("Untrusted encoder module on ", AS_CHAR(AXIS_CHAR(encoderAxis)), " axis has been fault-free for set duration, reinstating error correction."); + SERIAL_ECHOLNPGM("Untrusted encoder module on ", C(AXIS_CHAR(encoderAxis)), " axis has been fault-free for set duration, reinstating error correction."); //the encoder likely lost its place when the error occurred, so we'll reset and use the printer's //idea of where it the axis is to re-initialize @@ -106,7 +106,7 @@ void I2CPositionEncoder::update() { SERIAL_ECHOLNPGM("Current position is ", pos); SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks); SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset); - SERIAL_ECHOLN(F("New position reads as "), get_position(), AS_CHAR('('), mm_from_count(get_position()), AS_CHAR(')')); + SERIAL_ECHOLN(F("New position reads as "), get_position(), C('('), mm_from_count(get_position()), C(')')); #endif } #endif diff --git a/Marlin/src/feature/encoder_i2c.h b/Marlin/src/feature/encoder_i2c.h index 1ae05d1433b3..861a8e52d4d6 100644 --- a/Marlin/src/feature/encoder_i2c.h +++ b/Marlin/src/feature/encoder_i2c.h @@ -261,32 +261,32 @@ class I2CPositionEncodersMgr { static void report_error_count(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); - SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(AXIS_CHAR(axis)), " axis is ", encoders[idx].get_error_count()); + SERIAL_ECHOLNPGM("Error count on ", C(AXIS_CHAR(axis)), " axis is ", encoders[idx].get_error_count()); } static void reset_error_count(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_error_count(0); - SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(AXIS_CHAR(axis)), " axis has been reset."); + SERIAL_ECHOLNPGM("Error count on ", C(AXIS_CHAR(axis)), " axis has been reset."); } static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_ec_enabled(enabled); - SERIAL_ECHOPGM("Error correction on ", AS_CHAR(AXIS_CHAR(axis))); + SERIAL_ECHOPGM("Error correction on ", C(AXIS_CHAR(axis))); SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n"); } static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_ec_threshold(newThreshold); - SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(AXIS_CHAR(axis)), " axis set to ", newThreshold, "mm."); + SERIAL_ECHOLNPGM("Error correct threshold for ", C(AXIS_CHAR(axis)), " axis set to ", newThreshold, "mm."); } static void get_ec_threshold(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); const float threshold = encoders[idx].get_ec_threshold(); - SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(AXIS_CHAR(axis)), " axis is ", threshold, "mm."); + SERIAL_ECHOLNPGM("Error correct threshold for ", C(AXIS_CHAR(axis)), " axis is ", threshold, "mm."); } static int8_t idx_from_axis(const AxisEnum axis) { diff --git a/Marlin/src/feature/max7219.cpp b/Marlin/src/feature/max7219.cpp index f37c78dde575..12e4a539d3d5 100644 --- a/Marlin/src/feature/max7219.cpp +++ b/Marlin/src/feature/max7219.cpp @@ -136,7 +136,7 @@ uint8_t Max7219::suspended; // = 0; void Max7219::error(FSTR_P const func, const int32_t v1, const int32_t v2/*=-1*/) { #if ENABLED(MAX7219_ERRORS) - SERIAL_ECHO(F("??? Max7219::"), func, AS_CHAR('('), v1); + SERIAL_ECHO(F("??? Max7219::"), func, C('('), v1); if (v2 > 0) SERIAL_ECHOPGM(", ", v2); SERIAL_CHAR(')'); SERIAL_EOL(); diff --git a/Marlin/src/feature/meatpack.cpp b/Marlin/src/feature/meatpack.cpp index 5d2d112967df..fe3dabe8da53 100644 --- a/Marlin/src/feature/meatpack.cpp +++ b/Marlin/src/feature/meatpack.cpp @@ -140,7 +140,7 @@ void MeatPack::handle_output_char(const uint8_t c) { #if ENABLED(MP_DEBUG) if (chars_decoded < 1024) { ++chars_decoded; - DEBUG_ECHOLNPGM("RB: ", AS_CHAR(c)); + DEBUG_ECHOLNPGM("RB: ", C(c)); } #endif } diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index 6cf59fdb56ff..4021393f18e6 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -60,7 +60,7 @@ void Mixer::normalize(const uint8_t tool_index) { } #ifdef MIXER_NORMALIZER_DEBUG SERIAL_ECHOPGM("Mixer: Old relation : [ "); - MIXER_STEPPER_LOOP(i) SERIAL_ECHO(collector[i] / csum, AS_CHAR(' ')); + MIXER_STEPPER_LOOP(i) SERIAL_ECHO(collector[i] / csum, C(' ')); SERIAL_ECHOLNPGM("]"); #endif @@ -72,12 +72,12 @@ void Mixer::normalize(const uint8_t tool_index) { csum = 0; SERIAL_ECHOPGM("Mixer: Normalize to : [ "); MIXER_STEPPER_LOOP(i) { - SERIAL_ECHO(uint16_t(color[tool_index][i]), AS_CHAR(' ')); + SERIAL_ECHO(uint16_t(color[tool_index][i]), C(' ')); csum += color[tool_index][i]; } SERIAL_ECHOLNPGM("]"); SERIAL_ECHOPGM("Mixer: New relation : [ "); - MIXER_STEPPER_LOOP(i) SERIAL_ECHO(p_float_t(uint16_t(color[tool_index][i]) / csum, 3), AS_CHAR(' ')); + MIXER_STEPPER_LOOP(i) SERIAL_ECHO(p_float_t(uint16_t(color[tool_index][i]) / csum, 3), C(' ')); SERIAL_ECHOLNPGM("]"); #endif diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index 90d3d2fd652b..1d684c6b856a 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -135,7 +135,7 @@ void event_filament_runout(const uint8_t extruder) { if (run_runout_script) { #if MULTI_FILAMENT_SENSOR MString script; - script.setf(F(FILAMENT_RUNOUT_SCRIPT), AS_CHAR(tool)); + script.setf(F(FILAMENT_RUNOUT_SCRIPT), C(tool)); #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) SERIAL_ECHOLNPGM("Runout Command: ", &script); #endif diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 224dd2a0aa2d..8e11383166fb 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -100,7 +100,7 @@ void GcodeSuite::G35() { const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE); if (isnan(z_probed_height)) { SERIAL_ECHO( - F("G35 failed at point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), AS_CHAR(')'), + F("G35 failed at point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'), FPSTR(SP_X_STR), tramming_points[i].x, FPSTR(SP_Y_STR), tramming_points[i].y ); err_break = true; @@ -109,7 +109,7 @@ void GcodeSuite::G35() { if (DEBUGGING(LEVELING)) { DEBUG_ECHOLN( - F("Probing point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), AS_CHAR(')'), + F("Probing point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'), FPSTR(SP_X_STR), tramming_points[i].x, FPSTR(SP_Y_STR), tramming_points[i].y, FPSTR(SP_Z_STR), z_probed_height ); diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 0cddf484eb6b..d8f104bfceef 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -92,7 +92,7 @@ void ac_cleanup() { } void print_signed_float(FSTR_P const prefix, const_float_t f) { - SERIAL_ECHO(F(" "), prefix, AS_CHAR(':')); + SERIAL_ECHO(F(" "), prefix, C(':')); serial_offset(f); } diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 9f285b8b8ae3..2d219a07c5fc 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -245,7 +245,7 @@ void GcodeSuite::M48() { sigma = SQRT(dev_sum / (n + 1)); if (verbose_level > 1) { - SERIAL_ECHO(n + 1, F(" of "), n_samples, F(": z: "), p_float_t(pz, 3), AS_CHAR(' ')); + SERIAL_ECHO(n + 1, F(" of "), n_samples, F(": z: "), p_float_t(pz, 3), C(' ')); dev_report(verbose_level > 2, mean, sigma, min, max); SERIAL_EOL(); } diff --git a/Marlin/src/gcode/calibrate/M666.cpp b/Marlin/src/gcode/calibrate/M666.cpp index dbee73f3947b..143b6f249a4e 100644 --- a/Marlin/src/gcode/calibrate/M666.cpp +++ b/Marlin/src/gcode/calibrate/M666.cpp @@ -52,7 +52,7 @@ is_err = true; else { delta_endstop_adj[i] = v; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", C(AXIS_CHAR(i)), "] = ", v); } } } diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 01b32118c825..09153c51fd49 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -82,7 +82,7 @@ void GcodeSuite::M92() { if (wanted) { const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm; SERIAL_ECHOPGM(", best:[", best); - if (best != wanted) { SERIAL_ECHO(AS_CHAR(','), best + z_full_step_mm); } + if (best != wanted) { SERIAL_ECHO(C(','), best + z_full_step_mm); } SERIAL_CHAR(']'); } SERIAL_ECHOLNPGM(" }"); diff --git a/Marlin/src/gcode/control/M605.cpp b/Marlin/src/gcode/control/M605.cpp index 6bf99df4c27a..167cdae4a931 100644 --- a/Marlin/src/gcode/control/M605.cpp +++ b/Marlin/src/gcode/control/M605.cpp @@ -144,7 +144,7 @@ HOTEND_LOOP() { DEBUG_ECHOPGM_P(SP_T_STR, e); - LOOP_NUM_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]); + LOOP_NUM_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", C(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]); DEBUG_EOL(); } DEBUG_EOL(); diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index 28cc4f80472a..5fa9c04dbd2a 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -131,7 +131,7 @@ void GcodeSuite::M900() { SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]); #else SERIAL_ECHOPGM("Advance K"); - EXTRUDER_LOOP() SERIAL_ECHO(AS_CHAR(' '), AS_CHAR('0' + e), AS_CHAR(':'), planner.extruder_advance_K[e]); + EXTRUDER_LOOP() SERIAL_ECHO(C(' '), C('0' + e), C(':'), planner.extruder_advance_K[e]); SERIAL_EOL(); #endif diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index fd95a3b7baf8..7f202be4138c 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -257,10 +257,10 @@ void GcodeSuite::M493() { flag.update_n = flag.reset_ft = flag.report_h = true; } else // Frequency out of range. - SERIAL_ECHOLNPGM("Invalid [", AS_CHAR('A'), "] frequency value."); + SERIAL_ECHOLNPGM("Invalid [", C('A'), "] frequency value."); } else // Mode doesn't use frequency. - SERIAL_ECHOLNPGM("Wrong mode for [", AS_CHAR('A'), "] frequency."); + SERIAL_ECHOLNPGM("Wrong mode for [", C('A'), "] frequency."); } #if HAS_DYNAMIC_FREQ @@ -271,7 +271,7 @@ void GcodeSuite::M493() { flag.report_h = true; } else - SERIAL_ECHOLNPGM("Wrong mode for [", AS_CHAR('F'), "] frequency scaling."); + SERIAL_ECHOLNPGM("Wrong mode for [", C('F'), "] frequency scaling."); } #endif @@ -284,7 +284,7 @@ void GcodeSuite::M493() { flag.update_n = flag.update_a = true; } else - SERIAL_ECHOLNPGM("Invalid X zeta [", AS_CHAR('I'), "] value."); // Zeta out of range. + SERIAL_ECHOLNPGM("Invalid X zeta [", C('I'), "] value."); // Zeta out of range. } else SERIAL_ECHOLNPGM("Wrong mode for zeta parameter."); @@ -299,7 +299,7 @@ void GcodeSuite::M493() { flag.update_a = true; } else - SERIAL_ECHOLNPGM("Invalid X vtol [", AS_CHAR('Q'), "] value."); // VTol out of range. + SERIAL_ECHOLNPGM("Invalid X vtol [", C('Q'), "] value."); // VTol out of range. } else SERIAL_ECHOLNPGM("Wrong mode for vtol parameter."); @@ -318,10 +318,10 @@ void GcodeSuite::M493() { flag.update_n = flag.reset_ft = flag.report_h = true; } else // Frequency out of range. - SERIAL_ECHOLNPGM("Invalid frequency [", AS_CHAR('B'), "] value."); + SERIAL_ECHOLNPGM("Invalid frequency [", C('B'), "] value."); } else // Mode doesn't use frequency. - SERIAL_ECHOLNPGM("Wrong mode for [", AS_CHAR('B'), "] frequency."); + SERIAL_ECHOLNPGM("Wrong mode for [", C('B'), "] frequency."); } #if HAS_DYNAMIC_FREQ @@ -332,7 +332,7 @@ void GcodeSuite::M493() { flag.report_h = true; } else - SERIAL_ECHOLNPGM("Wrong mode for [", AS_CHAR('H'), "] frequency scaling."); + SERIAL_ECHOLNPGM("Wrong mode for [", C('H'), "] frequency scaling."); } #endif @@ -345,7 +345,7 @@ void GcodeSuite::M493() { flag.update_n = flag.update_a = true; } else - SERIAL_ECHOLNPGM("Invalid Y zeta [", AS_CHAR('J'), "] value."); // Zeta Out of range + SERIAL_ECHOLNPGM("Invalid Y zeta [", C('J'), "] value."); // Zeta Out of range } else SERIAL_ECHOLNPGM("Wrong mode for zeta parameter."); @@ -360,7 +360,7 @@ void GcodeSuite::M493() { flag.update_a = true; } else - SERIAL_ECHOLNPGM("Invalid Y vtol [", AS_CHAR('R'), "] value."); // VTol out of range. + SERIAL_ECHOLNPGM("Invalid Y vtol [", C('R'), "] value."); // VTol out of range. } else SERIAL_ECHOLNPGM("Wrong mode for vtol parameter."); diff --git a/Marlin/src/gcode/feature/pause/G61.cpp b/Marlin/src/gcode/feature/pause/G61.cpp index 423632e72e0a..068e0b0e40ee 100644 --- a/Marlin/src/gcode/feature/pause/G61.cpp +++ b/Marlin/src/gcode/feature/pause/G61.cpp @@ -87,7 +87,7 @@ void GcodeSuite::G61() { destination[i] = parser.seen(AXIS_CHAR(i)) ? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i) : current_position[i]; - DEBUG_ECHO(AS_CHAR(' '), AS_CHAR(AXIS_CHAR(i)), p_float_t(destination[i], 2)); + DEBUG_ECHO(C(' '), C(AXIS_CHAR(i)), p_float_t(destination[i], 2)); } DEBUG_EOL(); // Move to the saved position diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index 6f1af7b68155..b4e6a13c52a6 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -160,7 +160,7 @@ void GcodeSuite::M569_report(const bool forReplay/*=true*/) { auto say_M569 = [](const bool forReplay, FSTR_P const etc=nullptr, const bool eol=false) { if (!forReplay) SERIAL_ECHO_START(); SERIAL_ECHOPGM(" M569 S1"); - if (etc) SERIAL_ECHO(AS_CHAR(' '), etc); + if (etc) SERIAL_ECHO(C(' '), etc); if (eol) SERIAL_EOL(); }; diff --git a/Marlin/src/gcode/feature/trinamic/M919.cpp b/Marlin/src/gcode/feature/trinamic/M919.cpp index 0e9343f6999d..4ee004291d85 100644 --- a/Marlin/src/gcode/feature/trinamic/M919.cpp +++ b/Marlin/src/gcode/feature/trinamic/M919.cpp @@ -118,7 +118,7 @@ void GcodeSuite::M919() { // Get the chopper timing for the specified axis and index switch (i) { default: // A specified axis isn't Trinamic - SERIAL_ECHOLNPGM("?Axis ", AS_CHAR(AXIS_CHAR(i)), " has no TMC drivers."); + SERIAL_ECHOLNPGM("?Axis ", C(AXIS_CHAR(i)), " has no TMC drivers."); break; #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) diff --git a/Marlin/src/gcode/host/M360.cpp b/Marlin/src/gcode/host/M360.cpp index 87aad88952f0..3986200e0809 100644 --- a/Marlin/src/gcode/host/M360.cpp +++ b/Marlin/src/gcode/host/M360.cpp @@ -37,7 +37,7 @@ static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8 SERIAL_ECHOPGM("Config:"); if (pref) SERIAL_ECHOPGM_P(pref); if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); } - SERIAL_ECHOPGM_P(name, AS_CHAR(':')); + SERIAL_ECHOPGM_P(name, C(':')); } static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) { config_prefix(name, pref, ind); diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index 646e362517a3..16c3b2d9bd0b 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -339,7 +339,7 @@ void GCodeParser::parse(char *p) { #if ENABLED(DEBUG_GCODE_PARSER) if (debug) { - SERIAL_ECHOPGM("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1); + SERIAL_ECHOPGM("Got param ", C(param), " at index ", p - command_ptr - 1); if (has_val) SERIAL_ECHOPGM(" (has_val)"); } #endif diff --git a/Marlin/src/gcode/units/M149.cpp b/Marlin/src/gcode/units/M149.cpp index 43091b6710e7..bd9d8d486cb5 100644 --- a/Marlin/src/gcode/units/M149.cpp +++ b/Marlin/src/gcode/units/M149.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M149() { void GcodeSuite::M149_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, F(STR_TEMPERATURE_UNITS)); - SERIAL_ECHOLN(F(" M149 "), AS_CHAR(parser.temp_units_code()), F(" ; Units in "), parser.temp_units_name()); + SERIAL_ECHOLN(F(" M149 "), C(parser.temp_units_code()), F(" ; Units in "), parser.temp_units_name()); } #endif // TEMPERATURE_UNITS_SUPPORT diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 847c4bfd088f..da6fda08d52d 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -294,14 +294,14 @@ class TextScroller { float mx = bedlevel.get_mesh_x(i), my = bedlevel.get_mesh_y(j), mz = bedlevel.z_values[i][j]; if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> ")); + DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> ")); DEBUG_DELAY(20); } rotation.apply_rotation_xyz(mx, my, mz); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), AS_CHAR(']')); + DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), C(']')); DEBUG_DELAY(20); } diff --git a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp index 796c87e47e21..2e3f360ee726 100644 --- a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp +++ b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp @@ -108,14 +108,14 @@ bool drawing_mesh = false; float mx = bedlevel.get_mesh_x(i), my = bedlevel.get_mesh_y(j), mz = bedlevel.z_values[i][j]; if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> ")); + DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> ")); DEBUG_DELAY(20); } rotation.apply_rotation_xyz(mx, my, mz); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> ")); + DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> ")); DEBUG_DELAY(20); } diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index 4833ab96ab77..c29a2dd4044c 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -139,10 +139,10 @@ bool NextionTFT::readTFTCommand() { #if NEXDEBUG(N_SOME) uint8_t req = atoi(&nextion_command[1]); if (req > 7 && req != 20) - DEBUG_ECHOLNPGM( "> ", AS_CHAR(nextion_command[0]), - "\n> ", AS_CHAR(nextion_command[1]), - "\n> ", AS_CHAR(nextion_command[2]), - "\n> ", AS_CHAR(nextion_command[3]), + DEBUG_ECHOLNPGM( "> ", C(nextion_command[0]), + "\n> ", C(nextion_command[1]), + "\n> ", C(nextion_command[2]), + "\n> ", C(nextion_command[3]), "\nprinter_state:", printer_state); #endif } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 4c5dec47616c..73094761822d 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -865,7 +865,7 @@ void MarlinUI::init() { TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder ); - //SERIAL_ECHOLNPGM("Add planner.move with Axis ", AS_CHAR(AXIS_CHAR(axis)), " at FR ", fr_mm_s); + //SERIAL_ECHOLNPGM("Add planner.move with Axis ", C(AXIS_CHAR(axis)), " at FR ", fr_mm_s); axis = NO_AXIS_ENUM; @@ -882,7 +882,7 @@ void MarlinUI::init() { TERN_(MULTI_E_MANUAL, if (move_axis == E_AXIS) e_index = eindex); start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves axis = move_axis; - //SERIAL_ECHOLNPGM("Post Move with Axis ", AS_CHAR(AXIS_CHAR(axis)), " soon."); + //SERIAL_ECHOLNPGM("Post Move with Axis ", C(AXIS_CHAR(axis)), " soon."); } #if ENABLED(AUTO_BED_LEVELING_UBL) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 2259eedf41d4..8908c2fa734b 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -927,7 +927,7 @@ void restore_feedrate_and_scaling() { #endif if (DEBUGGING(LEVELING)) - SERIAL_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]); + SERIAL_ECHOLNPGM("Axis ", C(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]); } /** @@ -1851,7 +1851,7 @@ void prepare_line_to_destination() { const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPGM("...(", AS_CHAR(AXIS_CHAR(axis)), ", ", distance, ", "); + DEBUG_ECHOPGM("...(", C(AXIS_CHAR(axis)), ", ", distance, ", "); if (fr_mm_s) DEBUG_ECHO(fr_mm_s); else @@ -1941,12 +1941,12 @@ void prepare_line_to_destination() { * "trusted" position). */ void set_axis_never_homed(const AxisEnum axis) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_never_homed(", C(AXIS_CHAR(axis)), ")"); set_axis_untrusted(axis); set_axis_unhomed(axis); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< set_axis_never_homed(", C(AXIS_CHAR(axis)), ")"); TERN_(I2C_POSITION_ENCODERS, I2CPEM.unhomed(axis)); } @@ -2055,7 +2055,7 @@ void prepare_line_to_destination() { if (ABS(phaseDelta) * planner.mm_per_step[axis] / phasePerUStep < 0.05f) SERIAL_ECHOLNPGM("Selected home phase ", home_phase[axis], " too close to endstop trigger phase ", phaseCurrent, - ". Pick a different phase for ", AS_CHAR(AXIS_CHAR(axis))); + ". Pick a different phase for ", C(AXIS_CHAR(axis))); // Skip to next if target position is behind current. So it only moves away from endstop. if (phaseDelta < 0) phaseDelta += 1024; @@ -2066,7 +2066,7 @@ void prepare_line_to_destination() { // Optional debug messages if (DEBUGGING(LEVELING)) { DEBUG_ECHOLNPGM( - "Endstop ", AS_CHAR(AXIS_CHAR(axis)), " hit at Phase:", phaseCurrent, + "Endstop ", C(AXIS_CHAR(axis)), " hit at Phase:", phaseCurrent, " Delta:", phaseDelta, " Distance:", mmDelta ); } @@ -2100,7 +2100,7 @@ void prepare_line_to_destination() { if (true MAIN_AXIS_MAP(_ANDCANT)) return; #endif - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> homeaxis(", C(AXIS_CHAR(axis)), ")"); const int axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS) ? TOOL_X_HOME_DIR(active_extruder) : home_dir(axis); @@ -2189,7 +2189,7 @@ void prepare_line_to_destination() { default: break; } if (TEST(endstops.state(), es)) { - SERIAL_ECHO_MSG("Bad ", AS_CHAR(AXIS_CHAR(axis)), " Endstop?"); + SERIAL_ECHO_MSG("Bad ", C(AXIS_CHAR(axis)), " Endstop?"); kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED)); } #endif @@ -2409,7 +2409,7 @@ void prepare_line_to_destination() { if (axis == Z_AXIS) fwretract.current_hop = 0.0; #endif - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< homeaxis(", C(AXIS_CHAR(axis)), ")"); } // homeaxis() @@ -2434,7 +2434,7 @@ void prepare_line_to_destination() { * Callers must sync the planner position after calling this! */ void set_axis_is_at_home(const AxisEnum axis) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_is_at_home(", C(AXIS_CHAR(axis)), ")"); set_axis_trusted(axis); set_axis_homed(axis); @@ -2481,10 +2481,10 @@ void set_axis_is_at_home(const AxisEnum axis) { if (DEBUGGING(LEVELING)) { #if HAS_HOME_OFFSET - DEBUG_ECHOLNPGM("> home_offset[", AS_CHAR(AXIS_CHAR(axis)), "] = ", home_offset[axis]); + DEBUG_ECHOLNPGM("> home_offset[", C(AXIS_CHAR(axis)), "] = ", home_offset[axis]); #endif DEBUG_POS("", current_position); - DEBUG_ECHOLNPGM("<<< set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); + DEBUG_ECHOLNPGM("<<< set_axis_is_at_home(", C(AXIS_CHAR(axis)), ")"); } } diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index d3aa37c6abd6..5b4dcc83bc74 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1487,7 +1487,7 @@ void Temperature::_temp_error( OPTCODE(HAS_TEMP_CHAMBER, case H_CHAMBER: SERIAL_ECHOPGM(STR_HEATER_CHAMBER); break) OPTCODE(HAS_TEMP_BED, case H_BED: SERIAL_ECHOPGM(STR_HEATER_BED); break) default: - if (real_heater_id >= 0) SERIAL_ECHO(AS_CHAR('E'), real_heater_id); + if (real_heater_id >= 0) SERIAL_ECHO(C('E'), real_heater_id); } #if ENABLED(ERR_INCLUDE_TEMP) SERIAL_ECHOLNPGM(STR_DETECTED_TEMP_B, deg, STR_DETECTED_TEMP_E); From d903a5ef4363a1fb05d8e23381c9a62b9c0d6b42 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Dec 2023 01:27:43 -0600 Subject: [PATCH 050/236] =?UTF-8?q?=E2=9C=A8=20Initial=20support=20for=20H?= =?UTF-8?q?C32=20U8G=20LCD=20(#26568)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Chris <52449218+shadow578@users.noreply.github.com> --- Marlin/src/HAL/HC32/inc/Conditionals_LCD.h | 4 + Marlin/src/HAL/HC32/u8g/LCD_defines.h | 3 + .../HAL/HC32/u8g/u8g_com_HAL_HC32_sw_spi.cpp | 163 ++++++++++++++++++ Marlin/src/pins/hc32f4/pins_AQUILA_101.h | 15 +- 4 files changed, 177 insertions(+), 8 deletions(-) create mode 100644 Marlin/src/HAL/HC32/u8g/u8g_com_HAL_HC32_sw_spi.cpp diff --git a/Marlin/src/HAL/HC32/inc/Conditionals_LCD.h b/Marlin/src/HAL/HC32/inc/Conditionals_LCD.h index 5f1a94e9203a..8266da4b2a49 100644 --- a/Marlin/src/HAL/HC32/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/HC32/inc/Conditionals_LCD.h @@ -20,3 +20,7 @@ * */ #pragma once + +#if ALL(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI) + #define U8G_SW_SPI_HC32 1 +#endif diff --git a/Marlin/src/HAL/HC32/u8g/LCD_defines.h b/Marlin/src/HAL/HC32/u8g/LCD_defines.h index 8dc94bca7f3f..cb5a6812efd8 100644 --- a/Marlin/src/HAL/HC32/u8g/LCD_defines.h +++ b/Marlin/src/HAL/HC32/u8g/LCD_defines.h @@ -24,3 +24,6 @@ /** * HC32 LCD-specific defines */ + +uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_HC32_sw_spi_fn diff --git a/Marlin/src/HAL/HC32/u8g/u8g_com_HAL_HC32_sw_spi.cpp b/Marlin/src/HAL/HC32/u8g/u8g_com_HAL_HC32_sw_spi.cpp new file mode 100644 index 000000000000..9f360961942d --- /dev/null +++ b/Marlin/src/HAL/HC32/u8g/u8g_com_HAL_HC32_sw_spi.cpp @@ -0,0 +1,163 @@ +/** + * 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 . + * + */ + +#ifdef ARDUINO_ARCH_HC32 + +#include "../../../inc/MarlinConfig.h" + +#if U8G_SW_SPI_HC32 + +#warning "Software SPI for U8Glib is experimental on HC32F460. Please share your experiences at https://github.com/shadow578/Marlin-H32/issues/35" + +#include +#include "../../shared/HAL_SPI.h" + +#ifndef LCD_SPI_SPEED + #define LCD_SPI_SPEED SPI_FULL_SPEED // Fastest + //#define LCD_SPI_SPEED SPI_QUARTER_SPEED // Slower +#endif + +static uint8_t SPI_speed = LCD_SPI_SPEED; + +static inline uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t miso_pin=-1) { + for (i = 0; i < 8; ++i) { + if (spi_speed == 0) { + WRITE(DOGLCD_MOSI, !!(b & 0x80)); + WRITE(DOGLCD_SCK, HIGH); + b <<= 1; + if (miso_pin >= 0 && READ(miso_pin)) b |= 1; + WRITE(DOGLCD_SCK, LOW); + } + else { + const uint8_t state = (b & 0x80) ? HIGH : LOW; + for (j = 0; j < spi_speed; ++j) WRITE(DOGLCD_MOSI, state); + for (j = 0; j < spi_speed + (miso_pin >= 0 ? 0 : 1; ++j)) WRITE(DOGLCD_SCK, HIGH); + + b <<= 1; + if (miso_pin >= 0 && READ(miso_pin)) b |= 1; + + for (j = 0; j < spi_speed; ++j) WRITE(DOGLCD_SCK, LOW); + } + } + return b; +} + +static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t miso_pin=-1) { + for (i = 0; i < 8; ++i) { + const uint8_t state = (b & 0x80) ? HIGH : LOW; + if (spi_speed == 0) { + WRITE(DOGLCD_SCK, LOW); + WRITE(DOGLCD_MOSI, state); + WRITE(DOGLCD_MOSI, state); // need some setup time + WRITE(DOGLCD_SCK, HIGH); + } + else { + for (j = 0; j < spi_speed + (miso_pin >= 0 ? 0 : 1); ++j) WRITE(DOGLCD_SCK, LOW); + for (j = 0; j < spi_speed; ++j) WRITE(DOGLCD_MOSI, state); + for (j = 0; j < spi_speed; ++j) WRITE(DOGLCD_SCK, HIGH); + } + b <<= 1; + if (miso_pin >= 0 && READ(miso_pin)) b |= 1; + } + return b; +} + +static void u8g_sw_spi_shift_out(uint8_t val) { + #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) + swSpiTransfer_mode_3(val, SPI_speed); + #else + swSpiTransfer_mode_0(val, SPI_speed); + #endif +} + +static uint8_t swSpiInit(const uint8_t spi_speed) { + #if PIN_EXISTS(LCD_RESET) + SET_OUTPUT(LCD_RESET_PIN); + #endif + SET_OUTPUT(DOGLCD_A0); + OUT_WRITE(DOGLCD_SCK, LOW); + OUT_WRITE(DOGLCD_MOSI, LOW); + OUT_WRITE(DOGLCD_CS, HIGH); + return spi_speed; +} + +uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + SPI_speed = swSpiInit(LCD_SPI_SPEED); + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + #if PIN_EXISTS(LCD_RESET) + WRITE(LCD_RESET_PIN, arg_val); + #endif + break; + + case U8G_COM_MSG_CHIP_SELECT: + #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0 + if (arg_val) { // SCK idle state needs to be set to the proper idle state before + // the next chip select goes active + WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active + WRITE(DOGLCD_CS, LOW); + } + else { + WRITE(DOGLCD_CS, HIGH); + WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive + } + #else + WRITE(DOGLCD_CS, !arg_val); + #endif + break; + + case U8G_COM_MSG_WRITE_BYTE: + u8g_sw_spi_shift_out(arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + u8g_sw_spi_shift_out(*ptr++); + arg_val--; + } + } break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + u8g_sw_spi_shift_out(u8g_pgm_read(ptr)); + ptr++; + arg_val--; + } + } break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + WRITE(DOGLCD_A0, arg_val); + break; + } + return 1; +} + +#endif // U8G_SW_SPI_HC32 +#endif // ARDUINO_ARCH_HC32 diff --git a/Marlin/src/pins/hc32f4/pins_AQUILA_101.h b/Marlin/src/pins/hc32f4/pins_AQUILA_101.h index 32268f4cf84e..2834d56c96e9 100644 --- a/Marlin/src/pins/hc32f4/pins_AQUILA_101.h +++ b/Marlin/src/pins/hc32f4/pins_AQUILA_101.h @@ -153,22 +153,21 @@ #define EXP1_08_PIN PB15 // EN1 #if ENABLED(CR10_STOCKDISPLAY) // LCD used for C2 -#undef LCD_SERIAL_PORT -#define LCD_SERIAL_PORT 1 - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN EXP1_01_PIN + #endif #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN EXP1_01_PIN - #endif + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // LCD used for X2 + /** * Display pinout (display side, so RX/TX are swapped) * From 654e7a84ff79e49bcf43c940b08d094482b7b2ba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Dec 2023 15:16:21 -0600 Subject: [PATCH 051/236] =?UTF-8?q?=F0=9F=A9=B9=20Minor=20MKS=20UI=20fix?= 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 be6394514360..a10d0119f0e9 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -542,7 +542,7 @@ void lv_encoder_pin_init() { #endif // HAS_ENCODER_ACTION -#if __PLAT_NATIVE_SIM__ +#ifdef __PLAT_NATIVE_SIM__ #include typedef void (*lv_log_print_g_cb_t)(lv_log_level_t level, const char *, uint32_t, const char *); extern "C" void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb) {} From 9d324f7b1f58872cdac9068f0c53bff72f4012b3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Dec 2023 15:16:58 -0600 Subject: [PATCH 052/236] =?UTF-8?q?=F0=9F=8E=A8=20Remove=20unused=20usleep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h | 2 -- Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp | 1 - 2 files changed, 3 deletions(-) diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h index 63701ca334ed..4a252772cbe0 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h @@ -25,8 +25,6 @@ * Native/Simulator LCD-specific defines */ -void usleep(uint64_t microsec); - uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp index 91b7e0f67f76..356652807983 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp @@ -43,7 +43,6 @@ void u8g_SetPinOutput(uint8_t internal_pin_number) { SET_DIR_OUTPUT(internal_pin void u8g_SetPinInput(uint8_t internal_pin_number) { SET_DIR_INPUT(internal_pin_number); } void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status) { WRITE_PIN(pin, pin_status); } uint8_t u8g_GetPinLevel(uint8_t pin) { return READ_PIN(pin); } -void usleep(uint64_t microsec) { assert(false); /* why we here? */ } #ifdef __cplusplus } From cc641d796de55b61ea6ad531203cd4f63aaf7553 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 28 Dec 2023 00:21:10 +0000 Subject: [PATCH 053/236] [cron] Bump distribution date (2023-12-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 3694a91972c5..36f5ed14dc09 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-12-27" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 cef0c4cd8fb8..e533fec596e5 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-12-27" + #define STRING_DISTRIBUTION_DATE "2023-12-28" #endif /** From 59d26e463a19f657c425e8e52ccf2552d978df7f Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:38:19 -0800 Subject: [PATCH 054/236] =?UTF-8?q?=F0=9F=94=A8=20Newer=20Platform=20&=20T?= =?UTF-8?q?oolchain=20for=20STM32G0=20(#26585)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/stm32g0.ini | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ini/stm32g0.ini b/ini/stm32g0.ini index cf36541f3f50..8da5ab230fe1 100644 --- a/ini/stm32g0.ini +++ b/ini/stm32g0.ini @@ -31,13 +31,15 @@ build_flags = -DPIN_WIRE_SCL=PB3 -DPIN_WIRE_SDA=PB4 # [env:BTT_EBB42_V1_1_filament_extruder] extends = stm32_variant -platform = ststm32@~14.1.0 +platform = ststm32@17.1.0 platform_packages = framework-arduinoststm32@~4.20600.231001 - toolchain-gccarmnoneeabi@1.100301.220327 + toolchain-gccarmnoneeabi@1.120301.0 board = marlin_BTT_EBB42_V1_1 board_build.offset = 0x0000 board_upload.offset_address = 0x08000000 -build_flags = ${stm32_variant.build_flags} ${stm32g0_I2C2.build_flags} -flto +build_flags = ${stm32_variant.build_flags} ${stm32g0_I2C2.build_flags} + -flto + -Wl,--no-warn-rwx-segment debug_tool = stlink upload_protocol = dfu upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE" @@ -47,9 +49,9 @@ upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE" # [env:STM32G0B1RE_btt] extends = stm32_variant -platform = ststm32@~14.1.0 +platform = ststm32@17.1.0 platform_packages = framework-arduinoststm32@~4.20600.231001 - toolchain-gccarmnoneeabi@1.100301.220327 + toolchain-gccarmnoneeabi@1.120301.0 board = marlin_STM32G0B1RE board_build.offset = 0x2000 board_upload.offset_address = 0x08002000 @@ -58,6 +60,7 @@ build_flags = ${stm32_variant.build_flags} -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024 -DTIMER_SERVO=TIM3 -DTIMER_TONE=TIM4 -DSTEP_TIMER_IRQ_PRIO=0 + -Wl,--no-warn-rwx-segment upload_protocol = stlink debug_tool = stlink @@ -104,9 +107,9 @@ upload_protocol = custom # [env:STM32G0B1VE_btt] extends = stm32_variant -platform = ststm32@~14.1.0 +platform = ststm32@17.1.0 platform_packages = framework-arduinoststm32@~4.20600.231001 - toolchain-gccarmnoneeabi@1.100301.220327 + toolchain-gccarmnoneeabi@1.120301.0 board = marlin_STM32G0B1VE board_build.offset = 0x2000 board_upload.offset_address = 0x08002000 @@ -116,6 +119,7 @@ build_flags = ${stm32_variant.build_flags} -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024 -DTIMER_SERVO=TIM3 -DTIMER_TONE=TIM4 -DSTEP_TIMER_IRQ_PRIO=0 + -Wl,--no-warn-rwx-segment upload_protocol = stlink debug_tool = stlink From 88cf3cb1e0878ac09e988d2a873eb97f079e766a Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:07:52 -0800 Subject: [PATCH 055/236] =?UTF-8?q?=F0=9F=93=8C=20Specify=20U8glib-HAL@0.5?= =?UTF-8?q?.4=20(#26582)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/features.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini/features.ini b/ini/features.ini index ed755f9ac001..a550783a38fd 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -40,7 +40,7 @@ USES_LIQUIDCRYSTAL_I2C = marcoschwartz/LiquidCrystal_I2C@1.1.4 USES_LIQUIDTWI2 = LiquidTWI2@1.2.7 HAS_LCDPRINT = build_src_filter=+ HAS_MARLINUI_HD44780 = build_src_filter=+ -HAS_MARLINUI_U8GLIB = marlinfirmware/U8glib-HAL@~0.5.2 +HAS_MARLINUI_U8GLIB = marlinfirmware/U8glib-HAL@0.5.4 build_src_filter=+ HAS_(FSMC|SPI|LTDC)_TFT = build_src_filter=+ HAS_LTDC_TFT = build_src_filter=+ From 4e23e52a895ded5ce0e96f054c16714cb758a982 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 29 Dec 2023 00:17:32 +0000 Subject: [PATCH 056/236] [cron] Bump distribution date (2023-12-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 36f5ed14dc09..fc90cdab0d08 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-12-28" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 e533fec596e5..fa3e2d03640c 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-12-28" + #define STRING_DISTRIBUTION_DATE "2023-12-29" #endif /** From 1aeee2cd1f77c91b73daf1567f6ef94ab05fca3b Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu, 28 Dec 2023 18:10:45 -0800 Subject: [PATCH 057/236] =?UTF-8?q?=F0=9F=94=A7=20TriGorilla=20Pro=20defau?= =?UTF-8?q?lt=20to=20ONBOARD=5FSDIO=20(#26586)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index d6a5ef3c178b..451943a6f7ac 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -186,6 +186,12 @@ // SPI1(PA7) & SPI3(PB5) not available #define SPI_DEVICE 2 // Maple +// +// SD Card +// +#ifndef ONBOARD_SDIO + #define ONBOARD_SDIO +#endif #if ENABLED(ONBOARD_SDIO) #define SD_SCK_PIN PB13 // SPI2 ok #define SD_MISO_PIN PB14 // SPI2 ok From ba91fa09b7f16f788f441d6385d813cb64b5f508 Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Fri, 29 Dec 2023 05:41:34 +0100 Subject: [PATCH 058/236] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Optimize=20FT=5FMO?= =?UTF-8?q?TION=20(#26557)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/ft_motion.cpp | 91 ++++++++++++++++----------------- Marlin/src/module/ft_motion.h | 5 +- Marlin/src/module/ft_types.h | 2 - 3 files changed, 46 insertions(+), 52 deletions(-) diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index 674b66f581cb..0e1ade69f0fb 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -46,9 +46,9 @@ FTMotion ftMotion; static_assert(FTM_DEFAULT_DYNFREQ_MODE != dynFreqMode_MASS_BASED, "dynFreqMode_MASS_BASED requires an X axis and an extruder."); #endif -//-----------------------------------------------------------------// +//----------------------------------------------------------------- // Variables. -//-----------------------------------------------------------------// +//----------------------------------------------------------------- // Public variables. @@ -61,10 +61,10 @@ uint32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper comma bool FTMotion::sts_stepperBusy = false; // The stepper buffer has items and is in use. // Private variables. + // NOTE: These are sized for Ulendo FBS use. - xyze_trajectory_t FTMotion::traj; // = {0.0f} Storage for fixed-time-based trajectory. - xyze_trajectoryMod_t FTMotion::trajMod; // = {0.0f} Storage for modified fixed-time-based trajectory. - xyze_trajectoryWin_t FTMotion::trajWin; // = {0.0f} Storage for fixed time trajectory window. +xyze_trajectory_t FTMotion::traj; // = {0.0f} Storage for fixed-time-based trajectory. +xyze_trajectoryMod_t FTMotion::trajMod; // = {0.0f} Storage for fixed time trajectory window. bool FTMotion::blockProcRdy = false, // Indicates a block is ready to be processed. FTMotion::blockProcRdy_z1 = false, // Storage for the previous indicator. @@ -96,23 +96,23 @@ uint32_t FTMotion::N1, // Number of data points in the uint32_t FTMotion::max_intervals; // Total number of data points that will be generated from block. // Make vector variables. -uint32_t FTMotion::makeVector_idx = 0, // Index of fixed time trajectory generation of the overall block. - FTMotion::makeVector_idx_z1 = 0, // Storage for the previously calculated index above. - FTMotion::makeVector_batchIdx = 0; // Index of fixed time trajectory generation within the batch. +uint32_t FTMotion::makeVector_idx = 0, // Index of fixed time trajectory generation of the overall block. + FTMotion::makeVector_idx_z1 = 0, // Storage for the previously calculated index above. + FTMotion::makeVector_batchIdx = 0; // Index of fixed time trajectory generation within the batch. // Interpolation variables. -xyze_long_t FTMotion::steps = { 0 }; // Step count accumulator. +xyze_long_t FTMotion::steps = { 0 }; // Step count accumulator. -uint32_t FTMotion::interpIdx = 0, // Index of current data point being interpolated. - FTMotion::interpIdx_z1 = 0; // Storage for the previously calculated index above. +uint32_t FTMotion::interpIdx = 0, // Index of current data point being interpolated. + FTMotion::interpIdx_z1 = 0; // Storage for the previously calculated index above. // Shaping variables. #if HAS_X_AXIS FTMotion::shaping_t FTMotion::shaping = { 0, 0, - x:{ { 0.0f }, { 0.0f }, { 0 } }, // d_zi, Ai, Ni + x:{ { 0.0f }, { 0.0f }, { 0 } }, // d_zi, Ai, Ni #if HAS_Y_AXIS - y:{ { 0.0f }, { 0.0f }, { 0 } } // d_zi, Ai, Ni + y:{ { 0.0f }, { 0.0f }, { 0 } } // d_zi, Ai, Ni #endif }; #endif @@ -123,9 +123,9 @@ uint32_t FTMotion::interpIdx = 0, // Index of current data p float FTMotion::e_advanced_z1 = 0.0f; // (ms) Unit delay of advanced extruder position. #endif -//-----------------------------------------------------------------// +//----------------------------------------------------------------- // Function definitions. -//-----------------------------------------------------------------// +//----------------------------------------------------------------- // Public functions. @@ -186,8 +186,7 @@ void FTMotion::loop() { // Call Ulendo FBS here. #if ENABLED(FTM_UNIFIED_BWS) - trajMod = traj; // Copy the uncompensated vectors. - traj = trajWin; // Move the window to traj + trajMod = traj; // Move the window to traj #else // Copy the uncompensated vectors. #define TCOPY(A) memcpy(trajMod.A, traj.A, sizeof(trajMod.A)) @@ -199,7 +198,7 @@ void FTMotion::loop() { ); // Shift the time series back in the window - #define TSHIFT(A) memcpy(traj.A, trajWin.A, sizeof(trajWin.A)) + #define TSHIFT(A) memcpy(traj.A, &traj.A[FTM_BATCH_SIZE], (FTM_WINDOW_SIZE - FTM_BATCH_SIZE) * sizeof(traj.A[0])) LOGICAL_AXIS_CODE( TSHIFT(e), TSHIFT(x), TSHIFT(y), TSHIFT(z), @@ -215,12 +214,11 @@ void FTMotion::loop() { } // Interpolation. - while ( batchRdyForInterp - && ( stepperCmdBuffItems() < (FTM_STEPPERCMD_BUFF_SIZE) - (FTM_STEPS_PER_UNIT_TIME) ) - && ( interpIdx - interpIdx_z1 < (FTM_STEPS_PER_LOOP) ) + while (batchRdyForInterp + && (stepperCmdBuffItems() < (FTM_STEPPERCMD_BUFF_SIZE) - (FTM_STEPS_PER_UNIT_TIME)) + && (interpIdx - interpIdx_z1 < (FTM_STEPS_PER_LOOP)) ) { convertToSteps(interpIdx); - if (++interpIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE)) { batchRdyForInterp = false; interpIdx = 0; @@ -443,7 +441,6 @@ void FTMotion::reset() { stepperCmdBuff_produceIdx = stepperCmdBuff_consumeIdx = 0; traj.reset(); - trajWin.reset(); blockProcRdy = blockProcRdy_z1 = blockProcDn = false; batchRdy = batchRdyForInterp = false; @@ -611,26 +608,26 @@ void FTMotion::makeVector() { } LOGICAL_AXIS_CODE( - trajWin.e[makeVector_batchIdx] = startPosn.e + ratio.e * dist, - trajWin.x[makeVector_batchIdx] = startPosn.x + ratio.x * dist, - trajWin.y[makeVector_batchIdx] = startPosn.y + ratio.y * dist, - trajWin.z[makeVector_batchIdx] = startPosn.z + ratio.z * dist, - trajWin.i[makeVector_batchIdx] = startPosn.i + ratio.i * dist, - trajWin.j[makeVector_batchIdx] = startPosn.j + ratio.j * dist, - trajWin.k[makeVector_batchIdx] = startPosn.k + ratio.k * dist, - trajWin.u[makeVector_batchIdx] = startPosn.u + ratio.u * dist, - trajWin.v[makeVector_batchIdx] = startPosn.v + ratio.v * dist, - trajWin.w[makeVector_batchIdx] = startPosn.w + ratio.w * dist + traj.e[makeVector_batchIdx] = startPosn.e + ratio.e * dist, + traj.x[makeVector_batchIdx] = startPosn.x + ratio.x * dist, + traj.y[makeVector_batchIdx] = startPosn.y + ratio.y * dist, + traj.z[makeVector_batchIdx] = startPosn.z + ratio.z * dist, + traj.i[makeVector_batchIdx] = startPosn.i + ratio.i * dist, + traj.j[makeVector_batchIdx] = startPosn.j + ratio.j * dist, + traj.k[makeVector_batchIdx] = startPosn.k + ratio.k * dist, + traj.u[makeVector_batchIdx] = startPosn.u + ratio.u * dist, + traj.v[makeVector_batchIdx] = startPosn.v + ratio.v * dist, + traj.w[makeVector_batchIdx] = startPosn.w + ratio.w * dist ); #if HAS_EXTRUDERS if (cfg.linearAdvEna) { - float dedt_adj = (trajWin.e[makeVector_batchIdx] - e_raw_z1) * (FTM_FS); + float dedt_adj = (traj.e[makeVector_batchIdx] - e_raw_z1) * (FTM_FS); if (ratio.e > 0.0f) dedt_adj += accel_k * cfg.linearAdvK; - e_raw_z1 = trajWin.e[makeVector_batchIdx]; + e_raw_z1 = traj.e[makeVector_batchIdx]; e_advanced_z1 += dedt_adj * (FTM_TS); - trajWin.e[makeVector_batchIdx] = e_advanced_z1; + traj.e[makeVector_batchIdx] = e_advanced_z1; } #endif @@ -640,9 +637,9 @@ void FTMotion::makeVector() { #if HAS_DYNAMIC_FREQ_MM case dynFreqMode_Z_BASED: - if (trajWin.z[makeVector_batchIdx] != 0.0f) { // Only update if Z changed. - const float xf = cfg.baseFreq[X_AXIS] + cfg.dynFreqK[X_AXIS] * trajWin.z[makeVector_batchIdx] - OPTARG(HAS_Y_AXIS, yf = cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * trajWin.z[makeVector_batchIdx]); + if (traj.z[makeVector_batchIdx] != 0.0f) { // Only update if Z changed. + const float xf = cfg.baseFreq[X_AXIS] + cfg.dynFreqK[X_AXIS] * traj.z[makeVector_batchIdx] + OPTARG(HAS_Y_AXIS, yf = cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * traj.z[makeVector_batchIdx]); updateShapingN(_MAX(xf, FTM_MIN_SHAPE_FREQ) OPTARG(HAS_Y_AXIS, _MAX(yf, FTM_MIN_SHAPE_FREQ))); } break; @@ -652,8 +649,8 @@ void FTMotion::makeVector() { 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[X_AXIS] + cfg.dynFreqK[X_AXIS] * trajWin.e[makeVector_batchIdx] - OPTARG(HAS_Y_AXIS, cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * trajWin.e[makeVector_batchIdx]) ); + updateShapingN( cfg.baseFreq[X_AXIS] + cfg.dynFreqK[X_AXIS] * traj.e[makeVector_batchIdx] + OPTARG(HAS_Y_AXIS, cfg.baseFreq[Y_AXIS] + cfg.dynFreqK[Y_AXIS] * traj.e[makeVector_batchIdx]) ); break; #endif @@ -663,18 +660,18 @@ void FTMotion::makeVector() { // Apply shaping if in mode. #if HAS_X_AXIS if (cfg.modeHasShaper()) { - shaping.x.d_zi[shaping.zi_idx] = trajWin.x[makeVector_batchIdx]; - trajWin.x[makeVector_batchIdx] *= shaping.x.Ai[0]; + shaping.x.d_zi[shaping.zi_idx] = traj.x[makeVector_batchIdx]; + traj.x[makeVector_batchIdx] *= shaping.x.Ai[0]; #if HAS_Y_AXIS - shaping.y.d_zi[shaping.zi_idx] = trajWin.y[makeVector_batchIdx]; - trajWin.y[makeVector_batchIdx] *= shaping.y.Ai[0]; + shaping.y.d_zi[shaping.zi_idx] = traj.y[makeVector_batchIdx]; + traj.y[makeVector_batchIdx] *= shaping.y.Ai[0]; #endif for (uint32_t i = 1U; i <= shaping.max_i; i++) { const uint32_t udiffx = shaping.zi_idx - shaping.x.Ni[i]; - trajWin.x[makeVector_batchIdx] += shaping.x.Ai[i] * shaping.x.d_zi[shaping.x.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffx : udiffx]; + traj.x[makeVector_batchIdx] += shaping.x.Ai[i] * shaping.x.d_zi[shaping.x.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffx : udiffx]; #if HAS_Y_AXIS const uint32_t udiffy = shaping.zi_idx - shaping.y.Ni[i]; - trajWin.y[makeVector_batchIdx] += shaping.y.Ai[i] * shaping.y.d_zi[shaping.y.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffy : udiffy]; + traj.y[makeVector_batchIdx] += shaping.y.Ai[i] * shaping.y.d_zi[shaping.y.Ni[i] > shaping.zi_idx ? (FTM_ZMAX) + udiffy : udiffy]; #endif } if (++shaping.zi_idx == (FTM_ZMAX)) shaping.zi_idx = 0; diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h index f4a65fdd5e92..8c8098873f42 100644 --- a/Marlin/src/module/ft_motion.h +++ b/Marlin/src/module/ft_motion.h @@ -134,7 +134,6 @@ class FTMotion { static xyze_trajectory_t traj; static xyze_trajectoryMod_t trajMod; - static xyze_trajectoryWin_t trajWin; static bool blockProcRdy, blockProcRdy_z1, blockProcDn; static bool batchRdy, batchRdyForInterp; @@ -155,8 +154,8 @@ class FTMotion { static uint32_t max_intervals; static constexpr uint32_t _ftm_size = TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE), - _ftm_wind = TERN(FTM_UNIFIED_BWS, 2, ceil((FTM_WINDOW_SIZE) / _ftm_size)), - shaper_intervals = _ftm_size * ceil((FTM_ZMAX) / _ftm_size), + _ftm_wind = TERN(FTM_UNIFIED_BWS, 2, CEIL((FTM_WINDOW_SIZE) / _ftm_size)), + shaper_intervals = _ftm_size * CEIL((FTM_ZMAX) / _ftm_size), min_max_intervals = _ftm_size * _ftm_wind; // Make vector variables. diff --git a/Marlin/src/module/ft_types.h b/Marlin/src/module/ft_types.h index 06680488754f..e7bcf37ac688 100644 --- a/Marlin/src/module/ft_types.h +++ b/Marlin/src/module/ft_types.h @@ -49,11 +49,9 @@ enum dynFreqMode_t : uint8_t { #if ENABLED(FTM_UNIFIED_BWS) typedef struct XYZEarray xyze_trajectory_t; typedef struct XYZEarray xyze_trajectoryMod_t; - typedef struct XYZEarray xyze_trajectoryWin_t; #else typedef struct XYZEarray xyze_trajectory_t; typedef struct XYZEarray xyze_trajectoryMod_t; - typedef struct XYZEarray xyze_trajectoryWin_t; #endif enum { From 2d97f082e5e8de2973857cc9f88bafcb4a20e1ea Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu, 28 Dec 2023 20:50:52 -0800 Subject: [PATCH 059/236] =?UTF-8?q?=E2=9C=A8=20BigTreeTech=20Manta=20M8P?= =?UTF-8?q?=20V2.0=20(STM32H723ZE)=20(#26578)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 3 +- Marlin/src/inc/Warnings.cpp | 2 +- Marlin/src/pins/pins.h | 2 + .../pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h | 464 ++++++++++++++++++ .../variant_MARLIN_STM32H723ZE.cpp | 8 +- .../variant_MARLIN_STM32H723ZE.h | 6 +- ini/stm32h7.ini | 2 +- 7 files changed, 480 insertions(+), 7 deletions(-) create mode 100644 Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 5730ecbd4f90..91141b23f99f 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -482,7 +482,8 @@ #define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723ZE) #define BOARD_BTT_OCTOPUS_PRO_V1_0_1 6009 // BigTreeTech Octopus Pro v1.0.1 (STM32H723ZE) #define BOARD_BTT_OCTOPUS_PRO_V1_1 6010 // BigTreeTech Octopus Pro v1.1 (STM32H723ZE) -#define BOARD_BTT_KRAKEN_V1_0 6011 // BigTreeTech Kraken v1.0 (STM32H723ZG) +#define BOARD_BTT_MANTA_M8P_V2_0 6011 // BigTreeTech Manta M8P V2.0 (STM32H723ZE) +#define BOARD_BTT_KRAKEN_V1_0 6012 // BigTreeTech Kraken v1.0 (STM32H723ZG) // // Espressif ESP32 WiFi diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 7965336df7eb..d239e6a7d5cf 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -704,7 +704,7 @@ #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) #warning "Your FYSETC Mini Panel works best with RGB_LED." #elif ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP) - #warning "Your FYSETC Mini Panel works best with LED_USER_PRESET_STARTUP." + #warning "Your FYSETC/MKS/BTT Mini Panel works best with LED_USER_PRESET_STARTUP." #endif #if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && ALL(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index b881c849ebd8..d162881993ef 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -841,6 +841,8 @@ #include "stm32h7/pins_BTT_OCTOPUS_PRO_V1_0_1.h" // STM32H7 env:STM32H723ZE_btt #elif MB(BTT_OCTOPUS_PRO_V1_1) #include "stm32h7/pins_BTT_OCTOPUS_PRO_V1_1.h" // STM32H7 env:STM32H723ZE_btt +#elif MB(BTT_MANTA_M8P_V2_0) + #include "stm32h7/pins_BTT_MANTA_M8P_V2_0.h" // STM32H7 env:STM32H723ZE_btt #elif MB(BTT_KRAKEN_V1_0) #include "stm32h7/pins_BTT_KRAKEN_V1_0.h" // STM32H7 env:STM32H723ZG_btt #elif MB(TEENSY41) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h new file mode 100644 index 000000000000..346cd1c3481f --- /dev/null +++ b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h @@ -0,0 +1,464 @@ +/** + * 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 "BTT Manta M8P V2.0" +#define BOARD_WEBSITE_URL "github.com/bigtreetech/Manta-M8P/tree/master/V2.0" + +#define USES_DIAG_JUMPERS + +// +// EEPROM +// +#if NO_EEPROM_SELECTED + #undef NO_EEPROM_SELECTED + #ifndef FLASH_EEPROM_EMULATION + #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation + #endif + #define EEPROM_PAGE_SIZE (0x800UL) // 2K + #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE +#endif + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 8 + +// +// Servos +// +#define SERVO0_PIN PD12 // PROBE + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PF4 // M1-STOP +#define Y_DIAG_PIN PF3 // M2-STOP +#define Z_DIAG_PIN PF2 // M3-STOP +#define E0_DIAG_PIN PF1 // M4-STOP +#define E1_DIAG_PIN PF0 // M5-STOP +#define E2_DIAG_PIN PC15 // M6-STOP +#define E3_DIAG_PIN -1 // No DIAG or STOP pin for M7 +#define E4_DIAG_PIN -1 // No DIAG or STOP pin for M8 + +// +// Limit Switches +// +#ifdef X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN // M1-STOP + #if X_HOME_TO_MIN + #define X_MAX_PIN E0_DIAG_PIN // M4-STOP + #else + #define X_MIN_PIN E0_DIAG_PIN // M4-STOP + #endif +#elif NEEDS_X_MINMAX + #ifndef X_MIN_PIN + #define X_MIN_PIN X_DIAG_PIN // M1-STOP + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN E0_DIAG_PIN // M4-STOP + #endif +#else + #define X_STOP_PIN X_DIAG_PIN // M1-STOP +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN // M2-STOP + #if Y_HOME_TO_MIN + #define Y_MAX_PIN E1_DIAG_PIN // M5-STOP + #else + #define Y_MIN_PIN E1_DIAG_PIN // M5-STOP + #endif +#elif NEEDS_Y_MINMAX + #ifndef Y_MIN_PIN + #define Y_MIN_PIN Y_DIAG_PIN // M2-STOP + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN E1_DIAG_PIN // M5-STOP + #endif +#else + #define Y_STOP_PIN Y_DIAG_PIN // M2-STOP +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN // M3-STOP + #if Z_HOME_TO_MIN + #define Z_MAX_PIN E2_DIAG_PIN // M6-STOP + #else + #define Z_MIN_PIN E2_DIAG_PIN // M6-STOP + #endif +#elif NEEDS_Z_MINMAX + #ifndef Z_MIN_PIN + #define Z_MIN_PIN Z_DIAG_PIN // M3-STOP + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN E2_DIAG_PIN // M6-STOP + #endif +#else + #define Z_STOP_PIN Z_DIAG_PIN // M3-STOP +#endif + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PD13 // PROBE + //#define Z_MIN_PROBE_PIN PD8 // "FAN IND" - Shared inductive probe / fan connector +#endif + +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN E0_DIAG_PIN // M4-STOP +#define FIL_RUNOUT2_PIN E1_DIAG_PIN // M5-STOP +#define FIL_RUNOUT3_PIN E2_DIAG_PIN // M6-STOP + +// +// Steppers +// +#define X_STEP_PIN PE6 // MOTOR 1 +#define X_DIR_PIN PE5 +#define X_ENABLE_PIN PC14 +#ifndef X_CS_PIN + #define X_CS_PIN PC13 +#endif + +#define Y_STEP_PIN PE2 // MOTOR 2 +#define Y_DIR_PIN PE1 +#define Y_ENABLE_PIN PE4 +#ifndef Y_CS_PIN + #define Y_CS_PIN PE3 +#endif + +#define Z_STEP_PIN PB8 // MOTOR 3 +#define Z_DIR_PIN PB7 +#define Z_ENABLE_PIN PE0 +#ifndef Z_CS_PIN + #define Z_CS_PIN PB9 +#endif + +#define E0_STEP_PIN PB4 // MOTOR 4 +#define E0_DIR_PIN PB3 +#define E0_ENABLE_PIN PB6 +#ifndef E0_CS_PIN + #define E0_CS_PIN PB5 +#endif + +#define E1_STEP_PIN PG13 // MOTOR 5 +#define E1_DIR_PIN PG12 +#define E1_ENABLE_PIN PG15 +#ifndef E1_CS_PIN + #define E1_CS_PIN PG14 +#endif + +#define E2_STEP_PIN PG9 // MOTOR 6 +#define E2_DIR_PIN PD7 +#define E2_ENABLE_PIN PG11 +#ifndef E2_CS_PIN + #define E2_CS_PIN PG10 +#endif + +#define E3_STEP_PIN PD4 // MOTOR 7 +#define E3_DIR_PIN PD3 +#define E3_ENABLE_PIN PD6 +#ifndef E3_CS_PIN + #define E3_CS_PIN PD5 +#endif + +#define E4_STEP_PIN PC7 // MOTOR 8 +#define E4_DIR_PIN PC8 +#define E4_ENABLE_PIN PD2 +#ifndef E4_CS_PIN + #define E4_CS_PIN PC6 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PB0 // TH0 +#define TEMP_1_PIN PC5 // TH1 +#define TEMP_2_PIN PC4 // TH2 +#define TEMP_3_PIN PA7 // TH3 +#define TEMP_BED_PIN PB1 // TB + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PF5 // BED-OUT +#define HEATER_0_PIN PA0 // HE0 +#define HEATER_1_PIN PA1 // HE1 +#define HEATER_2_PIN PA3 // HE2 +#define HEATER_3_PIN PA5 // HE3 + +#define FAN0_PIN PF7 // FAN0 (2 wire) +#if ENABLED(FOURWIRES_FANS) + // Only FAN5 and FAN6 have tachometer pins, so swap them with FAN1 and FAN2 + #define FAN1_PIN PA6 // FAN5 (4 wire) + #define FAN2_PIN PA2 // FAN6 (4 wire) + #define FAN5_PIN PF9 // FAN1 (2 wire) + #define FAN6_PIN PF6 // FAN2 (2 wire) +#else + #define FAN1_PIN PF9 // FAN1 (2 wire) + #define FAN2_PIN PF6 // FAN2 (2 wire) + #define FAN5_PIN PA6 // FAN5 (4 wire) + #define FAN6_PIN PA2 // FAN6 (4 wire) +#endif +#define FAN3_PIN PF8 // FAN3 (2 wire) +#define FAN4_PIN PA4 // FAN4 (2 wire) +#define FAN7_PIN PE9 // MOTOR (3 wire) +//#define FAN8_PIN PB11 // "FAN IND" (3 wire) - Shared inductive probe / fan connector + +#if ENABLED(FOURWIRES_FANS) + #ifndef E0_FAN_TACHO_PIN + #define E0_FAN_TACHO_PIN PC2 // FAN5 (4 wire) + #endif + #ifndef E1_FAN_TACHO_PIN + #define E1_FAN_TACHO_PIN PC1 // FAN6 (4 wire) + #endif +#endif + +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN FAN7_PIN // MOTOR (3 wire) +#endif + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PD14 // PS-ON +#endif + +// +// Misc. Functions +// +#define I2C_SDA_PIN PC9 // I2C +#define I2C_SCL_PIN PA8 // I2C + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN PC0 // FWS +#endif +#ifndef FILWIDTH2_PIN + #define FILWIDTH2_PIN PF10 // FWS +#endif + +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #if HAS_WIRED_LCD + #define SDCARD_CONNECTION LCD + #else + #define SDCARD_CONNECTION ONBOARD + #endif +#endif + +// +// Default pins for TMC software SPI +// +#if HAS_TMC_SPI + #define TMC_USE_SW_SPI + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PG6 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PG7 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PG8 + #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 PC13 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PB9 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define Z2_SERIAL_TX_PIN PB5 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PG14 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PG10 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PD5 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN + + #define E3_SERIAL_TX_PIN PC6 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif + +#endif // HAS_TMC_UART + +/** + * 18-pin FPC Connector + * ---- + * (MISO) PE13 | 1 | + * (SCK) PE12 | 2 | + * (BTN_EN1) PE15 | 3 | + * (SD_SS) PE11 | 4 | + * (BTN_EN2) PE10 | 5 | + * (MOSI) PE14 | 6 | + * (SD_DETECT) PE8 | 7 | + * RESET | 8 | + * (BEEPER) PE7 | 9 | + * (BTN_ENC) PG1 | 10 | + * (LCD_EN) PG0 | 11 | + * (LCD_RS) PF15 | 12 | + * (LCD_D4) PF14 | 13 | + * (LCD_D5) PF13 | 14 | + * (LCD_D6) PF12 | 15 | + * (LCD_D7) PF11 | 16 | + * GND | 17 | + * 5V | 18 | + * ---- + * LCD + */ + +#define EXP1_01_PIN PE7 +#define EXP1_02_PIN PG1 +#define EXP1_03_PIN PG0 +#define EXP1_04_PIN PF15 +#define EXP1_05_PIN PF14 +#define EXP1_06_PIN PF13 +#define EXP1_07_PIN PF12 +#define EXP1_08_PIN PF11 + +#define EXP2_01_PIN PE13 +#define EXP2_02_PIN PE12 +#define EXP2_03_PIN PE15 +#define EXP2_04_PIN PE11 +#define EXP2_05_PIN PE10 +#define EXP2_06_PIN PE14 +#define EXP2_07_PIN PE8 +#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_MANTA_M8P_V2_0 onboard SD requires SD_DETECT_STATE set to HIGH." + #endif + #define SDSS PB12 + #define SD_SS_PIN SDSS + #define SD_SCK_PIN PB13 + #define SD_MISO_PIN PB14 + #define SD_MOSI_PIN PB15 + #define SD_DETECT_PIN -1 + #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 BOARD_BTT_MANTA_M8P_V2_0." +#endif + +// +// LCDs and Controllers +// +#if ENABLED(BTT_MINI_12864) // BTT Mini 12864 V2.0 connected via 18-pin FPC cable + + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #define LCD_PINS_RS EXP1_04_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_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 + #define LCD_PINS_D7 EXP1_08_PIN + + #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 Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software 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. + #define NEOPIXEL_PIN EXP1_06_PIN + +#elif HAS_WIRED_LCD + #error "Only BTT_MINI_12864 (BTT Mini 12864 V2.0 with FPC cable) is currently supported on BOARD_BTT_MANTA_M8P_V2_0." +#endif + +// +// NeoPixel LED +// The BTT_MINI_12864 uses one of the EXP pins for NeoPixels +// +#if DISABLED(BTT_MINI_12864) && !defined(NEOPIXEL_PIN) + #define NEOPIXEL_PIN PD15 // RGB +#elif ENABLED(BTT_MINI_12864) && !defined(NEOPIXEL2_PIN) + // Allow dedicated RGB (NeoPixel) pin to be used for a NeoPixel strip + #define NEOPIXEL2_PIN PD15 // RGB +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.cpp b/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.cpp index 4506cf5ce6b5..a99a3cb609aa 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.cpp +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.cpp @@ -128,7 +128,9 @@ const PinName digitalPin[] = { PH_0, // D110 PH_1, // D111 PC_2_C, // D112/A26 - PC_3_C // D113/A27 + PC_3_C, // D113/A27 + PC_2, // D114/A28 + PC_3 // D115/A29 }; // Analog (Ax) pin number array @@ -160,7 +162,9 @@ const uint32_t analogInputPin[] = { 91, // A24, PF13 92, // A25, PF14 112, // A26, PC2_C - 113 // A27, PC3_C + 113, // A27, PC3_C + 114, // A28, PC2 + 115 // A29, PC3 }; void MPU_Config(void) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h b/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h index 1b518f01cfa4..c9c631412a04 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h @@ -129,6 +129,8 @@ #define PH1 111 #define PC2_C PIN_A26 #define PC3_C PIN_A27 +#define PC2 PC2_C +#define PC3 PC3_C // Alternate pins number #define PA0_ALT1 (PA0 | ALT1) @@ -197,9 +199,9 @@ #define PF9_ALT2 (PF9 | ALT2) #define PG13_ALT1 (PG13 | ALT1) -#define NUM_DIGITAL_PINS 114 +#define NUM_DIGITAL_PINS 116 #define NUM_DUALPAD_PINS 2 -#define NUM_ANALOG_INPUTS 28 +#define NUM_ANALOG_INPUTS 30 #define NUM_ANALOG_FIRST PA0 // On-board LED pin number diff --git a/ini/stm32h7.ini b/ini/stm32h7.ini index 0a66f6d91e57..e5392464db70 100644 --- a/ini/stm32h7.ini +++ b/ini/stm32h7.ini @@ -125,7 +125,7 @@ upload_protocol = cmsis-dap debug_tool = cmsis-dap # -# BigTreeTech Octopus Pro V1.0.1/1.1 / Octopus Max EZ V1.0 (STM32H723ZET6 ARM Cortex-M7) +# BigTreeTech Octopus Pro V1.0.1/1.1 / Octopus Max EZ V1.0 / Manta M8P V2.0 (STM32H723ZET6 ARM Cortex-M7) # [env:STM32H723ZE_btt] extends = STM32H723Zx_btt From f605c045e3198c1c21dda75e5913ef192fc58580 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 30 Dec 2023 00:20:29 +0000 Subject: [PATCH 060/236] [cron] Bump distribution date (2023-12-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 fc90cdab0d08..0daaa7204106 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-12-29" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 fa3e2d03640c..fd3516f915ca 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-12-29" + #define STRING_DISTRIBUTION_DATE "2023-12-30" #endif /** From e6f1b074df409cab5c231954ad542e0ffcf20f31 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Dec 2023 05:01:48 -0600 Subject: [PATCH 061/236] =?UTF-8?q?=F0=9F=A9=B9=20Restore=20usleep=20for?= =?UTF-8?q?=20native=20/=20sim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h index 4a252772cbe0..63701ca334ed 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h @@ -25,6 +25,8 @@ * Native/Simulator LCD-specific defines */ +void usleep(uint64_t microsec); + uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); From 06dc7f4f526833aaab37725e2e95e68030acb94e Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 31 Dec 2023 00:18:42 +1300 Subject: [PATCH 062/236] =?UTF-8?q?=F0=9F=94=A7=20Fix,=20extend=20FAN=20/?= =?UTF-8?q?=20AUTOFAN=20confict=20check=20(#26591)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/inc/SanityCheck.h | 28 +++++++++++++++---------- Marlin/src/pins/mega/pins_MALYAN_M180.h | 5 ++--- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 2bde7f6f4542..9fb5b0e445f9 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1829,19 +1829,25 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #undef GOOD_AXIS_PINS /** - * Make sure auto fan pins don't conflict with the fan pin + * Make sure auto fan pins don't conflict with the first fan pin */ #if HAS_AUTO_FAN - #if HAS_FAN0 - #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 + #if PINS_EXIST(E0_AUTO_FAN, FAN0) && E0_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E1_AUTO_FAN, FAN0) && E1_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E2_AUTO_FAN, FAN0) && E2_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E3_AUTO_FAN, FAN0) && E3_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E4_AUTO_FAN, FAN0) && E4_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E4_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E5_AUTO_FAN, FAN0) && E5_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E5_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E6_AUTO_FAN, FAN0) && E6_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E6_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E7_AUTO_FAN, FAN0) && E7_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E7_AUTO_FAN_PIN equal to FAN0_PIN." #endif #endif diff --git a/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h index 4eb7928825cd..a4bc98a14706 100644 --- a/Marlin/src/pins/mega/pins_MALYAN_M180.h +++ b/Marlin/src/pins/mega/pins_MALYAN_M180.h @@ -96,7 +96,6 @@ #ifndef FAN0_PIN #define FAN0_PIN 7 // M106 Sxxx command supported and tested. M107 as well. #endif - -#ifndef FAN_PIN1 - #define FAN_PIN1 12 // Currently Unsupported by Marlin +#ifndef FAN1_PIN + #define FAN1_PIN 12 // Currently Unsupported by Marlin #endif From 2203505182e95544cebfc0f1e5b87b6f19f0610a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 31 Dec 2023 00:23:28 +0000 Subject: [PATCH 063/236] [cron] Bump distribution date (2023-12-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 0daaa7204106..9609a5eaf187 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-12-30" +//#define STRING_DISTRIBUTION_DATE "2023-12-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 fd3516f915ca..f6455682bc28 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-12-30" + #define STRING_DISTRIBUTION_DATE "2023-12-31" #endif /** From 5d1ede08aa8a045463d4d33333fd90abead2871e Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 31 Dec 2023 22:54:26 +1300 Subject: [PATCH 064/236] =?UTF-8?q?=E2=9C=A8=20CTC=5FA10S=5FA13=20(#26514)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 12 +-- Marlin/src/inc/Changes.h | 2 + Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 4 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 6 +- Marlin/src/pins/sanguino/pins_ANET_10.h | 114 +++++++++++++++----- 7 files changed, 102 insertions(+), 40 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index e62637f6462a..fd2dbbb27398 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3029,14 +3029,14 @@ //#define ENDER2_STOCKDISPLAY // -// ANET and Tronxy Graphical Controller -// -// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 -// A clone of the RepRapDiscount full graphics display but with -// different pins/wiring (see pins_ANET_10.h). Enable one of these. +// ANET and Tronxy 128×64 Full Graphics Controller as used on Anet A6 // //#define ANET_FULL_GRAPHICS_LCD -//#define ANET_FULL_GRAPHICS_LCD_ALT_WIRING + +// +// GUCOCO CTC 128×64 Full Graphics Controller as used on GUCOCO CTC A10S +// +//#define CTC_A10S_A13 // // AZSMZ 12864 LCD with SD diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 693cb592e62c..25d3401579d4 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -671,6 +671,8 @@ #error "LARGE_MOVE_ITEMS is obsolete. Instead define MANUAL_MOVE_DISTANCE_MM and MANUAL_MOVE_DISTANCE_IN." #elif defined(SDIO_SUPPORT) #error "SDIO_SUPPORT is now ONBOARD_SDIO." +#elif defined(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13." #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 37d56d4f1e56..b501a556f8ec 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -779,7 +779,7 @@ #define LCD_ST7920_DELAY_2 125 #define LCD_ST7920_DELAY_3 125 -#elif ANY(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) +#elif ANY(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) #define IS_RRD_FG_SC 1 #define LCD_ST7920_DELAY_1 150 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 9fb5b0e445f9..e5cba0310270 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2636,7 +2636,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L + COUNT_ENABLED(VIKI2, miniVIKI) \ + ENABLED(WYH_L12864) \ + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \ - + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) \ + + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) \ + ENABLED(AZSMZ_12864) \ + ENABLED(BQ_LCD_SMART_CONTROLLER) \ + ENABLED(CARTESIO_UI) \ 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 1cc555aafe08..35d9697ba4cc 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -221,8 +221,8 @@ #define EXP2_08_PIN -1 #if HAS_WIRED_LCD - #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) - #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board." + #if ENABLED(CTC_A10S_A13) + #error "CTC_A10S_A13 only applies to the ANET 1.0 board." #elif ENABLED(ANET_FULL_GRAPHICS_LCD) 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 51953324a3af..829e0edd60ca 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -289,9 +289,9 @@ #elif HAS_WIRED_LCD - #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + #if ENABLED(CTC_A10S_A13) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING - #error "CAUTION! ANET_FULL_GRAPHICS_LCD_ALT_WIRING requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #error "CAUTION! CTC_A10S_A13 requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** @@ -300,7 +300,7 @@ * * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! * - * The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug: + * The CTC_A10S_A13 connector plug: * * BEFORE AFTER * ------ ------ diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index e57cc9f6fa72..12afa2339386 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -158,28 +158,52 @@ #define SDSS 31 #define LED_PIN -1 +/** + * Connector pinouts + * + * ------ ------ ---- + * (SDA) D17 | 1 2 | (A1) D30 3V3 | 1 2 | D4 (SS) J3_RX |1 2| J3_TX + * (SCL) D16 | 3 4 | (A2) D29 GND | 3 4 | RESET (TXO) D9 |3 4| D8 (RX0) D8 + * D11 | 5 6 (A3) D28 (MOSI) D5 | 5 6 D7 (SCK) USB_RX |5 6| USB_TX + * D10 | 7 8 | (A4) D27 D10 5V | 7 8 | D6 (MISO) ---- + * 5V | 9 10 | GND J3_RX | 9 10 | J3_TX + * ------ ------ + * LCD J3 USB_BLE + */ + +#define EXP1_01_PIN 17 +#define EXP1_02_PIN 30 +#define EXP1_03_PIN 16 +#define EXP1_04_PIN 29 +#define EXP1_05_PIN 11 +#define EXP1_06_PIN 28 +#define EXP1_07_PIN 10 +#define EXP1_08_PIN 27 +#define EXP1_09_PIN -1 // 5V +#define EXP1_10_PIN -1 // GND + /** * LCD / Controller * * Only the following displays are supported: * ZONESTAR_LCD - * ANET_FULL_GRAPHICS_LCD(_ALT_WIRING)? + * CTC_A10S_A13G * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER */ #if HAS_WIRED_LCD - #define LCD_SDSS 28 + #define LCD_SDSS EXP1_06_PIN #if HAS_ADC_BUTTONS - #define SERVO0_PIN 27 // free for BLTouch/3D-Touch - #define LCD_PINS_RS 28 - #define LCD_PINS_EN 29 - #define LCD_PINS_D4 10 - #define LCD_PINS_D5 11 - #define LCD_PINS_D6 16 - #define LCD_PINS_D7 17 + #define SERVO0_PIN EXP1_08_PIN // free for BLTouch/3D-Touch + #define LCD_PINS_RS EXP1_06_PIN + #define LCD_PINS_EN EXP1_04_PIN + #define LCD_PINS_D4 EXP1_07_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_03_PIN + #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN 1 #elif IS_RRD_FG_SC @@ -188,36 +212,72 @@ // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748 - #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) - #define SERVO0_PIN 30 - #define BEEPER_PIN 27 - #define LCD_PINS_RS 29 - #define LCD_PINS_EN 16 - #define LCD_PINS_D4 11 - #define BTN_EN1 28 - #define BTN_EN2 10 - #define BTN_ENC 17 + #if ENABLED(CTC_A10S_A13G) + + /** + * CTC_A10S_A13 pinout + * + * ------ + * GND | 1 2 | 5V + * BEEPER | 3 4 | BTN_EN2 + * BTN_EN1 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * SERVO0 | 9 10 | BTN_ENC + * ------ + * LCD + */ + #define SERVO0_PIN EXP1_02_PIN + + #define BEEPER_PIN EXP1_08_PIN + + #define BTN_ENC EXP1_01_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_07_PIN + + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define BOARD_ST7920_DELAY_1 250 #define BOARD_ST7920_DELAY_2 250 #define BOARD_ST7920_DELAY_3 250 + #else - #define SERVO0_PIN 29 // free for BLTouch/3D-Touch - #define BEEPER_PIN 17 - #define LCD_PINS_RS 27 - #define LCD_PINS_EN 28 - #define LCD_PINS_D4 30 - #define BTN_EN1 11 - #define BTN_EN2 10 - #define BTN_ENC 16 + + /** + * ANET_FULL_GRAPHICS_LCD pinouts + * + * ------ ------ + * GND | 1 2 | 5V - | 1 2 | - + * LCD_RS | 3 4 | BTN_EN2 - | 3 4 | 5V + * LCD_EN 5 6 | BTN_EN1 - 5 6 | - + * SERVO0 | 7 8 | BTN_ENC RESET | 7 8 | GND + * LCD_D4 | 9 10 | BEEPER_PIN - | 9 10 | 3V3 + * ------ ------ + * LCD J3 + */ + #define SERVO0_PIN EXP1_04_PIN // Free for BLTouch/3D-Touch + + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_03_PIN + #define BTN_EN1 EXP1_05_PIN + #define BTN_EN2 EXP1_07_PIN + + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_EN EXP1_06_PIN + #define LCD_PINS_D4 EXP1_02_PIN + #define BOARD_ST7920_DELAY_1 125 #define BOARD_ST7920_DELAY_2 63 #define BOARD_ST7920_DELAY_3 125 + #endif #endif #else - #define SERVO0_PIN 27 + #define SERVO0_PIN EXP1_08_PIN #endif #ifndef FIL_RUNOUT_PIN From 95878df30d737fd08f337491f7e19332fe7ac5ac Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Sun, 31 Dec 2023 22:00:57 +0100 Subject: [PATCH 065/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20homing=20with=20FT?= =?UTF-8?q?=5FMOTION=20(#26595)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/ft_motion.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index 0e1ade69f0fb..ba1361f922b8 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -501,11 +501,13 @@ void FTMotion::loadBlockData(block_t * const current_block) { ratio = moveDist * oneOverLength; - /* Keep for comprehension 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 - f_e = spm * current_block->final_rate; // (steps/s) End feedrate + f_s = spm * current_block->initial_rate; // (steps/s) Start feedrate + + const float f_e = spm * current_block->final_rate; // (steps/s) End feedrate + + /* Keep for comprehension 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 @@ -527,10 +529,6 @@ void FTMotion::loadBlockData(block_t * const current_block) { T3 = (F_n - f_e) / a; // (s) Decel Time = difference in feedrate over acceleration */ - const float spm = totalLength / current_block->step_event_count, - f_s = spm * current_block->initial_rate, - f_e = spm * current_block->final_rate; - const float accel = current_block->acceleration, oneOverAccel = 1.0f / accel; From 13e82fa44a842e2d2f3569fb62131b206442ec4a Mon Sep 17 00:00:00 2001 From: nagubash <40751501+nagendras176@users.noreply.github.com> Date: Mon, 1 Jan 2024 02:33:04 +0530 Subject: [PATCH 066/236] =?UTF-8?q?=F0=9F=94=A8=20Fix=20formatting=20issue?= =?UTF-8?q?=20in=20Makefile=20(#26599)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b56f8e32056a..11e908ef8342 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CONTAINER_IMAGE := marlin-dev help: @echo "Tasks for local development:" - @echo "* format-pins: Reformat all pins files + @echo "* format-pins: Reformat all pins files" @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" From 99c570212ddfd39a749b07419a3d3fb9213d7acd Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 1 Jan 2024 00:24:20 +0000 Subject: [PATCH 067/236] [cron] Bump distribution date (2024-01-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 9609a5eaf187..20442791431f 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-12-31" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 f6455682bc28..1e97cfcb1941 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-12-31" + #define STRING_DISTRIBUTION_DATE "2024-01-01" #endif /** From 1d615717e80e4c39bfa49f34d9b8f3955d7f8d47 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 31 Dec 2023 03:30:53 -0600 Subject: [PATCH 068/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Pyt?= =?UTF-8?q?hon=20version=20of=20pins=20formatting=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/scripts/pinsformat.py | 265 ++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100755 buildroot/share/scripts/pinsformat.py diff --git a/buildroot/share/scripts/pinsformat.py b/buildroot/share/scripts/pinsformat.py new file mode 100755 index 000000000000..3a376ecc7e0f --- /dev/null +++ b/buildroot/share/scripts/pinsformat.py @@ -0,0 +1,265 @@ +#!/usr/bin/env python3 + +# +# Formatter script for pins_MYPINS.h files +# +# Usage: pinsformat.py [infile] [outfile] +# +# With no parameters convert STDIN to STDOUT +# + +import sys, re + +do_log = False +def logmsg(msg, line): + if do_log: print(msg, line) + +col_comment = 50 + +# String lpad / rpad +def lpad(astr, fill, c=None): + if not fill: return astr + if c == None: c = ' ' + need = fill - len(astr) + return astr if need <= 0 else (need * c) + astr + +def rpad(astr, fill, c=None): + if not fill: return astr + if c == None: c = ' ' + need = fill - len(astr) + return astr if need <= 0 else astr + (need * c) + +# Pin patterns +mpatt = [ r'-?\d{1,3}', r'P[A-I]\d+', r'P\d_\d+', r'Pin[A-Z]\d\b' ] +mstr = '|'.join(mpatt) +mexpr = [ re.compile(f'^{m}$') for m in mpatt ] + +# Corrsponding padding for each pattern +ppad = [ 3, 4, 5, 5 ] + +# Match a define line +definePatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+\s+({mstr})\s*(//.*)?$') + +def format_pins(argv): + src_file = 'stdin' + dst_file = None + + scnt = 0 + for arg in argv: + if arg == '-v': + do_log = True + elif scnt == 0: + # Get a source file if specified. Default destination is the same file + src_file = dst_file = arg + scnt += 1 + elif scnt == 1: + # Get destination file if specified + dst_file = arg + scnt += 1 + + # No text to process yet + file_text = '' + + if src_file == 'stdin': + # If no source file specified read from STDIN + file_text = sys.stdin.read() + else: + # Open the file src_file + with open(src_file, 'r') as rf: + file_text = rf.read() + + if len(file_text) == 0: + print('No text to process') + return + + # Read from file or STDIN until it terminates + filtered = process_text(file_text) + if dst_file: + with open(dst_file, 'w') as wf: + wf.write(filtered) + else: + print(filtered) + +# Find the pin pattern so non-pin defines can be skipped +def get_pin_pattern(txt): + r = '' + m = 0 + match_count = [ 0, 0, 0, 0 ] + + # Find the most common matching pattern + match_threshold = 5 + for line in txt.split('\n'): + r = definePatt.match(line) + if r == None: continue + ind = -1 + for p in mexpr: + ind += 1 + if not p.match(r[2]): continue + match_count[ind] += 1 + if match_count[ind] >= match_threshold: + return { 'match': mpatt[ind], 'pad':ppad[ind] } + return None + +def process_text(txt): + if len(txt) == 0: return '(no text)' + patt = get_pin_pattern(txt) + if patt == None: return txt + + pindefPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(' + patt['match'] + r')\s*(//.*)?$') + noPinPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(-1)\s*(//.*)?$') + skipPatt1 = re.compile(r'^(\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 = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(0x[0-9A-Fa-f]+|\d+|.+[a-z].+)\s*(//.*)?$') + aliasPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+([A-Z_][A-Z0-9_()]+)\s*(//.*)?$') + switchPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s*(//.*)?$') + undefPatt = re.compile(r'^(\s*(//)?#undef)\s+([A-Z_][A-Z0-9_]+)\s*(//.*)?$') + defPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+([-_\w]+)\s*(//.*)?$') + condPatt = re.compile(r'^(\s*(//)?#(if|ifn?def|else|elif)(\s+\S+)*)\s+(//.*)$') + commPatt = re.compile(r'^\s{20,}(//.*)?$') + + col_value_lj = col_comment - patt['pad'] - 2 + col_value_rj = col_comment - 3 + + # + # #define SKIP_ME + # + def trySkip1(d): + if skipPatt1.match(d['line']) == None: return False + logmsg("skip:", d['line']) + return True + + # + # #define MY_PIN [pin] + # + def tryPindef(d): + line = d['line'] + r = pindefPatt.match(line) + if r == None: return False + logmsg("pin:", line) + pinnum = r[4] if r[4][0] == 'P' else lpad(r[4], patt['pad']) + line = r[1] + ' ' + r[3] + line = rpad(line, col_value_lj) + pinnum + if r[5]: line = rpad(line, col_comment) + r[5] + d['line'] = line + return True + + # + # #define MY_PIN -1 + # + def tryNoPin(d): + line = d['line'] + r = noPinPatt.match(line) + if r == None: return False + logmsg("pin -1:", line) + line = r[1] + ' ' + r[3] + line = rpad(line, col_value_lj) + '-1' + if r[5]: line = rpad(line, col_comment) + r[5] + d['line'] = line + return True + + # + # #define SKIP_ME_TOO + # + def trySkip2(d): + if skipPatt2.match( d['line']) == None: return False + logmsg("skip:", d['line']) + return True + + # + # #define ALIAS OTHER + # + def tryAlias(d): + line = d['line'] + r = aliasPatt.match(line) + if r == None: return False + logmsg("alias:", line) + line = f'{r[1]} {r[3]}' + line += lpad(r[4], col_value_rj + 1 - len(line)) + if r[5]: line = rpad(line, col_comment) + r[5] + d['line'] = line + return True + + # + # #define SWITCH + # + def trySwitch(d): + line = d['line'] + r = switchPatt.match(line) + if r == None: return False + logmsg("switch:", line) + line = f'{r[1]} {r[3]}' + if r[4]: line = rpad(line, col_comment) + r[4] + d['line'] = line + d['check_comment_next'] = True + return True + + # + # #define ... + # + def tryDef(d): + line = d['line'] + r = defPatt.match(line) + if r == None: return False + logmsg("def:", line) + line = f'{r[1]} {r[3]} ' + line += lpad(r[4], col_value_rj + 1 - len(line)) + if r[5]: line = rpad(line, col_comment - 1) + ' ' + r[5] + d['line'] = line + return True + + # + # #undef ... + # + def tryUndef(d): + line = d['line'] + r = undefPatt.match(line) + if r == None: return False + logmsg("undef:", line) + line = f'{r[1]} {r[3]}' + if r[4]: line = rpad(line, col_comment) + r[4] + d['line'] = line + return True + + # + # #if ... + # + def tryCond(d): + line = d['line'] + r = condPatt.match(line) + if r == None: return False + logmsg("cond:", line) + line = rpad(r[1], col_comment) + r[5] + d['line'] = line + d['check_comment_next'] = True + return True + + out = '' + wDict = { 'check_comment_next': False } + + # Transform each line and add it to the output + for line in txt.split('\n'): + wDict['line'] = line + if wDict['check_comment_next']: + r = commPatt.match(line) + wDict['check_comment_next'] = (r != None) + + if wDict['check_comment_next']: + # Comments in column 45 + line = rpad('', col_comment) + r[1] + + elif trySkip1(wDict): pass #define SKIP_ME + elif tryPindef(wDict): pass #define MY_PIN [pin] + elif tryNoPin(wDict): pass #define MY_PIN -1 + elif trySkip2(wDict): pass #define SKIP_ME_TOO + elif tryAlias(wDict): pass #define ALIAS OTHER + elif trySwitch(wDict): pass #define SWITCH + elif tryDef(wDict): pass #define ... + elif tryUndef(wDict): pass #undef ... + elif tryCond(wDict): pass #if ... + + out += wDict['line'] + '\n' + + return re.sub('\n\n$', '\n', re.sub(r'\n\n+', '\n\n', out)) + +# Python standard startup for command line with arguments +if __name__ == '__main__': + format_pins(sys.argv[1:]) From 3b6f1bff8b3fc31b1d82ea420b3b74a50f599692 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 1 Jan 2024 00:50:46 -0600 Subject: [PATCH 069/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Upd?= =?UTF-8?q?ate=20pinsformat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/scripts/pinsformat.js | 30 +++++++++------ buildroot/share/scripts/pinsformat.py | 53 +++++++++++++++------------ 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/buildroot/share/scripts/pinsformat.js b/buildroot/share/scripts/pinsformat.js index 89e99b73bd8f..41bdfdab871a 100755 --- a/buildroot/share/scripts/pinsformat.js +++ b/buildroot/share/scripts/pinsformat.js @@ -10,6 +10,11 @@ const fs = require("fs"); +var do_log = false +function logmsg(msg, line='') { + if (do_log) console.log(msg, line); +} + // String lpad / rpad String.prototype.lpad = function(len, chr) { if (!len) return this; @@ -37,7 +42,7 @@ String.prototype.concat_with_space = function(str) { }; 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'), + definePatt = new RegExp(`^\\s*(//)?#define\\s+[A-Z_][A-Z0-9_]+\\s+(${'|'.join(mpatt)})\\s*(//.*)?$`, 'gm'), ppad = [ 3, 4, 5, 5 ], col_comment = 50, col_value_rj = col_comment - 3; @@ -47,11 +52,11 @@ for (let m of mpatt) mexpr.push(new RegExp('^' + m + '$')); const argv = process.argv.slice(2), argc = argv.length; -var src_file = 0, src_name = 'STDIN', dst_file, do_log = false; +var src_file = 0, dst_file; if (argc > 0) { let ind = 0; if (argv[0] == '-v') { do_log = true; ind++; } - dst_file = src_file = src_name = argv[ind++]; + dst_file = src_file = argv[ind++]; if (ind < argc) dst_file = argv[ind]; } @@ -115,13 +120,13 @@ function process_text(txt) { // // #define SKIP_ME // - if (do_log) console.log("skip:", line); + logmsg("skip:", line); } else if ((r = pindefPatt.exec(line)) !== null) { // // #define MY_PIN [pin] // - if (do_log) console.log("pin:", line); + logmsg("pin:", line); const pinnum = r[4].charAt(0) == 'P' ? r[4] : r[4].lpad(patt.pad); line = r[1] + ' ' + r[3]; line = line.rpad(col_value_lj).concat_with_space(pinnum); @@ -131,7 +136,7 @@ function process_text(txt) { // // #define MY_PIN -1 // - if (do_log) console.log("pin -1:", line); + logmsg("pin -1:", line); line = r[1] + ' ' + r[3]; line = line.rpad(col_value_lj).concat_with_space('-1'); if (r[5]) line = line.rpad(col_comment).concat_with_space(r[5]); @@ -139,14 +144,15 @@ function process_text(txt) { else if (skipPatt2.exec(line) !== null || skipPatt3.exec(line) !== null) { // // #define SKIP_ME + // #else, #endif // - if (do_log) console.log("skip:", line); + logmsg("skip:", line); } else if ((r = aliasPatt.exec(line)) !== null) { // // #define ALIAS OTHER // - if (do_log) console.log("alias:", line); + logmsg("alias:", line); line = r[1] + ' ' + r[3]; line = line.concat_with_space(r[4].lpad(col_value_rj + 1 - line.length)); if (r[5]) line = line.rpad(col_comment).concat_with_space(r[5]); @@ -155,7 +161,7 @@ function process_text(txt) { // // #define SWITCH // - if (do_log) console.log("switch:", line); + logmsg("switch:", line); line = r[1] + ' ' + r[3]; if (r[4]) line = line.rpad(col_comment).concat_with_space(r[4]); check_comment_next = true; @@ -164,7 +170,7 @@ function process_text(txt) { // // #define ... // - if (do_log) console.log("def:", line); + logmsg("def:", line); line = r[1] + ' ' + r[3] + ' '; line = line.concat_with_space(r[4].lpad(col_value_rj + 1 - line.length)); if (r[5]) line = line.rpad(col_comment - 1) + ' ' + r[5]; @@ -173,7 +179,7 @@ function process_text(txt) { // // #undef ... // - if (do_log) console.log("undef:", line); + logmsg("undef:", line); line = r[1] + ' ' + r[3]; if (r[4]) line = line.rpad(col_comment).concat_with_space(r[4]); } @@ -181,7 +187,7 @@ function process_text(txt) { // // #if, #ifdef, #ifndef, #elif ... // - if (do_log) console.log("cond:", line); + logmsg("cond:", line); line = r[1].rpad(col_comment).concat_with_space(r[5]); check_comment_next = true; } diff --git a/buildroot/share/scripts/pinsformat.py b/buildroot/share/scripts/pinsformat.py index 3a376ecc7e0f..b49ae4931d09 100755 --- a/buildroot/share/scripts/pinsformat.py +++ b/buildroot/share/scripts/pinsformat.py @@ -17,15 +17,13 @@ def logmsg(msg, line): col_comment = 50 # String lpad / rpad -def lpad(astr, fill, c=None): +def lpad(astr, fill, c=' '): if not fill: return astr - if c == None: c = ' ' need = fill - len(astr) return astr if need <= 0 else (need * c) + astr -def rpad(astr, fill, c=None): +def rpad(astr, fill, c=' '): if not fill: return astr - if c == None: c = ' ' need = fill - len(astr) return astr if need <= 0 else astr + (need * c) @@ -64,9 +62,8 @@ def format_pins(argv): # If no source file specified read from STDIN file_text = sys.stdin.read() else: - # Open the file src_file - with open(src_file, 'r') as rf: - file_text = rf.read() + # Open and read the file src_file + with open(src_file, 'r') as rf: file_text = rf.read() if len(file_text) == 0: print('No text to process') @@ -75,8 +72,7 @@ def format_pins(argv): # Read from file or STDIN until it terminates filtered = process_text(file_text) if dst_file: - with open(dst_file, 'w') as wf: - wf.write(filtered) + with open(dst_file, 'w') as wf: wf.write(filtered) else: print(filtered) @@ -105,16 +101,18 @@ def process_text(txt): patt = get_pin_pattern(txt) if patt == None: return txt - pindefPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(' + patt['match'] + r')\s*(//.*)?$') - noPinPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(-1)\s*(//.*)?$') - skipPatt1 = re.compile(r'^(\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 = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(0x[0-9A-Fa-f]+|\d+|.+[a-z].+)\s*(//.*)?$') - aliasPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+([A-Z_][A-Z0-9_()]+)\s*(//.*)?$') + pmatch = patt['match'] + pindefPatt = re.compile(rf'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+({pmatch})\s*(//.*)?$') + noPinPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(-1)\s*(//.*)?$') + skipPatt1 = re.compile(r'^(\s*(//)?#define)\s+(AT90USB|USBCON|(BOARD|DAC|FLASH|HAS|IS|USE)_.+|.+_(ADDRESS|AVAILABLE|BAUDRATE|CLOCK|CONNECTION|DEFAULT|ERROR|EXTRUDERS|FREQ|ITEM|MKS_BASE_VERSION|MODULE|NAME|ONLY|ORIENTATION|PERIOD|RANGE|RATE|READ_RETRIES|SERIAL|SIZE|SPI|STATE|STEP|TIMER|VERSION))\s+(.+)\s*(//.*)?$') + skipPatt2 = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+(0x[0-9A-Fa-f]+|\d+|.+[a-z].+)\s*(//.*)?$') + skipPatt3 = re.compile(r'^\s*#e(lse|ndif)\b.*$') + aliasPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+([A-Z_][A-Z0-9_()]+)\s*(//.*)?$') switchPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s*(//.*)?$') - undefPatt = re.compile(r'^(\s*(//)?#undef)\s+([A-Z_][A-Z0-9_]+)\s*(//.*)?$') - defPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+([-_\w]+)\s*(//.*)?$') - condPatt = re.compile(r'^(\s*(//)?#(if|ifn?def|else|elif)(\s+\S+)*)\s+(//.*)$') - commPatt = re.compile(r'^\s{20,}(//.*)?$') + undefPatt = re.compile(r'^(\s*(//)?#undef)\s+([A-Z_][A-Z0-9_]+)\s*(//.*)?$') + defPatt = re.compile(r'^(\s*(//)?#define)\s+([A-Z_][A-Z0-9_]+)\s+([-_\w]+)\s*(//.*)?$') + condPatt = re.compile(r'^(\s*(//)?#(if|ifn?def|elif)(\s+\S+)*)\s+(//.*)$') + commPatt = re.compile(r'^\s{20,}(//.*)?$') col_value_lj = col_comment - patt['pad'] - 2 col_value_rj = col_comment - 3 @@ -136,7 +134,7 @@ def tryPindef(d): if r == None: return False logmsg("pin:", line) pinnum = r[4] if r[4][0] == 'P' else lpad(r[4], patt['pad']) - line = r[1] + ' ' + r[3] + line = f'{r[1]} {r[3]}' line = rpad(line, col_value_lj) + pinnum if r[5]: line = rpad(line, col_comment) + r[5] d['line'] = line @@ -150,7 +148,7 @@ def tryNoPin(d): r = noPinPatt.match(line) if r == None: return False logmsg("pin -1:", line) - line = r[1] + ' ' + r[3] + line = f'{r[1]} {r[3]}' line = rpad(line, col_value_lj) + '-1' if r[5]: line = rpad(line, col_comment) + r[5] d['line'] = line @@ -164,6 +162,14 @@ def trySkip2(d): logmsg("skip:", d['line']) return True + # + # #else|endif + # + def trySkip3(d): + if skipPatt3.match( d['line']) == None: return False + logmsg("skip:", d['line']) + return True + # # #define ALIAS OTHER # @@ -220,7 +226,7 @@ def tryUndef(d): return True # - # #if ... + # #if|ifdef|ifndef|elif ... # def tryCond(d): line = d['line'] @@ -243,18 +249,19 @@ def tryCond(d): wDict['check_comment_next'] = (r != None) if wDict['check_comment_next']: - # Comments in column 45 + # Comments in column 50 line = rpad('', col_comment) + r[1] elif trySkip1(wDict): pass #define SKIP_ME elif tryPindef(wDict): pass #define MY_PIN [pin] elif tryNoPin(wDict): pass #define MY_PIN -1 elif trySkip2(wDict): pass #define SKIP_ME_TOO + elif trySkip3(wDict): pass #else|endif elif tryAlias(wDict): pass #define ALIAS OTHER elif trySwitch(wDict): pass #define SWITCH elif tryDef(wDict): pass #define ... elif tryUndef(wDict): pass #undef ... - elif tryCond(wDict): pass #if ... + elif tryCond(wDict): pass #if|ifdef|ifndef|elif ... out += wDict['line'] + '\n' From f02fa6339f003a8a5074131b50e0905f102ee8e4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 2 Jan 2024 00:21:06 +0000 Subject: [PATCH 070/236] [cron] Bump distribution date (2024-01-02) --- 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 20442791431f..f910608ffe00 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 "2024-01-01" +//#define STRING_DISTRIBUTION_DATE "2024-01-02" /** * 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 1e97cfcb1941..eeb4aee587f3 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 "2024-01-01" + #define STRING_DISTRIBUTION_DATE "2024-01-02" #endif /** From 5b74e25108a47acad41d9a50560cd1fbae38040a Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 2 Jan 2024 20:25:26 +1300 Subject: [PATCH 071/236] =?UTF-8?q?=F0=9F=94=A8=20BSD=20string=20workaroun?= =?UTF-8?q?d=20(#26532)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/LINUX/HAL.cpp | 46 ++++++++++++++++++ Marlin/src/HAL/LINUX/HAL.h | 14 ++++++ Marlin/src/HAL/LINUX/include/Arduino.h | 3 -- Marlin/src/HAL/NATIVE_SIM/HAL.cpp | 67 ++++++++++++++++++++++++++ Marlin/src/HAL/NATIVE_SIM/HAL.h | 10 ++++ Marlin/src/inc/Conditionals_post.h | 20 ++++---- ini/native.ini | 9 +++- 7 files changed, 154 insertions(+), 15 deletions(-) create mode 100644 Marlin/src/HAL/NATIVE_SIM/HAL.cpp diff --git a/Marlin/src/HAL/LINUX/HAL.cpp b/Marlin/src/HAL/LINUX/HAL.cpp index 6a767c76e7b7..a90819b6b0c1 100644 --- a/Marlin/src/HAL/LINUX/HAL.cpp +++ b/Marlin/src/HAL/LINUX/HAL.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #ifdef __PLAT_LINUX__ #include "../../inc/MarlinConfig.h" @@ -57,4 +58,49 @@ uint16_t MarlinHAL::adc_value() { void MarlinHAL::reboot() { /* Reset the application state and GPIO */ } +// ------------------------ +// BSD String +// ------------------------ + +/** + * Copyright (c) 1998, 2015 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef HAS_LIBBSD + + /** + * Copy string src to buffer dst of size dsize. At most dsize-1 + * chars will be copied. Always NUL terminates (unless dsize == 0). + * Returns strlen(src); if retval >= dsize, truncation occurred. + */ + size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) { + const char *osrc = src; + size_t nleft = dsize; + + // Copy as many bytes as will fit. + if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break; + + // Not enough room in dst, add NUL and traverse rest of src. + if (nleft == 0) { + if (dsize != 0) *dst = '\0'; // NUL-terminate dst + while (*src++) { /* nada */ } + } + + return (src - osrc - 1); // count does not include NUL + } + +#endif // HAS_LIBBSD + #endif // __PLAT_LINUX__ diff --git a/Marlin/src/HAL/LINUX/HAL.h b/Marlin/src/HAL/LINUX/HAL.h index e84516d4dca9..bb5fb73e0502 100644 --- a/Marlin/src/HAL/LINUX/HAL.h +++ b/Marlin/src/HAL/LINUX/HAL.h @@ -26,6 +26,11 @@ #include #include #include + +#ifdef HAS_LIBBSD + #include +#endif + #undef min #undef max #include @@ -162,4 +167,13 @@ class MarlinHAL { } static void set_pwm_frequency(const pin_t, int) {} + + #ifndef HAS_LIBBSD + /** + * Redirect missing strlcpy here + */ + static size_t _strlcpy(char *dst, const char *src, size_t dsize); + #define strlcpy hal._strlcpy + #endif + }; diff --git a/Marlin/src/HAL/LINUX/include/Arduino.h b/Marlin/src/HAL/LINUX/include/Arduino.h index 6e9c80ee07dc..f05aaed88083 100644 --- a/Marlin/src/HAL/LINUX/include/Arduino.h +++ b/Marlin/src/HAL/LINUX/include/Arduino.h @@ -28,9 +28,6 @@ #include -#define strlcpy(A, B, C) strncpy(A, B, (C) - 1) -#define strlcpy_P(A, B, C) strncpy_P(A, B, (C) - 1) - #define HIGH 0x01 #define LOW 0x00 diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.cpp b/Marlin/src/HAL/NATIVE_SIM/HAL.cpp new file mode 100644 index 000000000000..18c225fb3f15 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.cpp @@ -0,0 +1,67 @@ +/** + * 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 . + * + */ + +/** + * Copyright (c) 1998, 2015 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#ifndef HAS_LIBBSD + + #include "HAL.h" + + /** + * Copy string src to buffer dst of size dsize. At most dsize-1 + * chars will be copied. Always NUL terminates (unless dsize == 0). + * Returns strlen(src); if retval >= dsize, truncation occurred. + */ + size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) { + const char *osrc = src; + size_t nleft = dsize; + + // Copy as many bytes as will fit. + if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break; + + // Not enough room in dst, add NUL and traverse rest of src. + if (nleft == 0) { + if (dsize != 0) *dst = '\0'; // NUL-terminate dst + while (*src++) { /* nada */ } + } + + return (src - osrc - 1); // count does not include NUL + } + +#endif // HAS_LIBBSD +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.h b/Marlin/src/HAL/NATIVE_SIM/HAL.h index 8e88e5023026..f57e065a8e82 100644 --- a/Marlin/src/HAL/NATIVE_SIM/HAL.h +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -263,4 +263,14 @@ class MarlinHAL { analogWrite(pin, v); } + static void set_pwm_frequency(const pin_t, int) {} + + #ifndef HAS_LIBBSD + /** + * Redirect missing strlcpy here + */ + static size_t _strlcpy(char *dst, const char *src, size_t dsize); + #define strlcpy hal._strlcpy + #endif + }; diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 04e96177b5d1..e87681684d42 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -30,6 +30,16 @@ // Extras for CI testing #endif +// Arduino IDE with Teensy Additions +#ifdef TEENSYDUINO + #undef max + #define max(a,b) ((a)>(b)?(a):(b)) + #undef min + #define min(a,b) ((a)<(b)?(a):(b)) + #undef NOT_A_PIN // Override Teensyduino legacy CapSense define work-around + #define NOT_A_PIN 0 // For PINS_DEBUGGING +#endif + // ADC #ifdef BOARD_ADC_VREF_MV #define ADC_VREF_MV BOARD_ADC_VREF_MV @@ -64,16 +74,6 @@ #undef OTA_FIRMWARE_UPDATE #endif -#ifdef TEENSYDUINO - #undef max - #define max(a,b) ((a)>(b)?(a):(b)) - #undef min - #define min(a,b) ((a)<(b)?(a):(b)) - - #undef NOT_A_PIN // Override Teensyduino legacy CapSense define work-around - #define NOT_A_PIN 0 // For PINS_DEBUGGING -#endif - /** * Axis lengths and center */ diff --git a/ini/native.ini b/ini/native.ini index 40511beb6fc2..86608ff3d71a 100644 --- a/ini/native.ini +++ b/ini/native.ini @@ -36,7 +36,8 @@ build_src_filter = ${common.default_src_filter} + [simulator_common] platform = native framework = -build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/u8g +build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS + -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/u8g build_src_flags = -Wall -Wno-expansion-to-defined -Wno-deprecated-declarations -Wcast-align release_flags = -g0 -O3 -flto debug_build_flags = -fstack-protector-strong -g -g3 -ggdb @@ -99,6 +100,7 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags} [simulator_macos] build_unflags = -lGL -fstack-protector-strong build_flags = + -DHAS_LIBBSD -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/SDL2/ @@ -135,5 +137,8 @@ custom_gcc = g++ [env:simulator_windows] extends = simulator_common build_src_flags = ${simulator_common.build_src_flags} -fpermissive -build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp +build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} + -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows + -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp + -DHAS_LIBBSD build_type = debug From 7c159a20e538e42af5185c80c660c90c0377b909 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 3 Jan 2024 00:21:14 +0000 Subject: [PATCH 072/236] [cron] Bump distribution date (2024-01-03) --- 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 f910608ffe00..79c3ef62533c 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 "2024-01-02" +//#define STRING_DISTRIBUTION_DATE "2024-01-03" /** * 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 eeb4aee587f3..4007aaccef0f 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 "2024-01-02" + #define STRING_DISTRIBUTION_DATE "2024-01-03" #endif /** From 1ac6428c82aa72cc41c0c9f758659b71e7fce1cf Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:52:12 +1300 Subject: [PATCH 073/236] =?UTF-8?q?=F0=9F=94=AA=20Options=20to=20slim=20M1?= =?UTF-8?q?11,=20remove=20M115=20(#26603)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration_adv.h | 12 ++++++++++++ Marlin/src/core/serial.h | 21 ++++++++------------ Marlin/src/gcode/control/M111.cpp | 32 ++++++++++++++++++------------- Marlin/src/gcode/gcode.cpp | 5 ++++- Marlin/src/gcode/gcode.h | 5 ++++- Marlin/src/gcode/host/M115.cpp | 7 ++++++- Marlin/src/inc/Warnings.cpp | 8 ++++++++ ini/features.ini | 1 + platformio.ini | 1 - 9 files changed, 62 insertions(+), 30 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 72aee115884d..d19fb1d5033d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3935,6 +3935,18 @@ //#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW +/** + * Enable M111 debug flags 1=ECHO, 2=INFO, 4=ERRORS (unimplemented). + * Disable to save some flash. Some hosts (Repetier Host) may rely on this feature. + */ +#define DEBUG_FLAGS_GCODE + +/** + * M115 - Report capabilites. Disable to save ~1150 bytes of flash. + * Some hosts (and serial TFT displays) rely on this feature. + */ +#define REPORT_CAPABILITIES_GCODE + /** * Enable this option for a leaner build of Marlin that removes * workspace offsets to slightly optimize performance. diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index ff02ebedc2d7..f9b73e6d2667 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -33,19 +33,14 @@ // enum MarlinDebugFlags : uint8_t { MARLIN_DEBUG_NONE = 0, - MARLIN_DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed - MARLIN_DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output - MARLIN_DEBUG_ERRORS = _BV(2), ///< Not implemented - MARLIN_DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands - MARLIN_DEBUG_COMMUNICATION = _BV(4), ///< Not implemented - #if ENABLED(DEBUG_LEVELING_FEATURE) - MARLIN_DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling - MARLIN_DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling - #else - MARLIN_DEBUG_LEVELING = 0, - MARLIN_DEBUG_MESH_ADJUST = 0, - #endif - MARLIN_DEBUG_ALL = 0xFF + MARLIN_DEBUG_ECHO = TERN0(DEBUG_FLAGS_GCODE, _BV(0)), //!< Echo commands in order as they are processed + MARLIN_DEBUG_INFO = TERN0(DEBUG_FLAGS_GCODE, _BV(1)), //!< Print messages for code that has debug output + MARLIN_DEBUG_ERRORS = TERN0(DEBUG_FLAGS_GCODE, _BV(2)), //!< Not implemented + MARLIN_DEBUG_DRYRUN = _BV(3), //!< Ignore temperature setting and E movement commands + MARLIN_DEBUG_COMMUNICATION = TERN0(DEBUG_FLAGS_GCODE, _BV(4)), //!< Not implemented + MARLIN_DEBUG_LEVELING = TERN0(DEBUG_LEVELING_FEATURE, _BV(5)), //!< Print detailed output for homing and leveling + MARLIN_DEBUG_MESH_ADJUST = TERN0(DEBUG_LEVELING_FEATURE, _BV(6)), //!< UBL bed leveling + MARLIN_DEBUG_ALL = MARLIN_DEBUG_ECHO|MARLIN_DEBUG_INFO|MARLIN_DEBUG_ERRORS|MARLIN_DEBUG_COMMUNICATION|MARLIN_DEBUG_LEVELING|MARLIN_DEBUG_MESH_ADJUST }; extern uint8_t marlin_debug_flags; diff --git a/Marlin/src/gcode/control/M111.cpp b/Marlin/src/gcode/control/M111.cpp index 02f37f84974e..a8e549b69d22 100644 --- a/Marlin/src/gcode/control/M111.cpp +++ b/Marlin/src/gcode/control/M111.cpp @@ -20,6 +20,7 @@ * */ +#include "../../inc/MarlinConfig.h" #include "../gcode.h" /** @@ -27,18 +28,25 @@ */ void GcodeSuite::M111() { if (parser.seenval('S')) marlin_debug_flags = parser.value_byte(); - - static PGMSTR(str_debug_1, STR_DEBUG_ECHO); - static PGMSTR(str_debug_2, STR_DEBUG_INFO); - static PGMSTR(str_debug_4, STR_DEBUG_ERRORS); + #if ENABLED(DEBUG_FLAGS_GCODE) + static PGMSTR(str_debug_1, STR_DEBUG_ECHO); + static PGMSTR(str_debug_2, STR_DEBUG_INFO); + static PGMSTR(str_debug_4, STR_DEBUG_ERRORS); + #endif static PGMSTR(str_debug_8, STR_DEBUG_DRYRUN); - static PGMSTR(str_debug_16, STR_DEBUG_COMMUNICATION); + #if ENABLED(DEBUG_FLAGS_GCODE) + static PGMSTR(str_debug_16, STR_DEBUG_COMMUNICATION); + #endif #if ENABLED(DEBUG_LEVELING_FEATURE) static PGMSTR(str_debug_detail, STR_DEBUG_DETAIL); #endif static PGM_P const debug_strings[] PROGMEM = { - str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16, + TERN(DEBUG_FLAGS_GCODE, str_debug_1, nullptr), + TERN(DEBUG_FLAGS_GCODE, str_debug_2, nullptr), + TERN(DEBUG_FLAGS_GCODE, str_debug_4, nullptr), + str_debug_8, + TERN(DEBUG_FLAGS_GCODE, str_debug_16, nullptr), TERN_(DEBUG_LEVELING_FEATURE, str_debug_detail) }; @@ -47,31 +55,29 @@ void GcodeSuite::M111() { if (marlin_debug_flags) { uint8_t comma = 0; for (uint8_t i = 0; i < COUNT(debug_strings); ++i) { - if (TEST(marlin_debug_flags, i)) { + PGM_P const pstr = (PGM_P)pgm_read_ptr(&debug_strings[i]); + if (pstr && TEST(marlin_debug_flags, i)) { if (comma++) SERIAL_CHAR(','); - SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&debug_strings[i])); + SERIAL_ECHOPGM_P(pstr); } } } else { SERIAL_ECHOPGM(STR_DEBUG_OFF); - #if !defined(__AVR__) || !defined(USBCON) + #if !(defined(__AVR__) && defined(USBCON)) #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS) SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns()); #endif - #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS) SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors()); #endif - #if ENABLED(SERIAL_STATS_DROPPED_RX) SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped()); #endif - #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); #endif - #endif // !__AVR__ || !USBCON + #endif // !(__AVR__ && USBCON) } SERIAL_EOL(); } diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 6a0e8cb17142..4266136ef4c0 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -669,7 +669,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes case 114: M114(); break; // M114: Report current position - case 115: M115(); break; // M115: Report capabilities + + #if ENABLED(REPORT_CAPABILITIES_GCODE) + case 115: M115(); break; // M115: Report capabilities + #endif case 117: TERN_(HAS_STATUS_MESSAGE, M117()); break; // M117: Set LCD message text, if possible diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index fffd0d714bea..d5adf6c41567 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -760,7 +760,10 @@ class GcodeSuite { #endif static void M114(); - static void M115(); + + #if ENABLED(REPORT_CAPABILITIES_GCODE) + static void M115(); + #endif #if HAS_STATUS_MESSAGE static void M117(); diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index 806e593fcb4a..ae8e6155077d 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -20,8 +20,11 @@ * */ -#include "../gcode.h" #include "../../inc/MarlinConfig.h" + +#if ENABLED(REPORT_CAPABILITIES_GCODE) + +#include "../gcode.h" #include "../queue.h" // for getting the command port #if ENABLED(M115_GEOMETRY_REPORT) @@ -271,3 +274,5 @@ void GcodeSuite::M115() { #endif // EXTENDED_CAPABILITIES_REPORT } + +#endif // REPORT_CAPABILITIES_GCODE diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index d239e6a7d5cf..8f260b237c94 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -42,6 +42,14 @@ #endif #endif +#if DISABLED(DEBUG_FLAGS_GCODE) + #warning "DEBUG_FLAGS_GCODE is recommended if you have space. Some hosts rely on it." +#endif + +#if DISABLED(REPORT_CAPABILITIES_GCODE) + #warning "REPORT_CAPABILITIES_GCODE is recommended if you have space. Some hosts rely on it." +#endif + #if ENABLED(LA_DEBUG) #warning "WARNING! Disable LA_DEBUG for the final build!" #endif diff --git a/ini/features.ini b/ini/features.ini index a550783a38fd..120d599dcabb 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -322,6 +322,7 @@ CNC_COORDINATE_SYSTEMS = build_src_filter=+ EXPECTED_PRINTER_CHECK = build_src_filter=+ HOST_KEEPALIVE_FEATURE = build_src_filter=+ +REPORT_CAPABILITIES_GCODE = build_src_filter=+ AUTO_REPORT_POSITION = build_src_filter=+ REPETIER_GCODE_M360 = build_src_filter=+ HAS_GCODE_M876 = build_src_filter=+ diff --git a/platformio.ini b/platformio.ini index 81f97e73b8c4..5249b790f2d0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -111,7 +111,6 @@ default_src_filter = + - - + + + - + + + + From 4a9e102c2ef96b75378195ad3b89cb1646ac4df4 Mon Sep 17 00:00:00 2001 From: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com> Date: Wed, 3 Jan 2024 06:23:41 +0530 Subject: [PATCH 074/236] =?UTF-8?q?=F0=9F=93=BA=20I3DBEE=20TECH=20Beez=20M?= =?UTF-8?q?ini=2012864=20(#26596)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 5 +++++ Marlin/src/inc/Conditionals_LCD.h | 4 ++-- Marlin/src/inc/SanityCheck.h | 10 +++++----- Marlin/src/inc/Warnings.cpp | 6 +++--- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 6 +++--- Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h | 4 ++-- 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index fd2dbbb27398..1b0e92923ef8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3015,6 +3015,11 @@ // //#define BTT_MINI_12864 +// +// BEEZ MINI 12864 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight. +// +//#define BEEZ_MINI_12864 + // // Factory display for Creality CR-10 / CR-7 / Ender-3 // https://www.aliexpress.com/item/32833148327.html diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index b501a556f8ec..a81c8639cf19 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -566,8 +566,8 @@ #define MKS_MINI_12864 #endif -// MKS_MINI_12864_V3 and BTT_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1 -#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864) +// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1 +#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) #define FYSETC_MINI_12864_2_1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index e5cba0310270..d1c84665ede3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2275,7 +2275,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #endif /** - * FYSETC/MKS/BTT Mini Panel Requirements + * FYSETC/MKS/BTT/BEEZ Mini Panel Requirements */ #if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) #ifndef NEO_RGB @@ -2283,9 +2283,9 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #define FAUX_RGB 1 #endif #if defined(NEOPIXEL_TYPE) && NEOPIXEL_TYPE != NEO_RGB - #error "Your FYSETC/MKS/BTT Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB." + #error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB." #elif defined(NEOPIXEL_PIXELS) && NEOPIXEL_PIXELS < 3 - #error "Your FYSETC/MKS/BTT Mini Panel requires NEOPIXEL_PIXELS >= 3." + #error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_PIXELS >= 3." #endif #if FAUX_RGB #undef NEO_RGB @@ -2618,8 +2618,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \ + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ + (ENABLED(MKS_MINI_12864) && NONE(MKS_LCD12864A, MKS_LCD12864B)) \ - + (ENABLED(FYSETC_MINI_12864_2_1) && NONE(MKS_MINI_12864_V3, BTT_MINI_12864)) \ - + COUNT_ENABLED(MKS_MINI_12864_V3, BTT_MINI_12864) \ + + (ENABLED(FYSETC_MINI_12864_2_1) && NONE(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864)) \ + + COUNT_ENABLED(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) \ + (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)) \ diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 8f260b237c94..384fe04c618a 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -703,16 +703,16 @@ #endif /** - * FYSETC/MKS/BTT Mini Panel backlighting + * FYSETC/MKS/BTT/BEEZ Mini Panel backlighting */ #if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS) - #warning "Your FYSETC/MKS/BTT Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS." + #warning "Your FYSETC/MKS/BTT/BEEZ Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS." #endif #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) #warning "Your FYSETC Mini Panel works best with RGB_LED." #elif ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP) - #warning "Your FYSETC/MKS/BTT Mini Panel works best with LED_USER_PRESET_STARTUP." + #warning "Your FYSETC/MKS/BTT/BEEZ Mini Panel works best with LED_USER_PRESET_STARTUP." #endif #if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && ALL(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 60ed800ba690..43196bafa91b 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -169,7 +169,7 @@ #define DOGLCD_A0 EXP1_07_PIN #define LCD_RESET_PIN -1 #elif ENABLED(FYSETC_MINI_12864_2_1) - // MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1 + // MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1, BEEZ_MINI_12864 #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 EXP1_04_PIN #define LCD_RESET_PIN EXP1_05_PIN 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 f752350cc6a9..b36ef2287aca 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -238,7 +238,7 @@ #endif /** - * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 display pinout + * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout * * Board Display * ------ ------ @@ -251,13 +251,13 @@ * EXP1 EXP1 * * - * ----- ------ + * --- ------ * | 1 | RST -- |10 9 | -- * | 2 | PA3 RX2 RESET_BTN | 8 7 | SD_DETECT * | 3 | PA2 TX2 LCD_MOSI | 6 5 EN2 * | 4 | GND -- | 4 3 | EN1 * | 5 | 5V LCD_SCK | 2 1 | -- - * ----- ------ + * --- ------ * TFT EXP2 * 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 362cfca3074d..4ab1e15cdd63 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 @@ -275,11 +275,11 @@ #elif ENABLED(FYSETC_MINI_12864_2_1) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING - #error "CAUTION! FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #error "CAUTION! FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** - * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 display pinout + * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout * * Board Display * ------ ------ From 6d407767e7692d66bc93a0012d71268770e4835c Mon Sep 17 00:00:00 2001 From: plampix Date: Wed, 3 Jan 2024 16:43:18 +0100 Subject: [PATCH 075/236] =?UTF-8?q?=F0=9F=94=A7=20CONFIGURE=5FFILAMENT=5FC?= =?UTF-8?q?HANGE=20-=20Optional=20M603=20(#26613)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 4 ++-- Marlin/Configuration_adv.h | 3 ++- Marlin/src/feature/max7219.cpp | 2 +- Marlin/src/feature/pause.cpp | 4 +++- Marlin/src/feature/pause.h | 19 ++++++++++++++----- Marlin/src/gcode/feature/pause/M603.cpp | 6 +++--- Marlin/src/gcode/gcode.cpp | 4 +++- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 4 ++-- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 2 +- Marlin/src/lcd/menu/menu_advanced.cpp | 2 +- Marlin/src/module/settings.cpp | 18 ++++++------------ buildroot/tests/BIGTREE_GTR_V1_0 | 1 + ini/features.ini | 3 ++- 14 files changed, 42 insertions(+), 32 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 1b0e92923ef8..9acdc107ca8f 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2054,7 +2054,7 @@ /** * Enable detailed logging of G28, G29, M48, etc. * Turn on with the command 'M111 S32'. - * NOTE: Requires a lot of PROGMEM! + * NOTE: Requires a lot of flash! */ //#define DEBUG_LEVELING_FEATURE @@ -2343,7 +2343,7 @@ */ //#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash. #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load #if ENABLED(EEPROM_SETTINGS) //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d19fb1d5033d..10316ac9282b 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1342,7 +1342,7 @@ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm - // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + // Uncomment to enable reporting (required for "G425 V", but consumes flash). //#define CALIBRATION_REPORTING // The true location and dimension the cube/bolt/washer on the bed. @@ -2929,6 +2929,7 @@ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define CONFIGURE_FILAMENT_CHANGE // Add M603 G-code and menu items. Requires ~1.3K bytes of flash. #endif // @section tmc_smart diff --git a/Marlin/src/feature/max7219.cpp b/Marlin/src/feature/max7219.cpp index 12e4a539d3d5..6089b1a86e85 100644 --- a/Marlin/src/feature/max7219.cpp +++ b/Marlin/src/feature/max7219.cpp @@ -39,7 +39,7 @@ #if ENABLED(MAX7219_DEBUG) -#define MAX7219_ERRORS // Disable to save 406 bytes of Program Memory +#define MAX7219_ERRORS // Requires ~400 bytes of flash #include "max7219.h" diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index f098ad9c516e..8756c339e3c1 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -89,7 +89,9 @@ static xyze_pos_t resume_position; PauseMode pause_mode = PAUSE_MODE_PAUSE_PRINT; #endif -fil_change_settings_t fc_settings[EXTRUDERS]; +#if ENABLED(CONFIGURE_FILAMENT_CHANGE) + fil_change_settings_t fc_settings[EXTRUDERS]; +#endif #if HAS_MEDIA #include "../sd/cardreader.h" diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index 45f62dc31029..304c8a611d13 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -26,10 +26,6 @@ * This may be combined with related G-codes if features are consolidated. */ -typedef struct { - float unload_length, load_length; -} fil_change_settings_t; - #include "../inc/MarlinConfigPre.h" #if ENABLED(ADVANCED_PAUSE_FEATURE) @@ -69,7 +65,20 @@ enum PauseMessage : char { extern PauseMode pause_mode; #endif -extern fil_change_settings_t fc_settings[EXTRUDERS]; +typedef struct FilamentChangeSettings { + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) + float load_length, unload_length; + #else + static constexpr float load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH, + unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH; + #endif +} fil_change_settings_t; + +#if ENABLED(CONFIGURE_FILAMENT_CHANGE) + extern fil_change_settings_t fc_settings[EXTRUDERS]; +#else + constexpr fil_change_settings_t fc_settings[EXTRUDERS]; +#endif extern uint8_t did_pause_print; diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp index 0512a0d29b0b..2f24cc642136 100644 --- a/Marlin/src/gcode/feature/pause/M603.cpp +++ b/Marlin/src/gcode/feature/pause/M603.cpp @@ -20,9 +20,9 @@ * */ -#include "../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfigPre.h" -#if ENABLED(ADVANCED_PAUSE_FEATURE) +#if ENABLED(CONFIGURE_FILAMENT_CHANGE) #include "../../gcode.h" #include "../../../feature/pause.h" @@ -80,4 +80,4 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) { #endif } -#endif // ADVANCED_PAUSE_FEATURE +#endif // CONFIGURE_FILAMENT_CHANGE diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 4266136ef4c0..945da708b4e2 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -948,7 +948,9 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #if ENABLED(ADVANCED_PAUSE_FEATURE) case 600: M600(); break; // M600: Pause for Filament Change - case 603: M603(); break; // M603: Configure Filament Change + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) + case 603: M603(); break; // M603: Configure Filament Change + #endif #endif #if HAS_DUPLICATION_MODE diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index da6fda08d52d..296f46f68a32 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -2910,7 +2910,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra break; #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) case ADVANCED_LOAD: if (draw) { drawMenuItem(row, ICON_WriteEEPROM, F("Load Length")); @@ -2927,7 +2927,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra else modifyValue(fc_settings[0].unload_length, 0, EXTRUDE_MAXLENGTH, 1); break; - #endif // ADVANCED_PAUSE_FEATURE + #endif // CONFIGURE_FILAMENT_CHANGE #if ENABLED(PREVENT_COLD_EXTRUSION) case ADVANCED_COLD_EXTRUDE: diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 894102e8a3bb..5262dba385be 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -3302,7 +3302,7 @@ void drawFilSetMenu() { #if ENABLED(PREVENT_COLD_EXTRUSION) EDIT_ITEM(ICON_ExtrudeMinT, MSG_EXTRUDER_MIN_TEMP, onDrawPIntMenu, setExtMinT, &hmiData.extMinT); #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) EDIT_ITEM(ICON_FilLoad, MSG_FILAMENT_LOAD, onDrawPFloatMenu, setFilLoad, &fc_settings[0].load_length); EDIT_ITEM(ICON_FilUnload, MSG_FILAMENT_UNLOAD, onDrawPFloatMenu, setFilUnload, &fc_settings[0].unload_length); #endif diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index c29a2dd4044c..04743286503f 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -323,7 +323,7 @@ void NextionTFT::panelInfo(uint8_t req) { SEND_PRINT_INFO("t8", getFilamentUsed_str); break; - case 28: // Filament laod/unload + case 28: // Filament load/unload #if ENABLED(ADVANCED_PAUSE_FEATURE) #define SEND_PAUSE_INFO(A, B) SEND_VALasTXT(A, fc_settings[getActiveTool()].B) #else diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 95d965bdf998..698687b96dcd 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -136,7 +136,7 @@ void menu_backlash(); } #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) constexpr float extrude_maxlength = TERN(PREVENT_LENGTHY_EXTRUDE, EXTRUDE_MAXLENGTH, 999); EDIT_ITEM_FAST(float4, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index fa7beee94b84..387d86ba29bb 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -36,7 +36,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V89" +#define EEPROM_VERSION "V90" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -508,7 +508,7 @@ typedef struct SettingsDataStruct { // // ADVANCED_PAUSE_FEATURE // - #if HAS_EXTRUDERS + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) fil_change_settings_t fc_settings[EXTRUDERS]; // M603 T U L #endif @@ -1551,11 +1551,8 @@ void MarlinSettings::postprocess() { // // Advanced Pause filament load & unload lengths // - #if HAS_EXTRUDERS + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) { - #if DISABLED(ADVANCED_PAUSE_FEATURE) - const fil_change_settings_t fc_settings[EXTRUDERS] = { 0, 0 }; - #endif _FIELD_TEST(fc_settings); EEPROM_WRITE(fc_settings); } @@ -2626,11 +2623,8 @@ void MarlinSettings::postprocess() { // // Advanced Pause filament load & unload lengths // - #if HAS_EXTRUDERS + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) { - #if DISABLED(ADVANCED_PAUSE_FEATURE) - fil_change_settings_t fc_settings[EXTRUDERS]; - #endif _FIELD_TEST(fc_settings); EEPROM_READ(fc_settings); } @@ -3549,7 +3543,7 @@ void MarlinSettings::reset() { // // Advanced Pause filament load & unload lengths // - #if ENABLED(ADVANCED_PAUSE_FEATURE) + #if ENABLED(CONFIGURE_FILAMENT_CHANGE) EXTRUDER_LOOP() { fc_settings[e].unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH; fc_settings[e].load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH; @@ -3924,7 +3918,7 @@ void MarlinSettings::reset() { // // Advanced Pause filament load & unload lengths // - TERN_(ADVANCED_PAUSE_FEATURE, gcode.M603_report(forReplay)); + TERN_(CONFIGURE_FILAMENT_CHANGE, gcode.M603_report(forReplay)); // // Tool-changing Parameters diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index 8f69f5b06912..62ca3c24f274 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -18,6 +18,7 @@ opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_ 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 \ LCD_BED_TRAMMING BED_TRAMMING_USE_PROBE +opt_disable CONFIGURE_FILAMENT_CHANGE 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 120d599dcabb..f9822fa7a8a5 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -259,7 +259,8 @@ MIXING_EXTRUDER = build_src_filter=+ HAS_PRUSA_MMU2 = build_src_filter=+ + PASSWORD_FEATURE = build_src_filter=+ + -ADVANCED_PAUSE_FEATURE = build_src_filter=+ + + +ADVANCED_PAUSE_FEATURE = build_src_filter=+ + +CONFIGURE_FILAMENT_CHANGE = build_src_filter=+ PSU_CONTROL = build_src_filter=+ HAS_POWER_MONITOR = build_src_filter=+ + POWER_LOSS_RECOVERY = build_src_filter=+ + From 68b7802fc17cd4160fa3923897ab69dbea09f4ed Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:19:19 +0100 Subject: [PATCH 076/236] =?UTF-8?q?=F0=9F=93=9D=20Update=20M493=20(FT=5FMO?= =?UTF-8?q?TION)=20comments=20(#26620)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/feature/ft_motion/M493.cpp | 43 ++++++++++++--------- Marlin/src/module/ft_types.h | 28 +++++++------- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index 7f202be4138c..d374ca58c9f5 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -38,14 +38,14 @@ void say_shaping() { SERIAL_ECHOPGM(" with "); switch (ftMotion.cfg.mode) { default: break; - case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break; - case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break; - case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break; - case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break; - case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break; - case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break; - case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break; - case ftMotionMode_MZV: SERIAL_ECHOPGM("MZV"); break; + case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break; + case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break; + case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break; + case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break; + case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break; + case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break; + case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break; + case ftMotionMode_MZV: SERIAL_ECHOPGM("MZV"); break; //case ftMotionMode_DISCTF: SERIAL_ECHOPGM("discrete transfer functions"); break; //case ftMotionMode_ULENDO_FBS: SERIAL_ECHOPGM("Ulendo FBS."); return; } @@ -129,14 +129,17 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { * 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 + * + * 0: Standard Motion + * 1: Fixed-Time Motion + * 10: ZV : Zero Vibration + * 11: ZVD : Zero Vibration and Derivative + * 12: ZVDD : Zero Vibration, Derivative, and Double Derivative + * 13: ZVDDD : Zero Vibration, Derivative, Double Derivative, and Triple Derivative + * 14: EI : Extra-Intensive + * 15: 2HEI : 2-Hump Extra-Intensive + * 16: 3HEI : 3-Hump Extra-Intensive + * 17: MZV : Mass-based Zero Vibration * * P Enable (1) or Disable (0) Linear Advance pressure control * @@ -147,11 +150,15 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { * 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 + * A Set static/base frequency for the X axis + * F Set frequency scaling for the X axis + * I 0.0 Set damping ratio for the X axis + * Q 0.00 Set the vibration tolerance for the X axis * * B Set static/base frequency for the Y axis * H Set frequency scaling for the Y axis + * J 0.0 Set damping ratio for the Y axis + * R 0.00 Set the vibration tolerance for the Y axis */ void GcodeSuite::M493() { struct { bool update_n:1, update_a:1, reset_ft:1, report_h:1; } flag = { false }; diff --git a/Marlin/src/module/ft_types.h b/Marlin/src/module/ft_types.h index e7bcf37ac688..b17c00974e76 100644 --- a/Marlin/src/module/ft_types.h +++ b/Marlin/src/module/ft_types.h @@ -24,24 +24,22 @@ #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_ZVDD = 12U, - ftMotionMode_ZVDDD = 13U, - ftMotionMode_EI = 14U, - ftMotionMode_2HEI = 15U, - ftMotionMode_3HEI = 16U, - ftMotionMode_MZV = 17U, - //ftMotionMode_DISCTF = 20U + ftMotionMode_DISABLED = 0, // Standard Motion + ftMotionMode_ENABLED = 1, // Time-Based Motion + ftMotionMode_ZV = 10, // Zero Vibration + ftMotionMode_ZVD = 11, // Zero Vibration and Derivative + ftMotionMode_ZVDD = 12, // Zero Vibration, Derivative, and Double Derivative + ftMotionMode_ZVDDD = 13, // Zero Vibration, Derivative, Double Derivative, and Triple Derivative + ftMotionMode_EI = 14, // Extra-Intensive + ftMotionMode_2HEI = 15, // 2-Hump Extra-Intensive + ftMotionMode_3HEI = 16, // 3-Hump Extra-Intensive + ftMotionMode_MZV = 17 // Mass-based Zero Vibration } ftMotionMode_t; enum dynFreqMode_t : uint8_t { - dynFreqMode_DISABLED = 0U, - dynFreqMode_Z_BASED = 1U, - dynFreqMode_MASS_BASED = 2U + dynFreqMode_DISABLED = 0, + dynFreqMode_Z_BASED = 1, + dynFreqMode_MASS_BASED = 2 }; #define IS_EI_MODE(N) WITHIN(N, ftMotionMode_EI, ftMotionMode_3HEI) From be1dee7caf8197f10811574265714e78ca08ec83 Mon Sep 17 00:00:00 2001 From: Orel <37673727+0r31@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:02:20 +0100 Subject: [PATCH 077/236] =?UTF-8?q?=F0=9F=8E=A8=20Clean=20up=20old=20#incl?= =?UTF-8?q?udes=20(#26621)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/queue.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 9ce28f781cd8..db06af82f061 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -37,14 +37,6 @@ GCodeQueue queue; #include "../MarlinCore.h" #include "../core/bug_on.h" -#if ENABLED(PRINTER_EVENT_LEDS) - #include "../feature/leds/printer_event_leds.h" -#endif - -#if HAS_ETHERNET - #include "../feature/ethernet.h" -#endif - #if ENABLED(BINARY_FILE_TRANSFER) #include "../feature/binary_stream.h" #endif From f8771e9ad5d572f22ec89c199e81cd53106ffc5c Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 4 Jan 2024 00:21:47 +0000 Subject: [PATCH 078/236] [cron] Bump distribution date (2024-01-04) --- 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 79c3ef62533c..1cdc982294ea 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 "2024-01-03" +//#define STRING_DISTRIBUTION_DATE "2024-01-04" /** * 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 4007aaccef0f..2b250079f5cc 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 "2024-01-03" + #define STRING_DISTRIBUTION_DATE "2024-01-04" #endif /** From 54b7da18cbbbed49fee93f0f39b7093c527c25ea Mon Sep 17 00:00:00 2001 From: Taylor Talkington Date: Wed, 3 Jan 2024 21:45:50 -0500 Subject: [PATCH 079/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Bed=20PID=20Autotu?= =?UTF-8?q?ne=20output=20(#26606)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25928 --- Marlin/src/module/temperature.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 5b4dcc83bc74..3f55dde598f5 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -849,9 +849,9 @@ volatile bool Temperature::raw_temps_ready = false; #if ANY(PIDTEMPBED, PIDTEMPCHAMBER) FSTR_P const estring = GHV(F("chamber"), F("bed"), FPSTR(NUL_STR)); - say_default_(); SERIAL_ECHO(estring, F("Kp "), tune_pid.p); - say_default_(); SERIAL_ECHO(estring, F("Ki "), tune_pid.i); - say_default_(); SERIAL_ECHO(estring, F("Kd "), tune_pid.d); + say_default_(); SERIAL_ECHOLN(estring, F("Kp "), tune_pid.p); + say_default_(); SERIAL_ECHOLN(estring, F("Ki "), tune_pid.i); + say_default_(); SERIAL_ECHOLN(estring, F("Kd "), tune_pid.d); #else say_default_(); SERIAL_ECHOLNPGM("Kp ", tune_pid.p); say_default_(); SERIAL_ECHOLNPGM("Ki ", tune_pid.i); From 991f433ac1375cca0b8fcd76fcbacbe43b307ac3 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Wed, 3 Jan 2024 19:14:17 -0800 Subject: [PATCH 080/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20hangs=20in=20DUE?= =?UTF-8?q?=20native=20USB=20(#26572)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/DUE/usb/README.md | 29 ++++++++ Marlin/src/HAL/DUE/usb/uotghs_device_due.c | 79 +++++++++++++++++++--- buildroot/tests/DUE_archim | 1 + 3 files changed, 100 insertions(+), 9 deletions(-) create mode 100644 Marlin/src/HAL/DUE/usb/README.md diff --git a/Marlin/src/HAL/DUE/usb/README.md b/Marlin/src/HAL/DUE/usb/README.md new file mode 100644 index 000000000000..2548135aca07 --- /dev/null +++ b/Marlin/src/HAL/DUE/usb/README.md @@ -0,0 +1,29 @@ +# USB Files Source Documentation + +## Source + +We sourced the USB files in Marlin from the Atmel ASF (Advanced Software Framework). The framework provides a variety of examples which were utilized in this project. + +Atmel doesn't provide these files in a source repository but they can be extracted from ASF, which can be downloaded from Atmel. + +[Advanced Software Framework](https://www.microchip.com/en-us/tools-resources/develop/libraries/advanced-software-framework) + +## Modifications + +The files are mostly unmodified except for minor cosmetic changes but some more significant changes were needed. + +The changes that prompted the addition of this README file are listed below. Other changes may have been made prior to this. + +1. Modified `uotghs_device_due.c` to resolve race conditions that could leave interrupts asserted when freezing the peripheral clock, resulting in hangs and watchdog resets due to the ensuing interrupt storm. + +## Version Information + +We don't know the exact version of ASF used as the source. However, the copyright information in the files indicates they are from 2015. + +## Upgrade Considerations + +We looked at the ASF 3.52.0 files released in 2022 but saw no immediate benefits to justify an upgrade. It's important to note that the files in Marlin don't follow the same folder structure as the files in ASF, which complicates the process of comparing and applying updated files. + +When these files are updated it's important to carefully compare them to Marlin's versions so any improvements in the Marlin sources are brought forward. + +It would be best to make Marlin's directory structure align with ASF or at least document the source of each file to ease future updates. diff --git a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c index c7e8f8d99135..5a988b7421d1 100644 --- a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c +++ b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c @@ -116,6 +116,23 @@ //#define dbg_print printf #define dbg_print(...) +// Marlin modification: Redefine the otg_freeze_clock and otg_unfreeze_clock macros +// to add memory barriers to ensure that any accesses to USB registers aren't re-ordered +// to occur while the clock is frozen. +#undef otg_freeze_clock +#undef otg_unfreeze_clock + +#define otg_freeze_clock() do { \ + __DSB(); \ + Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK); \ +} while (0) + +#define otg_unfreeze_clock() \ +do { \ + Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK); \ + __DSB(); \ +} while (0) + /** * \ingroup udd_group * \defgroup udd_udphs_group USB On-The-Go High-Speed Port for device mode (UOTGHS) @@ -611,6 +628,18 @@ ISR(UDD_USB_INT_FUN) // The wakeup interrupt is automatic acked when a suspend occur udd_disable_wake_up_interrupt(); udd_enable_suspend_interrupt(); + + // Marlin modification: The RESET, SOF, and MSOF interrupts were previously + // enabled in udd_attach, which caused a race condition where they could + // be raised and unclearable with the clock is frozen. They are now + // enabled here, after the clock has been unfrozen in response to the wake + // interrupt. + udd_enable_reset_interrupt(); + udd_enable_sof_interrupt(); +#ifdef USB_DEVICE_HS_SUPPORT + udd_enable_msof_interrupt(); +#endif + udd_sleep_mode(true); // Enter in IDLE mode #ifdef UDC_RESUME_EVENT UDC_RESUME_EVENT(); @@ -776,6 +805,27 @@ void udd_disable(void) cpu_irq_restore(flags); } +// Marlin modification: The original implementation did not use a memory +// barrier between disabling and clearing interrupts. This sometimes +// allowed interrupts to remain raised and unclearable after the clock +// was frozen. This helper was added to ensure that memory barriers +// are used consistently from all places where interrupts are disabled. +static void disable_and_ack_sync_interrupts() +{ + // Disable USB line events + udd_disable_reset_interrupt(); + udd_disable_sof_interrupt(); +#ifdef USB_DEVICE_HS_SUPPORT + udd_disable_msof_interrupt(); +#endif + __DSB(); + udd_ack_reset(); + udd_ack_sof(); +#ifdef USB_DEVICE_HS_SUPPORT + udd_ack_msof(); +#endif + __DSB(); +} void udd_attach(void) { @@ -796,17 +846,16 @@ void udd_attach(void) udd_attach_device(); // Enable USB line events - udd_enable_reset_interrupt(); udd_enable_suspend_interrupt(); udd_enable_wake_up_interrupt(); - udd_enable_sof_interrupt(); -#ifdef USB_DEVICE_HS_SUPPORT - udd_enable_msof_interrupt(); -#endif - // Reset following interrupts flag - udd_ack_reset(); - udd_ack_sof(); - udd_ack_msof(); + + // Marlin modification: The RESET, SOF, and MSOF interrupts were previously + // enabled here, which caused a race condition where they could be raised + // and unclearable with the clock is frozen. They are now enabled in the + // wake interrupt handler, after the clock has been unfrozen. They are now + // explicitly disabled here to ensure that they cannot be raised before + // the clock is frozen. + disable_and_ack_sync_interrupts(); // The first suspend interrupt must be forced // The first suspend interrupt is not detected else raise it @@ -824,6 +873,12 @@ void udd_detach(void) // Detach device from the bus udd_detach_device(); + + // Marlin modification: Added the explicit disabling of the RESET, SOF, and + // MSOF interrupts here, to ensure that they cannot be raised after the + // clock is frozen. + disable_and_ack_sync_interrupts(); + otg_freeze_clock(); udd_sleep_mode(false); } @@ -2043,6 +2098,12 @@ static bool udd_ep_interrupt(void) dbg_print("I "); udd_disable_in_send_interrupt(ep); // One bank is free then send a ZLP + + // Marlin modification: Add a barrier to ensure in_send is disabled + // before it is cleared. This was not an observed problem, but + // other interrupts were seen to misbehave without this barrier. + __DSB(); + udd_ack_in_send(ep); udd_ack_fifocon(ep); udd_ep_finish_job(ptr_job, false, ep); diff --git a/buildroot/tests/DUE_archim b/buildroot/tests/DUE_archim index f1711a8f3d70..8f9e6cbb81c7 100755 --- a/buildroot/tests/DUE_archim +++ b/buildroot/tests/DUE_archim @@ -16,6 +16,7 @@ exec_test $1 $2 "Archim 1 base configuration" "$3" # Test Archim 2 # use_example_configs UltiMachine/Archim2 +opt_enable USB_FLASH_DRIVE_SUPPORT exec_test $1 $2 "Archim 2 base configuration" "$3" restore_configs From 52693f72afca243ace00a7a57365301f5f8c42c0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 4 Jan 2024 13:01:45 -0600 Subject: [PATCH 081/236] =?UTF-8?q?=F0=9F=8E=A8=20Clean=20up=20some=20chec?= =?UTF-8?q?ks=20&=20includes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 4 --- Marlin/src/feature/mixing.h | 4 --- Marlin/src/feature/solenoid.cpp | 2 +- Marlin/src/gcode/bedlevel/G35.cpp | 4 --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 4 --- Marlin/src/gcode/calibrate/G33.cpp | 4 --- Marlin/src/gcode/calibrate/G34_M422.cpp | 4 --- Marlin/src/gcode/calibrate/G425.cpp | 5 ++- Marlin/src/gcode/config/M217.cpp | 4 +-- Marlin/src/gcode/control/T.cpp | 4 +-- Marlin/src/gcode/feature/pause/M603.cpp | 4 --- Marlin/src/gcode/probe/G30.cpp | 4 --- Marlin/src/gcode/temp/M104_M109.cpp | 4 --- Marlin/src/inc/Changes.h | 32 +++++++++++++++++ Marlin/src/inc/Conditionals_LCD.h | 38 +++++++++++--------- Marlin/src/inc/SanityCheck.h | 40 ++------------------- Marlin/src/lcd/menu/menu_temperature.cpp | 4 --- Marlin/src/lcd/menu/menu_tune.cpp | 4 --- Marlin/src/module/temperature.cpp | 4 --- 20 files changed, 65 insertions(+), 110 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 1dcee50d12c9..0a97b4d13292 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -776,7 +776,7 @@ void idle(const bool no_stepper_sleep/*=false*/) { if (marlin_state == MF_INITIALIZING) goto IDLE_DONE; // TODO: Still causing errors - (void)check_tool_sensor_stats(active_extruder, true); + TERN_(TOOL_SENSOR, (void)check_tool_sensor_stats(active_extruder, true)); // Handle filament runout sensors #if HAS_FILAMENT_SENSOR diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index c61a84894aec..720c86769da4 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -37,10 +37,6 @@ #include "../../../gcode/gcode.h" #include "../../../libs/least_squares_fit.h" -#if HAS_MULTI_HOTEND - #include "../../../module/tool_change.h" -#endif - #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../../core/debug_out.h" diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h index 4340a510a51a..c0f45e364ab4 100644 --- a/Marlin/src/feature/mixing.h +++ b/Marlin/src/feature/mixing.h @@ -43,10 +43,6 @@ typedef int8_t mixer_perc_t; -#ifndef MIXING_VIRTUAL_TOOLS - #define MIXING_VIRTUAL_TOOLS 1 -#endif - enum MixTool { FIRST_USER_VIRTUAL_TOOL = 0 , LAST_USER_VIRTUAL_TOOL = MIXING_VIRTUAL_TOOLS - 1 diff --git a/Marlin/src/feature/solenoid.cpp b/Marlin/src/feature/solenoid.cpp index 46364eaf8f5b..cc4522e30a62 100644 --- a/Marlin/src/feature/solenoid.cpp +++ b/Marlin/src/feature/solenoid.cpp @@ -27,7 +27,7 @@ #include "solenoid.h" #include "../module/motion.h" // for active_extruder -#include "../module/tool_change.h" +#include "../module/tool_change.h" // for parking_extruder_set_parked // Used primarily with MANUAL_SOLENOID_CONTROL static void set_solenoid(const uint8_t num, const uint8_t state) { diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 8e11383166fb..89a43ef08a9e 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -29,10 +29,6 @@ #include "../../module/probe.h" #include "../../feature/bedlevel/bedlevel.h" -#if HAS_MULTI_HOTEND - #include "../../module/tool_change.h" -#endif - #if ENABLED(BLTOUCH) #include "../../feature/bltouch.h" #endif diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index acd920c7290d..700562df8168 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -55,10 +55,6 @@ #include "../../../lcd/e3v2/proui/dwin.h" #endif -#if HAS_MULTI_HOTEND - #include "../../../module/tool_change.h" -#endif - #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../../core/debug_out.h" diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index d8f104bfceef..223beb4ddffa 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -35,10 +35,6 @@ #include "../../module/probe.h" #endif -#if HAS_MULTI_HOTEND - #include "../../module/tool_change.h" -#endif - #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" #endif diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index af2c6a5f6505..bbc403904f66 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -37,10 +37,6 @@ #include "../../feature/bedlevel/bedlevel.h" #endif -#if HAS_MULTI_HOTEND - #include "../../module/tool_change.h" -#endif - #if HAS_Z_STEPPER_ALIGN_STEPPER_XY #include "../../libs/least_squares_fit.h" #endif diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index fb211ad88c74..992d7c38e621 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -33,10 +33,13 @@ #include "../../lcd/marlinui.h" #include "../../module/motion.h" #include "../../module/planner.h" -#include "../../module/tool_change.h" #include "../../module/endstops.h" #include "../../feature/bedlevel/bedlevel.h" +#if HAS_MULTI_HOTEND + #include "../../module/tool_change.h" +#endif + #if !AXIS_CAN_CALIBRATE(X) #undef CALIBRATION_MEASURE_LEFT #undef CALIBRATION_MEASURE_RIGHT diff --git a/Marlin/src/gcode/config/M217.cpp b/Marlin/src/gcode/config/M217.cpp index 908a19fae711..5ef06e4823f3 100644 --- a/Marlin/src/gcode/config/M217.cpp +++ b/Marlin/src/gcode/config/M217.cpp @@ -28,11 +28,9 @@ #include "../../module/tool_change.h" #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) - #include "../../module/motion.h" + #include "../../module/motion.h" // for active_extruder #endif -#include "../../MarlinCore.h" // for SP_X_STR, etc. - /** * M217 - Set toolchange parameters * diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index c5ebbcf50e7f..cbe4d26fac15 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -71,8 +71,8 @@ void GcodeSuite::T(const int8_t tool_index) { tool_change(tool_index #if HAS_MULTI_EXTRUDER - , TERN(PARKING_EXTRUDER, false, tool_index == active_extruder) // For PARKING_EXTRUDER motion is decided in tool_change() - || parser.boolval('S') + , parser.boolval('S') + || TERN(PARKING_EXTRUDER, false, tool_index == active_extruder) // For PARKING_EXTRUDER motion is decided in tool_change() #endif ); } diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp index 2f24cc642136..0204ab25ef65 100644 --- a/Marlin/src/gcode/feature/pause/M603.cpp +++ b/Marlin/src/gcode/feature/pause/M603.cpp @@ -29,10 +29,6 @@ #include "../../../module/motion.h" #include "../../../module/printcounter.h" -#if HAS_MULTI_EXTRUDER - #include "../../../module/tool_change.h" -#endif - /** * M603: Configure filament change * diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 383b5015a014..e83df544c863 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -34,10 +34,6 @@ #include "../../feature/probe_temp_comp.h" #endif -#if HAS_MULTI_HOTEND - #include "../../module/tool_change.h" -#endif - /** * G30: Do a single Z probe at the given XY (default: current) * diff --git a/Marlin/src/gcode/temp/M104_M109.cpp b/Marlin/src/gcode/temp/M104_M109.cpp index db150d55181d..4df86edc55be 100644 --- a/Marlin/src/gcode/temp/M104_M109.cpp +++ b/Marlin/src/gcode/temp/M104_M109.cpp @@ -45,10 +45,6 @@ #endif #endif -#if ENABLED(SINGLENOZZLE_STANDBY_TEMP) - #include "../../module/tool_change.h" -#endif - /** * M104: Set Hotend Temperature target and return immediately * M109: Set Hotend Temperature target and wait diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 25d3401579d4..5a03e87b1d8e 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -579,6 +579,18 @@ #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(SNMM) + #error "SNMM is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead." +#elif defined(MK2_MULTIPLEXER) + #error "MK2_MULTIPLEXER is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead." +#elif defined(PRUSA_MMU2) + #error "PRUSA_MMU2 is obsolete. Define MMU_MODEL as PRUSA_MMU2 instead." +#elif defined(PRUSA_MMU2_S_MODE) + #error "PRUSA_MMU2_S_MODE is obsolete. Define MMU_MODEL as PRUSA_MMU2S instead." +#elif defined(SMUFF_EMU_MMU2) + #error "SMUFF_EMU_MMU2 is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2 instead." +#elif defined(SMUFF_EMU_MMU2S) + #error "SMUFF_EMU_MMU2S is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2S instead." #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) @@ -675,6 +687,26 @@ #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13." #endif +// Changes to Probe Temp Compensation (#17392) +#if HAS_PTC && TEMP_SENSOR_PROBE && TEMP_SENSOR_BED + #if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z) + #error "PTC_PARK_POS_[XYZ] is now PTC_PARK_POS (array)." + #elif defined(PTC_PROBE_POS_X) || defined(PTC_PROBE_POS_Y) + #error "PTC_PROBE_POS_[XY] is now PTC_PROBE_POS (array)." + #endif +#endif + +// Consolidate TMC26X, validate migration (#24373) +#define _ISMAX_1(A) defined(A##_MAX_CURRENT) +#define _ISSNS_1(A) defined(A##_SENSE_RESISTOR) +#if DO(ISMAX,||,ALL_AXIS_NAMES) + #error "*_MAX_CURRENT is now set with *_CURRENT." +#elif DO(ISSNS,||,ALL_AXIS_NAMES) + #error "*_SENSE_RESISTOR (in Milli-Ohms) is now set with *_RSENSE (in Ohms), so you must divide values by 1000." +#endif +#undef _ISMAX_1 +#undef _ISSNS_1 + // L64xx stepper drivers have been removed #define _L6470 0x6470 #define _L6474 0x6474 diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index a81c8639cf19..e07d026cb961 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -82,33 +82,36 @@ /** * Multi-Material-Unit supported models */ -#define PRUSA_MMU1 1 -#define PRUSA_MMU2 2 -#define PRUSA_MMU2S 3 -#define EXTENDABLE_EMU_MMU2 12 -#define EXTENDABLE_EMU_MMU2S 13 - #ifdef MMU_MODEL #define HAS_MMU 1 #define SINGLENOZZLE - #if MMU_MODEL == PRUSA_MMU1 + + #define _PRUSA_MMU1 1 + #define _PRUSA_MMU2 2 + #define _PRUSA_MMU2S 3 + #define _EXTENDABLE_EMU_MMU2 12 + #define _EXTENDABLE_EMU_MMU2S 13 + #define _MMU CAT(_,MMU_MODEL) + + #if _MMU == _PRUSA_MMU1 #define HAS_PRUSA_MMU1 1 - #elif MMU_MODEL % 10 == PRUSA_MMU2 + #elif _MMU % 10 == _PRUSA_MMU2 #define HAS_PRUSA_MMU2 1 - #elif MMU_MODEL % 10 == PRUSA_MMU2S + #elif _MMU % 10 == _PRUSA_MMU2S #define HAS_PRUSA_MMU2 1 #define HAS_PRUSA_MMU2S 1 #endif - #if MMU_MODEL >= EXTENDABLE_EMU_MMU2 + #if _MMU == _EXTENDABLE_EMU_MMU2 || _MMU == _EXTENDABLE_EMU_MMU2S #define HAS_EXTENDABLE_MMU 1 #endif -#endif -#undef PRUSA_MMU1 -#undef PRUSA_MMU2 -#undef PRUSA_MMU2S -#undef EXTENDABLE_EMU_MMU2 -#undef EXTENDABLE_EMU_MMU2S + #undef _MMU + #undef _PRUSA_MMU1 + #undef _PRUSA_MMU2 + #undef _PRUSA_MMU2S + #undef _EXTENDABLE_EMU_MMU2 + #undef _EXTENDABLE_EMU_MMU2S +#endif #if ENABLED(E_DUAL_STEPPER_DRIVERS) // E0/E1 steppers act in tandem as E0 @@ -132,6 +135,9 @@ #if MIXING_STEPPERS == 2 #define HAS_DUAL_MIXING 1 #endif + #ifndef MIXING_VIRTUAL_TOOLS + #define MIXING_VIRTUAL_TOOLS 1 + #endif #elif ENABLED(SWITCHING_TOOLHEAD) // Toolchanger diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index d1c84665ede3..c3fed355d322 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -116,17 +116,6 @@ constexpr float arm[] = AXIS_RELATIVE_MODES; static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements."); -// Consolidate TMC26X, validate migration (#24373) -#define _ISMAX_1(A) defined(A##_MAX_CURRENT) -#define _ISSNS_1(A) defined(A##_SENSE_RESISTOR) -#if DO(ISMAX,||,ALL_AXIS_NAMES) - #error "*_MAX_CURRENT is now set with *_CURRENT." -#elif DO(ISSNS,||,ALL_AXIS_NAMES) - #error "*_SENSE_RESISTOR (in Milli-Ohms) is now set with *_RSENSE (in Ohms), so you must divide values by 1000." -#endif -#undef _ISMAX_1 -#undef _ISSNS_1 - /** * RADDS is forbidden for non-DUE boards, for now. */ @@ -160,16 +149,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L * Probe temp compensation requirements */ #if HAS_PTC - #if TEMP_SENSOR_PROBE && TEMP_SENSOR_BED - #if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z) - #error "PTC_PARK_POS_[XYZ] is now PTC_PARK_POS (array)." - #elif !defined(PTC_PARK_POS) - #error "PTC_PARK_POS is required for Probe Temperature Compensation." - #elif defined(PTC_PROBE_POS_X) || defined(PTC_PROBE_POS_Y) - #error "PTC_PROBE_POS_[XY] is now PTC_PROBE_POS (array)." - #elif !defined(PTC_PROBE_POS) - #error "PTC_PROBE_POS is required for Probe Temperature Compensation." - #endif + #if TEMP_SENSOR_PROBE && TEMP_SENSOR_BED && !(defined(PTC_PARK_POS) && defined(PTC_PROBE_POS)) + #error "PTC_PARK_POS and PTC_PROBE_POS are required for Probe Temperature Compensation." #endif #if ENABLED(PTC_PROBE) @@ -611,23 +592,6 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics." #endif -/** - * Sanity checking for all Průša MMU - */ -#ifdef SNMM - #error "SNMM is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead." -#elif ENABLED(MK2_MULTIPLEXER) - #error "MK2_MULTIPLEXER is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead." -#elif ENABLED(PRUSA_MMU2) - #error "PRUSA_MMU2 is obsolete. Define MMU_MODEL as PRUSA_MMU2 instead." -#elif ENABLED(PRUSA_MMU2_S_MODE) - #error "PRUSA_MMU2_S_MODE is obsolete. Define MMU_MODEL as PRUSA_MMU2S instead." -#elif ENABLED(SMUFF_EMU_MMU2) - #error "SMUFF_EMU_MMU2 is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2 instead." -#elif ENABLED(SMUFF_EMU_MMU2S) - #error "SMUFF_EMU_MMU2S is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2S instead." -#endif - /** * Multi-Material-Unit 2 / EXTENDABLE_EMU_MMU2 requirements */ diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index 710cef6468a1..e8a7b25dcb38 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -39,10 +39,6 @@ #include "../../feature/cooler.h" #endif -#if ENABLED(SINGLENOZZLE_STANDBY_TEMP) - #include "../../module/tool_change.h" -#endif - // // "Temperature" submenu items // diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index ecd4e5f342fc..68f61caaec77 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -34,10 +34,6 @@ #include "../../module/temperature.h" #include "../../MarlinCore.h" -#if ENABLED(SINGLENOZZLE_STANDBY_TEMP) - #include "../../module/tool_change.h" -#endif - #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 3f55dde598f5..e65297b04a24 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -182,10 +182,6 @@ #include "../feature/joystick.h" #endif -#if ENABLED(SINGLENOZZLE) - #include "tool_change.h" -#endif - #if HAS_BEEPER #include "../libs/buzzer.h" #endif From 6e67ad51b70ce4f02be967bb14e5557a021e48eb Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:07:53 -0500 Subject: [PATCH 082/236] =?UTF-8?q?=F0=9F=8E=A8=20Followup=20to=20optional?= =?UTF-8?q?=20M111/M115=20(#26626)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26603 --- Marlin/Configuration_adv.h | 84 +++++++++++++++--------------- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 4 +- Marlin/src/gcode/host/M115.cpp | 4 +- Marlin/src/inc/Warnings.cpp | 4 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- ini/features.ini | 2 +- 7 files changed, 51 insertions(+), 51 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 10316ac9282b..248841d748d0 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3836,38 +3836,6 @@ */ //#define CNC_COORDINATE_SYSTEMS -// @section reporting - -/** - * Auto-report fan speed with M123 S - * Requires fans with tachometer pins - */ -//#define AUTO_REPORT_FANS - -/** - * Auto-report temperatures with M155 S - */ -#define AUTO_REPORT_TEMPERATURES -#if ENABLED(AUTO_REPORT_TEMPERATURES) && TEMP_SENSOR_REDUNDANT - //#define AUTO_REPORT_REDUNDANT // Include the "R" sensor in the auto-report -#endif - -/** - * Auto-report position with M154 S - */ -//#define AUTO_REPORT_POSITION -#if ENABLED(AUTO_REPORT_POSITION) - //#define AUTO_REPORT_REAL_POSITION // Auto-report the real position -#endif - -/** - * Include capabilities in M115 output - */ -#define EXTENDED_CAPABILITIES_REPORT -#if ENABLED(EXTENDED_CAPABILITIES_REPORT) - //#define M115_GEOMETRY_REPORT -#endif - // @section security /** @@ -3910,13 +3878,51 @@ // @section reporting -// Extra options for the M114 "Current Position" report +/** + * Extra options for the M114 "Current Position" report + */ //#define M114_DETAIL // Use 'M114` for details to check planner calculations //#define M114_REALTIME // Real current position based on forward kinematics //#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed. + +/** + * Auto-report fan speed with M123 S + * Requires fans with tachometer pins + */ +//#define AUTO_REPORT_FANS + //#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others) +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES +#if ENABLED(AUTO_REPORT_TEMPERATURES) && TEMP_SENSOR_REDUNDANT + //#define AUTO_REPORT_REDUNDANT // Include the "R" sensor in the auto-report +#endif + +/** + * Auto-report position with M154 S + */ +//#define AUTO_REPORT_POSITION +#if ENABLED(AUTO_REPORT_POSITION) + //#define AUTO_REPORT_REAL_POSITION // Auto-report the real position +#endif + +/** + * M115 - Report capabilites. Disable to save ~1150 bytes of flash. + * Some hosts (and serial TFT displays) rely on this feature. + */ +#define CAPABILITIES_REPORT +#if ENABLED(CAPABILITIES_REPORT) + // Include capabilities in M115 output + #define EXTENDED_CAPABILITIES_REPORT + #if ENABLED(EXTENDED_CAPABILITIES_REPORT) + //#define M115_GEOMETRY_REPORT + #endif +#endif + // @section gcode /** @@ -3928,7 +3934,9 @@ //#define GCODE_QUOTED_STRINGS // Support for quoted string parameters #endif -// Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack) +/** + * Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack) + */ //#define MEATPACK_ON_SERIAL_PORT_1 //#define MEATPACK_ON_SERIAL_PORT_2 @@ -3942,12 +3950,6 @@ */ #define DEBUG_FLAGS_GCODE -/** - * M115 - Report capabilites. Disable to save ~1150 bytes of flash. - * Some hosts (and serial TFT displays) rely on this feature. - */ -#define REPORT_CAPABILITIES_GCODE - /** * Enable this option for a leaner build of Marlin that removes * workspace offsets to slightly optimize performance. @@ -3975,8 +3977,6 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif -// @section gcode - /** * Startup commands * diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 945da708b4e2..5fb0594d9f48 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -670,7 +670,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes case 114: M114(); break; // M114: Report current position - #if ENABLED(REPORT_CAPABILITIES_GCODE) + #if ENABLED(CAPABILITIES_REPORT) case 115: M115(); break; // M115: Report capabilities #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index d5adf6c41567..ae60ac75563d 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -149,7 +149,7 @@ * * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE) * M114 - Report current position. - * M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT) + * M115 - Report capabilities. (Requires CAPABILITIES_REPORT) * M117 - Display a message on the controller screen. (Requires an LCD) * M118 - Display a message in the host console. * @@ -761,7 +761,7 @@ class GcodeSuite { static void M114(); - #if ENABLED(REPORT_CAPABILITIES_GCODE) + #if ENABLED(CAPABILITIES_REPORT) static void M115(); #endif diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index ae8e6155077d..d1571d58ac9e 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(REPORT_CAPABILITIES_GCODE) +#if ENABLED(CAPABILITIES_REPORT) #include "../gcode.h" #include "../queue.h" // for getting the command port @@ -275,4 +275,4 @@ void GcodeSuite::M115() { #endif // EXTENDED_CAPABILITIES_REPORT } -#endif // REPORT_CAPABILITIES_GCODE +#endif // CAPABILITIES_REPORT diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 384fe04c618a..560acf4cd863 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -46,8 +46,8 @@ #warning "DEBUG_FLAGS_GCODE is recommended if you have space. Some hosts rely on it." #endif -#if DISABLED(REPORT_CAPABILITIES_GCODE) - #warning "REPORT_CAPABILITIES_GCODE is recommended if you have space. Some hosts rely on it." +#if DISABLED(CAPABILITIES_REPORT) + #warning "CAPABILITIES_REPORT is recommended if you have space. Some hosts rely on it." #endif #if ENABLED(LA_DEBUG) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 5262dba385be..7520b46b60e4 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2306,7 +2306,7 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, #endif #endif -#if ENABLED(ADVANCED_PAUSE_FEATURE) +#if ENABLED(CONFIGURE_FILAMENT_CHANGE) void setFilLoad() { setPFloatOnClick(0, EXTRUDE_MAXLENGTH, UNITFDIGITS); } void setFilUnload() { setPFloatOnClick(0, EXTRUDE_MAXLENGTH, UNITFDIGITS); } #endif diff --git a/ini/features.ini b/ini/features.ini index f9822fa7a8a5..32fd6c262182 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -323,7 +323,7 @@ CNC_COORDINATE_SYSTEMS = build_src_filter=+ EXPECTED_PRINTER_CHECK = build_src_filter=+ HOST_KEEPALIVE_FEATURE = build_src_filter=+ -REPORT_CAPABILITIES_GCODE = build_src_filter=+ +CAPABILITIES_REPORT = build_src_filter=+ AUTO_REPORT_POSITION = build_src_filter=+ REPETIER_GCODE_M360 = build_src_filter=+ HAS_GCODE_M876 = build_src_filter=+ From 994aa9f6923e2307d13badd26a15e6d57525955f Mon Sep 17 00:00:00 2001 From: plampix Date: Fri, 5 Jan 2024 00:09:53 +0100 Subject: [PATCH 083/236] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Slimmer=20null=20T?= =?UTF-8?q?=20command=20(#26615)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/MarlinCore.cpp | 4 +++- Marlin/src/gcode/bedlevel/G26.cpp | 6 ++++-- Marlin/src/gcode/config/M217.cpp | 7 +++++-- Marlin/src/gcode/control/T.cpp | 6 ++++++ Marlin/src/gcode/gcode.cpp | 18 ++++++++++-------- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/inc/Conditionals_adv.h | 4 ++++ Marlin/src/module/tool_change.cpp | 4 ++++ ini/features.ini | 1 + platformio.ini | 1 - 10 files changed, 38 insertions(+), 15 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 0a97b4d13292..f0bd97ac1cf7 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -219,7 +219,9 @@ #include "feature/fanmux.h" #endif -#include "module/tool_change.h" +#if HAS_TOOLCHANGE + #include "module/tool_change.h" +#endif #if HAS_FANCHECK #include "feature/fancheck.h" diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 30643cb84e9b..5c7f9e1f6d97 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -501,8 +501,10 @@ void GcodeSuite::G26() { // or if the parameter parsing did not go OK, abort if (homing_needed_error()) return; - // Change the tool first, if specified - if (parser.seenval('T')) tool_change(parser.value_int()); + #if HAS_TOOLCHANGE + // Change the tool first, if specified + if (parser.seenval('T')) tool_change(parser.value_int()); + #endif g26_helper_t g26; diff --git a/Marlin/src/gcode/config/M217.cpp b/Marlin/src/gcode/config/M217.cpp index 5ef06e4823f3..59737d3b0438 100644 --- a/Marlin/src/gcode/config/M217.cpp +++ b/Marlin/src/gcode/config/M217.cpp @@ -25,7 +25,10 @@ #if HAS_MULTI_EXTRUDER #include "../gcode.h" -#include "../../module/tool_change.h" + +#if HAS_TOOLCHANGE + #include "../../module/tool_change.h" +#endif #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) #include "../../module/motion.h" // for active_extruder @@ -119,7 +122,7 @@ void GcodeSuite::M217() { #endif #endif - #if HAS_Z_AXIS + #if HAS_Z_AXIS && HAS_TOOLCHANGE if (parser.seenval('Z')) { toolchange_settings.z_raise = parser.value_linear_units(); } #endif diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index cbe4d26fac15..3c13fe231a79 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -20,6 +20,10 @@ * */ +#include "../../inc/MarlinConfigPre.h" + +#if HAS_TOOLCHANGE + #include "../gcode.h" #include "../../module/tool_change.h" @@ -76,3 +80,5 @@ void GcodeSuite::T(const int8_t tool_index) { #endif ); } + +#endif // HAS_TOOLCHANGE diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 5fb0594d9f48..86d73dd56fb4 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -122,14 +122,16 @@ void GcodeSuite::say_units() { * Return -1 if the T parameter is out of range */ int8_t GcodeSuite::get_target_extruder_from_command() { - if (parser.seenval('T')) { - const int8_t e = parser.value_byte(); - if (e < EXTRUDERS) return e; - SERIAL_ECHO_START(); - SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); - SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e); - return -1; - } + #if HAS_TOOLCHANGE + if (parser.seenval('T')) { + const int8_t e = parser.value_byte(); + if (e < EXTRUDERS) return e; + SERIAL_ECHO_START(); + SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); + SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e); + return -1; + } + #endif return active_extruder; } diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index ae60ac75563d..6be5dc642c81 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -1285,7 +1285,7 @@ class GcodeSuite { static void M710_report(const bool forReplay=true); #endif - static void T(const int8_t tool_index); + static void T(const int8_t tool_index) IF_DISABLED(HAS_TOOLCHANGE, { UNUSED(tool_index); }); }; diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 89a57f274d54..191da44af759 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -803,6 +803,10 @@ #endif #endif +#if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND || HAS_PRUSA_MMU2 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1) + #define HAS_TOOLCHANGE 1 +#endif + #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || ALL(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) #define HAS_MIXER_SYNC_CHANNEL 1 #endif diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 373dcf314221..b5cacc2f3bb9 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -22,6 +22,8 @@ #include "../inc/MarlinConfigPre.h" +#if HAS_TOOLCHANGE + #include "tool_change.h" #include "motion.h" @@ -1629,3 +1631,5 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { } #endif // TOOLCHANGE_MIGRATION_FEATURE + +#endif // HAS_TOOLCHANGE diff --git a/ini/features.ini b/ini/features.ini index 32fd6c262182..c4af1d0d951f 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -306,6 +306,7 @@ SERVO_DETACH_GCODE = build_src_filter=+ SPI_FLASH_BACKUP = build_src_filter=+ PLATFORM_M997_SUPPORT = build_src_filter=+ +HAS_TOOLCHANGE = build_src_filter=+ FT_MOTION = build_src_filter=+ + LIN_ADVANCE = build_src_filter=+ PHOTO_GCODE = build_src_filter=+ diff --git a/platformio.ini b/platformio.ini index 5249b790f2d0..e6adfe2b6be5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -107,7 +107,6 @@ default_src_filter = + - - + + + - + + + + From 5e0a8d21245d21eafdc55e77645cb20eef750017 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 5 Jan 2024 00:21:26 +0000 Subject: [PATCH 084/236] [cron] Bump distribution date (2024-01-05) --- 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 1cdc982294ea..25d9a5b78236 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 "2024-01-04" +//#define STRING_DISTRIBUTION_DATE "2024-01-05" /** * 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 2b250079f5cc..a9ad73b331fe 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 "2024-01-04" + #define STRING_DISTRIBUTION_DATE "2024-01-05" #endif /** From a5d097abe6e8cbad3dead9086439b3c0f44c7cb2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 4 Jan 2024 18:50:23 -0600 Subject: [PATCH 085/236] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20CTC=5FA10S?= =?UTF-8?q?=5FA13=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26514 --- Marlin/src/pins/sanguino/pins_ANET_10.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index 12afa2339386..9a217d9b4e88 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -187,7 +187,7 @@ * * Only the following displays are supported: * ZONESTAR_LCD - * CTC_A10S_A13G + * CTC_A10S_A13 * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER */ @@ -209,10 +209,10 @@ #elif IS_RRD_FG_SC // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics - // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb + // display using an adapter board. See https://go.aisler.net/benlye/anet-lcd-adapter/pcb // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748 - #if ENABLED(CTC_A10S_A13G) + #if ENABLED(CTC_A10S_A13) /** * CTC_A10S_A13 pinout From 4ae2a76492b176c831647e29cc6150e7d8c0605a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 5 Jan 2024 12:34:50 -0600 Subject: [PATCH 086/236] =?UTF-8?q?=F0=9F=8E=A8=20Clean=20up=20ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 1 - Marlin/src/gcode/feature/ft_motion/M493.cpp | 2 +- docs/BinaryFileTransferProtocol.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 248841d748d0..3208364c3c2e 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3885,7 +3885,6 @@ //#define M114_REALTIME // Real current position based on forward kinematics //#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed. - /** * Auto-report fan speed with M123 S * Requires fans with tachometer pins diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index d374ca58c9f5..a72a35d5bf36 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -129,7 +129,7 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { * M493: Set Fixed-time Motion Control parameters * * S Set the motion / shaping mode. Shaping requires an X axis, at the minimum. - * + * * 0: Standard Motion * 1: Fixed-Time Motion * 10: ZV : Zero Vibration diff --git a/docs/BinaryFileTransferProtocol.md b/docs/BinaryFileTransferProtocol.md index 46c1bf9718cf..6d52671789f7 100644 --- a/docs/BinaryFileTransferProtocol.md +++ b/docs/BinaryFileTransferProtocol.md @@ -1,5 +1,5 @@ # Marlin Binary File Transfer (BFT) -Marlin is capable of transferring binary data to the internal storage (SD card) via serial when built with `BINARY_FILE_TRANSFER` enabled. The following is a description of the binary protocol that must be used to conduct transfers once the printer is in binary mode after running `M28 B1`. +Marlin is capable of transferring binary data to the internal storage (SD card) via serial when built with `BINARY_FILE_TRANSFER` enabled. The following is a description of the binary protocol that must be used to conduct transfers once the printer is in binary mode after running `M28 B1`. ## Data Endianness All data structures are **little-endian**! This means that when constructing the packets with multi-byte values, the lower bits are packed first. For example, each packet should start with a 16-bit start token with the value of `0xB5AD`. The data itself should start with a value of `0xAD` followed by `0xB5` etc. From 2a8c00bdeb5268b11a3bbddfc8797a3f09a92947 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 6 Jan 2024 00:21:22 +0000 Subject: [PATCH 087/236] [cron] Bump distribution date (2024-01-06) --- 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 25d9a5b78236..baa1539a5b09 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 "2024-01-05" +//#define STRING_DISTRIBUTION_DATE "2024-01-06" /** * 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 a9ad73b331fe..892d02c74514 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 "2024-01-05" + #define STRING_DISTRIBUTION_DATE "2024-01-06" #endif /** From 4cddc61eda70d9e78ef7767fc052995855e34a79 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilenko Date: Mon, 8 Jan 2024 03:18:18 +0300 Subject: [PATCH 088/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20SPI=20TFT=20for=20?= =?UTF-8?q?STM32F1/F4=20(#26052)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/tft/tft_spi.cpp | 111 ++++++++++++++---------- Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp | 4 +- Marlin/src/lcd/tft/tft_string.cpp | 2 +- Marlin/src/lcd/tft_io/tft_io.cpp | 32 +++---- Marlin/src/lcd/tft_io/tft_io.h | 2 +- 5 files changed, 85 insertions(+), 66 deletions(-) diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.cpp b/Marlin/src/HAL/STM32/tft/tft_spi.cpp index cca247e20d6b..cda2eb28e304 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_spi.cpp @@ -31,6 +31,10 @@ #include "tft_spi.h" #include "pinconfig.h" +//#define DEBUG_TFT_IO +#define DEBUG_OUT ENABLED(DEBUG_TFT_IO) +#include "../../../core/debug_out.h" + SPI_HandleTypeDef TFT_SPI::SPIx; DMA_HandleTypeDef TFT_SPI::DMAtx; @@ -43,8 +47,9 @@ void TFT_SPI::init() { if ((spiInstance = (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK)) == NP) return; if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI)) return; - #if PIN_EXISTS(TFT_MISO) && TFT_MISO_PIN != TFT_MOSI_PIN - if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO)) return; + #if PIN_EXISTS(TFT_MISO) + // Check these pins in code because they are sometimes defined as analog pin references + if ((TFT_MISO_PIN != TFT_MOSI_PIN) && (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO))) return; #endif SPIx.Instance = spiInstance; @@ -76,10 +81,13 @@ void TFT_SPI::init() { pinmap_pinout(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK); pinmap_pinout(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI); - #if PIN_EXISTS(TFT_MISO) && TFT_MISO_PIN != TFT_MOSI_PIN - pinmap_pinout(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO); + #if PIN_EXISTS(TFT_MISO) + // Check these pins in code because they are sometimes defined as analog pin references + if (TFT_MISO_PIN != TFT_MOSI_PIN) pinmap_pinout(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO); #endif + //pin_PullConfig(get_GPIO_Port(STM_PORT(digitalPinToPinName(TFT_SCK_PIN))), STM_LL_GPIO_PIN(digitalPinToPinName(TFT_SCK_PIN)), GPIO_PULLDOWN); + #ifdef SPI1_BASE if (SPIx.Instance == SPI1) { __HAL_RCC_SPI1_CLK_ENABLE(); @@ -151,29 +159,47 @@ void TFT_SPI::dataTransferBegin(uint16_t dataSize) { WRITE(TFT_CS_PIN, LOW); } -#ifdef TFT_DEFAULT_DRIVER - #include "../../../lcd/tft_io/tft_ids.h" -#endif +#include "../../../lcd/tft_io/tft_ids.h" uint32_t TFT_SPI::getID() { - uint32_t id; - id = readID(LCD_READ_ID); + DEBUG_ECHOLNPGM("TFT_SPI::getID()"); + + uint32_t id = readID(LCD_READ_ID); + #if ENABLED(DEBUG_TFT_IO) + char debug_register[3], debug_value[5]; + sprintf_P(debug_register, PSTR("%02X"), LCD_READ_ID); + sprintf_P(debug_value, PSTR("%04X"), uint16_t(id)); + DEBUG_ECHOLNPGM(" readID(0x", debug_register, ") : 0x", debug_value); + #endif + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) { id = readID(LCD_READ_ID4); - #ifdef TFT_DEFAULT_DRIVER - if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) - id = TFT_DEFAULT_DRIVER; + #if ENABLED(DEBUG_TFT_IO) + sprintf_P(debug_register, PSTR("%02X"), LCD_READ_ID4); + sprintf_P(debug_value, PSTR("%04X"), uint16_t(id)); + DEBUG_ECHOLNPGM(" readID(0x", debug_register, ") : 0x", debug_value); #endif - } + } + + #ifdef TFT_DEFAULT_DRIVER + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) { + id = TFT_DEFAULT_DRIVER; + #if ENABLED(DEBUG_TFT_IO) + sprintf_P(debug_value, PSTR("%04X"), uint16_t(id)); + DEBUG_ECHOLNPGM(" Fallback to TFT_DEFAULT_DRIVER : 0x", debug_value); + #endif + } + #endif + return id; } uint32_t TFT_SPI::readID(const uint16_t inReg) { uint32_t data = 0; #if PIN_EXISTS(TFT_MISO) - const uint32_t oldPrescaler = SPIx.Init.BaudRatePrescaler; - + uint32_t BaudRatePrescaler = SPIx.Init.BaudRatePrescaler; SPIx.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; + dataTransferBegin(DATASIZE_8BIT); writeReg(inReg); @@ -185,10 +211,8 @@ uint32_t TFT_SPI::readID(const uint16_t inReg) { __HAL_SPI_ENABLE(&SPIx); SET_BIT(SPIx.Instance->CR1, SPI_CR1_CSTART); - #if TFT_MISO_PIN != TFT_MOSI_PIN - SPIx.Instance->TXDR = 0; - #endif - while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_EOT)) {} + if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) SPIx.Instance->TXDR = 0; + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_EOT)) { /* nada */ } data = (data << 8) | SPIx.Instance->RXDR; __HAL_SPI_DISABLE(&SPIx); __HAL_SPI_CLEAR_EOTFLAG(&SPIx); @@ -197,19 +221,22 @@ uint32_t TFT_SPI::readID(const uint16_t inReg) { #else __HAL_SPI_ENABLE(&SPIx); for (uint32_t i = 0; i < 4; i++) { - #if TFT_MISO_PIN != TFT_MOSI_PIN - while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) {} + if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) { + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) { /* nada */ } SPIx.Instance->DR = 0; - #endif - while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_RXNE)) {} + } + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_RXNE)) { /* nada */ } data = (data << 8) | SPIx.Instance->DR; } #endif dataTransferEnd(); - SPIx.Init.BaudRatePrescaler = oldPrescaler; + #if DISABLED(DEBUG_TFT_IO) + SPIx.Init.BaudRatePrescaler = BaudRatePrescaler; + #endif #endif + DEBUG_ECHOLNPGM(" raw data : ", data); return data >> 7; } @@ -238,13 +265,13 @@ bool TFT_SPI::isBusy() { // Check if SPI data transfer is completed if (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_EOT)) return true; #else - // Check if SPI is idle - if (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) return true; + // Check if SPI transmit butter is empty and SPI is idle + if ((!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) || (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY))) return true; #endif } abort(); - return false; + return true; } void TFT_SPI::abort() { @@ -263,9 +290,7 @@ void TFT_SPI::abort() { } void TFT_SPI::transmit(uint16_t data) { - #if TFT_MISO_PIN == TFT_MOSI_PIN - SPI_1LINE_TX(&SPIx); - #endif + if (SPIx.Init.Direction == SPI_DIRECTION_1LINE) SPI_1LINE_TX(&SPIx); #ifdef STM32H7xx MODIFY_REG(SPIx.Instance->CR2, SPI_CR2_TSIZE, 1); @@ -274,30 +299,26 @@ void TFT_SPI::transmit(uint16_t data) { SPIx.Instance->TXDR = data; - while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) {} + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) { /* nada */ } __HAL_SPI_CLEAR_EOTFLAG(&SPIx); __HAL_SPI_CLEAR_TXTFFLAG(&SPIx); + __HAL_SPI_DISABLE(&SPIx); #else __HAL_SPI_ENABLE(&SPIx); SPIx.Instance->DR = data; - while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {} + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) { /* nada */ } // Wait for data transfer to actually start + while ( __HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) { /* nada */ } // Wait until SPI is idle #endif - __HAL_SPI_DISABLE(&SPIx); - - #if TFT_MISO_PIN != TFT_MOSI_PIN - __HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received data is not read - #endif + if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) __HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received data is not read } void TFT_SPI::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count) { DMAtx.Init.MemInc = memoryIncrease; HAL_DMA_Init(&DMAtx); - #if TFT_MISO_PIN == TFT_MOSI_PIN - SPI_1LINE_TX(&SPIx); - #endif + if (SPIx.Init.Direction == SPI_DIRECTION_1LINE) SPI_1LINE_TX(&SPIx); dataTransferBegin(); @@ -316,7 +337,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 #endif - TERN_(TFT_SHARED_IO, while (isBusy())); + TERN_(TFT_SHARED_IO, while (isBusy()) { /* nada */ }); } void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) { @@ -324,9 +345,10 @@ void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY); #ifdef STM32H7xx - while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) {} + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) { /* nada */ } #else - while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {} + while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) { /* nada */ } + while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) { /* nada */ } #endif abort(); } @@ -337,8 +359,7 @@ void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) DMAtx.Init.MemInc = memoryIncrease; HAL_DMA_Init(&DMAtx); - if (TFT_MISO_PIN == TFT_MOSI_PIN) - SPI_1LINE_TX(&SPIx); + if (SPIx.Init.Direction == SPI_DIRECTION_1LINE) SPI_1LINE_TX(&SPIx); dataTransferBegin(); diff --git a/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp index 6cbe13e9fddb..236ff3f615ed 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp @@ -63,9 +63,7 @@ void TFT::lcdInit() { #if PIN_EXISTS(TFT_BACKLIGHT) OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif - #if HAS_LOGO_IN_FLASH - delay(2000); - #endif + TERN_(HAS_LOGO_IN_FLASH, delay(2000)); } void TFT::lcdClear(uint16_t color) { diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp index 9b4ab3e0843c..ad1a53c4556f 100644 --- a/Marlin/src/lcd/tft/tft_string.cpp +++ b/Marlin/src/lcd/tft/tft_string.cpp @@ -58,7 +58,7 @@ void TFT_String::set_font(const uint8_t *font) { for (glyph = 0; glyph < EXTRA_GLYPHS; glyph++) glyphs_extra[glyph] = nullptr; #endif - DEBUG_ECHOLNPGM("Format: ", ((unifont_t *)font_header)->format); + DEBUG_ECHOLNPGM("format: ", ((unifont_t *)font_header)->format); DEBUG_ECHOLNPGM("capitalAHeight: ", ((unifont_t *)font_header)->capitalAHeight); DEBUG_ECHOLNPGM("fontStartEncoding: ", ((unifont_t *)font_header)->fontStartEncoding); DEBUG_ECHOLNPGM("fontEndEncoding: ", ((unifont_t *)font_header)->fontEndEncoding); diff --git a/Marlin/src/lcd/tft_io/tft_io.cpp b/Marlin/src/lcd/tft_io/tft_io.cpp index d46c2de418fb..893ba617eb37 100644 --- a/Marlin/src/lcd/tft_io/tft_io.cpp +++ b/Marlin/src/lcd/tft_io/tft_io.cpp @@ -111,37 +111,37 @@ void TFT_IO::initTFT() { switch (lcd_id) { case LTDC_RGB: break; - case ST7796: // ST7796S 480x320 - DEBUG_ECHO_MSG(" ST7796S"); + case ST7796: + DEBUG_ECHO_MSG(" ST7796S"); // 480x320 write_esc_sequence(st7796s_init); break; - case ST7789: // ST7789V 320x240 - DEBUG_ECHO_MSG(" ST7789V"); + case ST7789: + DEBUG_ECHO_MSG(" ST7789V"); // 320x240 write_esc_sequence(st7789v_init); break; - case SSD1963: // SSD1963 + case SSD1963: DEBUG_ECHO_MSG(" SSD1963"); write_esc_sequence(ssd1963_init); break; - case ST7735: // ST7735 160x128 - DEBUG_ECHO_MSG(" ST7735"); + case ST7735: + DEBUG_ECHO_MSG(" ST7735"); // 160x128 write_esc_sequence(st7735_init); break; - case R61505: // R61505U 320x240 - DEBUG_ECHO_MSG(" R61505U"); + case R61505: + DEBUG_ECHO_MSG(" R61505U"); // 320x240 write_esc_sequence(r61505_init); break; - case ILI9328: // ILI9328 320x240 - DEBUG_ECHO_MSG(" ILI9328"); + case ILI9328: + DEBUG_ECHO_MSG(" ILI9328"); // 320x240 write_esc_sequence(ili9328_init); break; - case ILI9341: // ILI9341 320x240 - DEBUG_ECHO_MSG(" ILI9341"); + case ILI9341: + DEBUG_ECHO_MSG(" ILI9341"); // 320x240 write_esc_sequence(ili9341_init); break; - case ILI9488: // ILI9488 480x320 - case ILI9488_ID1: // 0x8066 ILI9488 480x320 - DEBUG_ECHO_MSG(" ILI9488"); + case ILI9488: + case ILI9488_ID1: + DEBUG_ECHO_MSG(" ILI9488"); // 480x320 write_esc_sequence(ili9488_init); break; default: diff --git a/Marlin/src/lcd/tft_io/tft_io.h b/Marlin/src/lcd/tft_io/tft_io.h index 98ce7407260c..efbd79b7c1f3 100644 --- a/Marlin/src/lcd/tft_io/tft_io.h +++ b/Marlin/src/lcd/tft_io/tft_io.h @@ -38,7 +38,7 @@ #endif #ifndef TFT_DRIVER - #define TFT_DRIVER AUTO + #define TFT_DRIVER AUTO #endif #define ESC_REG(x) 0xFFFF, 0x00FF & (uint16_t)x From 3a888e956b081a9cde1f496b6c24fa39b5061f39 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 8 Jan 2024 00:30:52 +0000 Subject: [PATCH 089/236] [cron] Bump distribution date (2024-01-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 baa1539a5b09..ddde5554e108 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 "2024-01-06" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 892d02c74514..323e8f75d719 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 "2024-01-06" + #define STRING_DISTRIBUTION_DATE "2024-01-08" #endif /** From 5987a5464bc8622d77ab52990b88d5ae035074e1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 7 Jan 2024 19:34:34 -0600 Subject: [PATCH 090/236] =?UTF-8?q?=F0=9F=8E=A8=20Use=20float=20CEIL/FLOOR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp | 6 +++--- Marlin/src/module/ft_motion.cpp | 6 +++--- Marlin/src/module/stepper.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp index 68581aeafd9b..01a2c4ebccdd 100644 --- a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp @@ -1655,9 +1655,9 @@ void RTS::handleData() { case AutolevelVal: { uint8_t meshPoint = (recdat.addr - AutolevelVal) / 2, - yPnt = floor(meshPoint / GRID_MAX_POINTS_X), - xPnt = meshPoint - (yPnt * GRID_MAX_POINTS_X); - if (yPnt % 2 != 0) xPnt = (GRID_MAX_POINTS_X - 1) - xPnt; // zag row + yPnt = meshPoint / (GRID_MAX_POINTS_X), + xPnt = meshPoint - yPnt * (GRID_MAX_POINTS_X); + if (yPnt % 2 != 0) xPnt = (GRID_MAX_POINTS_X) - 1 - xPnt; // zag row float meshVal = float(recdat.data[0] - (recdat.data[0] >= 32768 ? 65536 : 0)) / 1000; diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index ba1361f922b8..447f372e6367 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -544,9 +544,9 @@ void FTMotion::loadBlockData(block_t * const current_block) { const float T1 = (F_n - f_s) * oneOverAccel, T3 = (F_n - f_e) * oneOverAccel; - N1 = ceil(T1 * (FTM_FS)); // Accel datapoints based on Hz frequency - N2 = ceil(T2 * (FTM_FS)); // Coast - N3 = ceil(T3 * (FTM_FS)); // Decel + 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 diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 9c1668619ba9..552b7cb34a6e 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3161,7 +3161,7 @@ void Stepper::init() { factor2 += -7.58095488 * zeta2; const float zeta3 = zeta2 * zeta; factor2 += 43.073216 * zeta3; - factor2 = floor(factor2); + factor2 = FLOOR(factor2); } const bool was_on = hal.isr_state(); From f4eafed188189d2a77c53a2a68bd931ee838b584 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 7 Jan 2024 21:59:25 -0600 Subject: [PATCH 091/236] =?UTF-8?q?=F0=9F=94=A7=20Z=5FPROBE=5FEND=5FSCRIPT?= =?UTF-8?q?=20=3D>=20EVENT=5FGCODE=5FAFTER=5FG29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 2 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 6 +++--- Marlin/src/gcode/bedlevel/abl/G29.cpp | 6 +++--- Marlin/src/inc/Changes.h | 2 ++ buildroot/tests/mega2560 | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9acdc107ca8f..ad659f70e256 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2032,7 +2032,7 @@ * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. */ -//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" +//#define EVENT_GCODE_AFTER_G29 "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" /** * Normally G28 leaves leveling disabled on completion. Enable one of diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 720c86769da4..560ff71e8493 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -681,11 +681,11 @@ void unified_bed_leveling::G29() { ui.release(); #endif - #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + #ifdef EVENT_GCODE_AFTER_G29 + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29); if (probe_deployed) { planner.synchronize(); - gcode.process_subcommands_now(F(Z_PROBE_END_SCRIPT)); + gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_G29)); } #else UNUSED(probe_deployed); diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 700562df8168..1ca3826c816f 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -987,10 +987,10 @@ G29_TYPE GcodeSuite::G29() { TERN_(HAS_BED_PROBE, probe.move_z_after_probing()); - #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + #ifdef EVENT_GCODE_AFTER_G29 + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29); planner.synchronize(); - process_subcommands_now(F(Z_PROBE_END_SCRIPT)); + process_subcommands_now(F(EVENT_GCODE_AFTER_G29)); #endif probe.use_probing_tool(false); diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 5a03e87b1d8e..0fd91ee9ca13 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -685,6 +685,8 @@ #error "SDIO_SUPPORT is now ONBOARD_SDIO." #elif defined(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13." +#elif defined(Z_PROBE_END_SCRIPT) + #error "Z_PROBE_END_SCRIPT is now EVENT_GCODE_AFTER_G29." #endif // Changes to Probe Temp Compensation (#17392) diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index 1fbdd6b58b20..c41e73640d44 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -87,7 +87,7 @@ opt_disable X_DRIVER_TYPE Y_DRIVER_TYPE Z_DRIVER_TYPE exec_test $1 $2 "E Axis Only | DOGM MarlinUI" "$3" # -# Mixing Extruder with 5 steppers, Greek +# Mixing Extruder with 5 steppers, Russian # restore_configs opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \ @@ -98,7 +98,7 @@ opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \ XY_AFTER_HOMING EVENT_GCODE_AFTER_HOMING \ FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE INPUT_SHAPING_X INPUT_SHAPING_Y opt_disable DISABLE_OTHER_EXTRUDERS -exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Greek" "$3" +exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Russian" "$3" # # Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER From 38f483c4a6a0b6c814e5ee88747f58eed17fa61e Mon Sep 17 00:00:00 2001 From: mikemerryguy <57319047+mikemerryguy@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:14:24 -0500 Subject: [PATCH 092/236] =?UTF-8?q?=F0=9F=A9=B9=20Skip=20post-G28=20XY=20m?= =?UTF-8?q?ove=20for=20untrusted=20X=20or=20Y=20(#26644)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26469 Co-authored-by: Scott Lahteine --- Marlin/src/gcode/calibrate/G28.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 98d0a401481c..55698c942bd4 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -639,8 +639,8 @@ void GcodeSuite::G28() { #endif #ifdef XY_AFTER_HOMING - constexpr xy_pos_t xy_after XY_AFTER_HOMING; - do_blocking_move_to(xy_after); + if (!axes_should_home(_BV(X_AXIS) | _BV(Y_AXIS))) + do_blocking_move_to(xy_pos_t(XY_AFTER_HOMING)); #endif restore_feedrate_and_scaling(); From b106f59eb495718d7158e27347eca5deb11fbe86 Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Mon, 8 Jan 2024 05:17:43 +0100 Subject: [PATCH 093/236] =?UTF-8?q?=F0=9F=90=9B=20Refine=20FT=20Motion,=20?= =?UTF-8?q?I2S=20Stepping=20(#26628)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/ESP32/i2s.cpp | 58 ++++++++++++++-------- Marlin/src/inc/Conditionals_adv.h | 6 +++ Marlin/src/inc/SanityCheck.h | 8 ++- Marlin/src/inc/Warnings.cpp | 7 +++ Marlin/src/module/ft_motion.cpp | 35 ++++++++----- Marlin/src/module/ft_motion.h | 15 +++--- Marlin/src/module/ft_types.h | 9 +--- Marlin/src/module/stepper.cpp | 23 ++++++--- Marlin/src/pins/esp32/pins_ENWI_ESPNP.h | 4 +- Marlin/src/pins/esp32/pins_ESP32.h | 4 +- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 4 +- Marlin/src/pins/esp32/pins_MM_JOKER.h | 4 +- Marlin/src/pins/esp32/pins_MRR_ESPE.h | 4 +- Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h | 4 +- ini/esp32.ini | 20 ++++---- 15 files changed, 133 insertions(+), 72 deletions(-) diff --git a/Marlin/src/HAL/ESP32/i2s.cpp b/Marlin/src/HAL/ESP32/i2s.cpp index 69f8ca98458a..5404c3e9e2de 100644 --- a/Marlin/src/HAL/ESP32/i2s.cpp +++ b/Marlin/src/HAL/ESP32/i2s.cpp @@ -34,6 +34,10 @@ #include #include "../../module/stepper.h" +#if ENABLED(FT_MOTION) + #include "../../module/ft_motion.h" +#endif + #define DMA_BUF_COUNT 8 // number of DMA buffers to store data #define DMA_BUF_LEN 4092 // maximum size in bytes #define I2S_SAMPLE_SIZE 4 // 4 bytes, 32 bits per sample @@ -134,8 +138,8 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) { if (high_priority_task_awoken == pdTRUE) portYIELD_FROM_ISR(); - // clear interrupt - I2S0.int_clr.val = I2S0.int_st.val; //clear pending interrupt + // Clear pending interrupt + I2S0.int_clr.val = I2S0.int_st.val; } void stepperTask(void *parameter) { @@ -148,29 +152,43 @@ void stepperTask(void *parameter) { xQueueReceive(dma.queue, &dma.current, portMAX_DELAY); dma.rw_pos = 0; + const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.mode); + while (dma.rw_pos < DMA_SAMPLE_COUNT) { - if (!nextMainISR) { - Stepper::pulse_phase_isr(); - nextMainISR = Stepper::block_phase_isr(); - } - #if ENABLED(LIN_ADVANCE) - else if (!nextAdvanceISR) { - Stepper::advance_isr(); - nextAdvanceISR = Stepper::la_interval; - } - #endif - else - i2s_push_sample(); - nextMainISR--; + #if ENABLED(FT_MOTION) - #if ENABLED(LIN_ADVANCE) - if (nextAdvanceISR == Stepper::LA_ADV_NEVER) - nextAdvanceISR = Stepper::la_interval; + if (using_ftMotion) { + if (!nextMainISR) stepper.ftMotion_stepper(); + nextMainISR = 0; + } - if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER) - nextAdvanceISR--; #endif + + if (!using_ftMotion) { + if (!nextMainISR) { + Stepper::pulse_phase_isr(); + nextMainISR = Stepper::block_phase_isr(); + } + #if ENABLED(LIN_ADVANCE) + else if (!nextAdvanceISR) { + Stepper::advance_isr(); + nextAdvanceISR = Stepper::la_interval; + } + #endif + else + i2s_push_sample(); + + nextMainISR--; + + #if ENABLED(LIN_ADVANCE) + if (nextAdvanceISR == Stepper::LA_ADV_NEVER) + nextAdvanceISR = Stepper::la_interval; + + if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER) + nextAdvanceISR--; + #endif + } } } } diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 191da44af759..d535553ca931 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1309,6 +1309,12 @@ #define HAS_ZV_SHAPING 1 #endif +// FT Motion unified window and batch size +#if ALL(FT_MOTION, FTM_UNIFIED_BWS) + #define FTM_WINDOW_SIZE FTM_BW_SIZE + #define FTM_BATCH_SIZE FTM_BW_SIZE +#endif + // Toolchange Event G-code #if !HAS_MULTI_EXTRUDER || !(defined(EVENT_GCODE_TOOLCHANGE_T0) || defined(EVENT_GCODE_TOOLCHANGE_T1) || defined(EVENT_GCODE_TOOLCHANGE_T2) || defined(EVENT_GCODE_TOOLCHANGE_T3) || defined(EVENT_GCODE_TOOLCHANGE_T4) || defined(EVENT_GCODE_TOOLCHANGE_T5) || defined(EVENT_GCODE_TOOLCHANGE_T6) || defined(EVENT_GCODE_TOOLCHANGE_T7)) #undef TC_GCODE_USE_GLOBAL_X diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c3fed355d322..8fa189e9ce7e 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4123,8 +4123,12 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive." /** * Fixed-Time Motion limitations */ -#if ALL(FT_MOTION, MIXING_EXTRUDER) - #error "FT_MOTION does not currently support MIXING_EXTRUDER." +#if ENABLED(FT_MOTION) + #if ENABLED(MIXING_EXTRUDER) + #error "FT_MOTION does not currently support MIXING_EXTRUDER." + #elif DISABLED(FTM_UNIFIED_BWS) + #error "FT_MOTION requires FTM_UNIFIED_BWS to be enabled because FBS is not yet implemented." + #endif #endif // Multi-Stepping Limit diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 560acf4cd863..669f3fce76fa 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -826,3 +826,10 @@ #if PIN_EXISTS(BEEPER) && ALL(SPEAKER, NO_SPEAKER) #warning "The BEEPER cannot produce tones so you can disable SPEAKER." #endif + +/** + * Fixed-Time Motion + */ +#if ALL(FT_MOTION, I2S_STEPPER_STREAM) + #warning "FT_MOTION has not been tested with I2S_STEPPER_STREAM." +#endif diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index 447f372e6367..e912255561f1 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -55,8 +55,8 @@ FTMotion ftMotion; ft_config_t FTMotion::cfg; bool FTMotion::busy; // = false ft_command_t FTMotion::stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Stepper commands buffer. -uint32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper command write to the buffer. - FTMotion::stepperCmdBuff_consumeIdx = 0; // Index of next stepper command read from the buffer. +int32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper command write to the buffer. + FTMotion::stepperCmdBuff_consumeIdx = 0; // Index of next stepper command read from the buffer. bool FTMotion::sts_stepperBusy = false; // The stepper buffer has items and is in use. @@ -123,6 +123,8 @@ uint32_t FTMotion::interpIdx = 0, // Index of current data point b float FTMotion::e_advanced_z1 = 0.0f; // (ms) Unit delay of advanced extruder position. #endif +constexpr uint32_t last_batchIdx = (FTM_WINDOW_SIZE) - (FTM_BATCH_SIZE); + //----------------------------------------------------------------- // Function definitions. //----------------------------------------------------------------- @@ -145,8 +147,16 @@ void FTMotion::runoutBlock() { ratio.reset(); max_intervals = cfg.modeHasShaper() ? shaper_intervals : 0; - if (max_intervals <= TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, min_max_intervals - (FTM_BATCH_SIZE))) max_intervals = min_max_intervals; - max_intervals += TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_WINDOW_SIZE) - makeVector_batchIdx; + if (max_intervals <= TERN(FTM_UNIFIED_BWS, FTM_BATCH_SIZE, min_max_intervals - (FTM_BATCH_SIZE))) + max_intervals = min_max_intervals; + + max_intervals += ( + #if ENABLED(FTM_UNIFIED_BWS) + FTM_WINDOW_SIZE - makeVector_batchIdx + #else + FTM_WINDOW_SIZE - ((last_batchIdx < (FTM_BATCH_SIZE)) ? 0 : makeVector_batchIdx) + #endif + ); blockProcRdy = blockDataIsRunout = true; runoutEna = blockProcDn = false; } @@ -198,7 +208,7 @@ void FTMotion::loop() { ); // Shift the time series back in the window - #define TSHIFT(A) memcpy(traj.A, &traj.A[FTM_BATCH_SIZE], (FTM_WINDOW_SIZE - FTM_BATCH_SIZE) * sizeof(traj.A[0])) + #define TSHIFT(A) memcpy(traj.A, &traj.A[FTM_BATCH_SIZE], last_batchIdx * sizeof(traj.A[0])) LOGICAL_AXIS_CODE( TSHIFT(e), TSHIFT(x), TSHIFT(y), TSHIFT(z), @@ -219,7 +229,7 @@ void FTMotion::loop() { && (interpIdx - interpIdx_z1 < (FTM_STEPS_PER_LOOP)) ) { convertToSteps(interpIdx); - if (++interpIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE)) { + if (++interpIdx == FTM_BATCH_SIZE) { batchRdyForInterp = false; interpIdx = 0; } @@ -449,7 +459,7 @@ void FTMotion::reset() { endPosn_prevBlock.reset(); makeVector_idx = makeVector_idx_z1 = 0; - makeVector_batchIdx = 0; + makeVector_batchIdx = TERN(FTM_UNIFIED_BWS, 0, _MAX(last_batchIdx, FTM_BATCH_SIZE)); steps.reset(); interpIdx = interpIdx_z1 = 0; @@ -464,10 +474,11 @@ void FTMotion::reset() { } // Private functions. + // Auxiliary function to get number of step commands in the buffer. -uint32_t FTMotion::stepperCmdBuffItems() { - const uint32_t udiff = stepperCmdBuff_produceIdx - stepperCmdBuff_consumeIdx; - return stepperCmdBuff_produceIdx < stepperCmdBuff_consumeIdx ? (FTM_STEPPERCMD_BUFF_SIZE) + udiff : udiff; +int32_t FTMotion::stepperCmdBuffItems() { + const int32_t udiff = stepperCmdBuff_produceIdx - stepperCmdBuff_consumeIdx; + return (udiff < 0) ? udiff + (FTM_STEPPERCMD_BUFF_SIZE) : udiff; } // Initializes storage variables before startup. @@ -677,8 +688,8 @@ void FTMotion::makeVector() { #endif // Filled up the queue with regular and shaped steps - if (++makeVector_batchIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, (FTM_WINDOW_SIZE - FTM_BATCH_SIZE))) { - makeVector_batchIdx = 0; + if (++makeVector_batchIdx == FTM_WINDOW_SIZE) { + makeVector_batchIdx = last_batchIdx; batchRdy = true; } diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h index 8c8098873f42..884a18347903 100644 --- a/Marlin/src/module/ft_motion.h +++ b/Marlin/src/module/ft_motion.h @@ -102,12 +102,11 @@ class FTMotion { } static ft_command_t stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of stepper commands. - 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 int32_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 init(); static void startBlockProc(); // Set controller states to begin processing a block. @@ -153,10 +152,10 @@ class FTMotion { static uint32_t N1, N2, N3; static uint32_t max_intervals; - static constexpr uint32_t _ftm_size = TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE), - _ftm_wind = TERN(FTM_UNIFIED_BWS, 2, CEIL((FTM_WINDOW_SIZE) / _ftm_size)), - shaper_intervals = _ftm_size * CEIL((FTM_ZMAX) / _ftm_size), - min_max_intervals = _ftm_size * _ftm_wind; + #define _DIVCEIL(A,B) (((A) + (B) - 1) / (B)) + static constexpr uint32_t _ftm_ratio = TERN(FTM_UNIFIED_BWS, 2, _DIVCEIL(FTM_WINDOW_SIZE, FTM_BATCH_SIZE)), + shaper_intervals = (FTM_BATCH_SIZE) * _DIVCEIL(FTM_ZMAX, FTM_BATCH_SIZE), + min_max_intervals = (FTM_BATCH_SIZE) * _ftm_ratio; // Make vector variables. static uint32_t makeVector_idx, @@ -203,7 +202,7 @@ class FTMotion { #endif // Private methods - static uint32_t stepperCmdBuffItems(); + static int32_t stepperCmdBuffItems(); static void loadBlockData(block_t *const current_block); static void makeVector(); static void convertToSteps(const uint32_t idx); diff --git a/Marlin/src/module/ft_types.h b/Marlin/src/module/ft_types.h index b17c00974e76..d460853262cc 100644 --- a/Marlin/src/module/ft_types.h +++ b/Marlin/src/module/ft_types.h @@ -44,13 +44,8 @@ enum dynFreqMode_t : uint8_t { #define IS_EI_MODE(N) WITHIN(N, ftMotionMode_EI, ftMotionMode_3HEI) -#if ENABLED(FTM_UNIFIED_BWS) - typedef struct XYZEarray xyze_trajectory_t; - typedef struct XYZEarray xyze_trajectoryMod_t; -#else - typedef struct XYZEarray xyze_trajectory_t; - typedef struct XYZEarray xyze_trajectoryMod_t; -#endif +typedef struct XYZEarray xyze_trajectory_t; +typedef struct XYZEarray xyze_trajectoryMod_t; enum { LIST_N(DOUBLE(LOGICAL_AXES), diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 552b7cb34a6e..8d55d37b96f8 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1508,14 +1508,12 @@ void Stepper::isr() { #if ENABLED(FT_MOTION) if (using_ftMotion) { - if (!nextMainISR) { - nextMainISR = FTM_MIN_TICKS; - ftMotion_stepper(); - endstops.update(); - TERN_(BABYSTEPPING, if (babystep.has_steps()) babystepping_isr()); + if (!nextMainISR) { // Main ISR is ready to fire during this iteration? + nextMainISR = FTM_MIN_TICKS; // Set to minimum interval (a limit on the top speed) + ftMotion_stepper(); // Run FTM Stepping } - interval = nextMainISR; - nextMainISR -= interval; + interval = nextMainISR; // Interval is either some old nextMainISR or FTM_MIN_TICKS + nextMainISR = 0; // For FT Motion fire again ASAP } #endif @@ -3448,7 +3446,8 @@ void Stepper::report_positions() { // Use one byte to restore one stepper command in the format: // |X_step|X_direction|Y_step|Y_direction|Z_step|Z_direction|E_step|E_direction| const ft_command_t command = ftMotion.stepperCmdBuff[ftMotion.stepperCmdBuff_consumeIdx]; - if (++ftMotion.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE)) ftMotion.stepperCmdBuff_consumeIdx = 0U; + if (++ftMotion.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE)) + ftMotion.stepperCmdBuff_consumeIdx = 0; if (abort_current_block) return; @@ -3492,6 +3491,8 @@ void Stepper::report_positions() { U_APPLY_STEP(axis_did_move.u, false), V_APPLY_STEP(axis_did_move.v, false), W_APPLY_STEP(axis_did_move.w, false) ); + TERN_(I2S_STEPPER_STREAM, i2s_push_sample()); + // Begin waiting for the minimum pulse duration START_TIMED_PULSE(); @@ -3533,6 +3534,12 @@ void Stepper::report_positions() { U_APPLY_STEP(!STEP_STATE_U, false), V_APPLY_STEP(!STEP_STATE_V, false), W_APPLY_STEP(!STEP_STATE_W, false) ); + // Check endstops on every step + IF_DISABLED(ENDSTOP_INTERRUPTS_FEATURE, endstops.update()); + + // Also handle babystepping here + TERN_(BABYSTEPPING, if (babystep.has_steps()) babystepping_isr()); + } // Stepper::ftMotion_stepper void Stepper::ftMotion_blockQueueUpdate() { diff --git a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h index 360501aa08ac..65f734c7605d 100644 --- a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h +++ b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h @@ -34,7 +34,9 @@ // // I2S (steppers & other output-only pins) // -#define I2S_STEPPER_STREAM +#ifndef I2S_STEPPER_STREAM + #define I2S_STEPPER_STREAM +#endif #if ENABLED(I2S_STEPPER_STREAM) #define I2S_WS 17 #define I2S_BCK 22 diff --git a/Marlin/src/pins/esp32/pins_ESP32.h b/Marlin/src/pins/esp32/pins_ESP32.h index 1c01be8a88bc..9c9b06ca6437 100644 --- a/Marlin/src/pins/esp32/pins_ESP32.h +++ b/Marlin/src/pins/esp32/pins_ESP32.h @@ -32,7 +32,9 @@ // // I2S (steppers & other output-only pins) // -#define I2S_STEPPER_STREAM +#ifndef I2S_STEPPER_STREAM + #define I2S_STEPPER_STREAM +#endif #if ENABLED(I2S_STEPPER_STREAM) #define I2S_WS 25 #define I2S_BCK 26 diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 43196bafa91b..69afcc1aeb73 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -56,7 +56,9 @@ // // Enable I2S stepper stream // -#define I2S_STEPPER_STREAM +#ifndef I2S_STEPPER_STREAM + #define I2S_STEPPER_STREAM +#endif #if ENABLED(I2S_STEPPER_STREAM) #define I2S_WS 26 #define I2S_BCK 25 diff --git a/Marlin/src/pins/esp32/pins_MM_JOKER.h b/Marlin/src/pins/esp32/pins_MM_JOKER.h index 52ed543c33fd..b992fe89c3c8 100644 --- a/Marlin/src/pins/esp32/pins_MM_JOKER.h +++ b/Marlin/src/pins/esp32/pins_MM_JOKER.h @@ -85,7 +85,9 @@ // // Enable I2S stepper stream // -#define I2S_STEPPER_STREAM +#ifndef I2S_STEPPER_STREAM + #define I2S_STEPPER_STREAM +#endif #if ENABLED(I2S_STEPPER_STREAM) #define I2S_WS 26 #define I2S_BCK 25 diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index d88a3ab35968..90ff78487f33 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -51,7 +51,9 @@ // // Enable I2S stepper stream // -#define I2S_STEPPER_STREAM +#ifndef I2S_STEPPER_STREAM + #define I2S_STEPPER_STREAM +#endif #if ENABLED(I2S_STEPPER_STREAM) #define I2S_WS 26 #define I2S_BCK 25 diff --git a/Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h b/Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h index 5d3f75574d89..f627909a7a32 100644 --- a/Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h +++ b/Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h @@ -34,4 +34,6 @@ // // I2S (steppers & other output-only pins) // -#define I2S_STEPPER_STREAM +#ifndef I2S_STEPPER_STREAM + #define I2S_STEPPER_STREAM +#endif diff --git a/ini/esp32.ini b/ini/esp32.ini index 98c3e067552e..909394eae1e4 100644 --- a/ini/esp32.ini +++ b/ini/esp32.ini @@ -13,15 +13,17 @@ # Espressif ESP32 # [env:esp32] -platform = espressif32@2.1.0 -board = esp32dev -build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0 -build_src_filter = ${common.default_src_filter} + -lib_ignore = NativeEthernet -upload_speed = 500000 -monitor_speed = 250000 -monitor_filters = colorize, time, send_on_enter, log2file, esp32_exception_decoder -#upload_port = marlinesp.local +platform = espressif32@2.1.0 +platform_packages = espressif/toolchain-xtensa-esp32s3 +board = esp32dev +build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0 -std=gnu++17 +build_unflags = -std=gnu11 -std=gnu++11 +build_src_filter = ${common.default_src_filter} + +lib_ignore = NativeEthernet +upload_speed = 500000 +monitor_speed = 250000 +monitor_filters = colorize, time, send_on_enter, log2file, esp32_exception_decoder +#upload_port = marlinesp.local #board_build.flash_mode = qio [env:FYSETC_E4] From b2dd2dc217af35011bcded3f8603c954f5fed95a Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Mon, 8 Jan 2024 05:26:34 +0100 Subject: [PATCH 094/236] =?UTF-8?q?=F0=9F=9A=B8=20FT=20Motion=20M493=20rep?= =?UTF-8?q?ort=20less=20precision=20(#26643)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/ft_motion/M493.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index a72a35d5bf36..64d57118a0f3 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -79,7 +79,7 @@ void say_shaping() { SERIAL_ECHO_TERNARY(dynamic, "X/A ", "base dynamic", "static", " compensator frequency: "); SERIAL_ECHO(p_float_t(ftMotion.cfg.baseFreq[X_AXIS], 2), F("Hz")); #if HAS_DYNAMIC_FREQ - if (dynamic) SERIAL_ECHO(" scaling: ", p_float_t(ftMotion.cfg.dynFreqK[X_AXIS], 8), F("Hz/"), z_based ? F("mm") : F("g")); + if (dynamic) SERIAL_ECHO(F(" scaling: "), p_float_t(ftMotion.cfg.dynFreqK[X_AXIS], 2), F("Hz/"), z_based ? F("mm") : F("g")); #endif SERIAL_EOL(); #endif @@ -88,7 +88,7 @@ void say_shaping() { SERIAL_ECHO_TERNARY(dynamic, "Y/B ", "base dynamic", "static", " compensator frequency: "); SERIAL_ECHO(p_float_t(ftMotion.cfg.baseFreq[Y_AXIS], 2), F(" Hz")); #if HAS_DYNAMIC_FREQ - if (dynamic) SERIAL_ECHO(F(" scaling: "), p_float_t(ftMotion.cfg.dynFreqK[Y_AXIS], 8), F("Hz/"), z_based ? F("mm") : F("g")); + if (dynamic) SERIAL_ECHO(F(" scaling: "), p_float_t(ftMotion.cfg.dynFreqK[Y_AXIS], 2), F("Hz/"), z_based ? F("mm") : F("g")); #endif SERIAL_EOL(); #endif @@ -96,7 +96,10 @@ void say_shaping() { #if HAS_EXTRUDERS SERIAL_ECHO_TERNARY(ftMotion.cfg.linearAdvEna, "Linear Advance ", "en", "dis", "abled"); - SERIAL_ECHOLN(F(". Gain: "), p_float_t(ftMotion.cfg.linearAdvK, 5)); + if (ftMotion.cfg.linearAdvEna) + SERIAL_ECHOLNPGM(". Gain: ", ftMotion.cfg.linearAdvK); + else + SERIAL_EOL(); #endif } From 477b70eccf3210dc2fff2e84555830320bea9655 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 9 Jan 2024 00:22:16 +0000 Subject: [PATCH 095/236] [cron] Bump distribution date (2024-01-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 ddde5554e108..3c4056e1b429 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 "2024-01-08" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 323e8f75d719..0d4a1fe679f2 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 "2024-01-08" + #define STRING_DISTRIBUTION_DATE "2024-01-09" #endif /** From f6ecdae972c1e54f52daec5c63252281962da5b9 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:19:47 +1300 Subject: [PATCH 096/236] =?UTF-8?q?=F0=9F=94=A7=20Base=20NUM=5FSERVO=5FPLU?= =?UTF-8?q?GS=20on=20SERVO=20PINS=20(#26640)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/AVR/HAL.cpp | 6 ++++++ Marlin/src/HAL/LPC1768/HAL.cpp | 6 ++++++ Marlin/src/gcode/config/M43.cpp | 2 +- Marlin/src/inc/Conditionals_post.h | 30 ++++++++++++++++++------------ Marlin/src/inc/SanityCheck.h | 4 +--- Marlin/src/module/servo.cpp | 16 ++++++++++++---- Marlin/src/module/servo.h | 3 +++ Marlin/src/module/settings.cpp | 21 +++++++++------------ Marlin/src/pins/pins_postprocess.h | 14 +++++++++++++- buildroot/tests/BIGTREE_GTR_V1_0 | 1 + 10 files changed, 70 insertions(+), 33 deletions(-) diff --git a/Marlin/src/HAL/AVR/HAL.cpp b/Marlin/src/HAL/AVR/HAL.cpp index 407a570cde97..97173c63f9c1 100644 --- a/Marlin/src/HAL/AVR/HAL.cpp +++ b/Marlin/src/HAL/AVR/HAL.cpp @@ -81,6 +81,12 @@ void MarlinHAL::init() { #if HAS_SERVO_3 OUT_WRITE(SERVO3_PIN, LOW); #endif + #if HAS_SERVO_4 + OUT_WRITE(SERVO4_PIN, LOW); + #endif + #if HAS_SERVO_5 + OUT_WRITE(SERVO5_PIN, LOW); + #endif init_pwm_timers(); // Init user timers to default frequency - 1000HZ diff --git a/Marlin/src/HAL/LPC1768/HAL.cpp b/Marlin/src/HAL/LPC1768/HAL.cpp index 6fada12486a9..db9881cdd4ac 100644 --- a/Marlin/src/HAL/LPC1768/HAL.cpp +++ b/Marlin/src/HAL/LPC1768/HAL.cpp @@ -111,6 +111,12 @@ void MarlinHAL::init() { #if HAS_SERVO_3 INIT_SERVO(3); #endif + #if HAS_SERVO_4 + INIT_SERVO(4); + #endif + #if HAS_SERVO_5 + INIT_SERVO(5); + #endif //debug_frmwrk_init(); //_DBG("\n\nDebug running\n"); diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 5ea89b713638..467a31cf44fc 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -118,7 +118,7 @@ inline void toggle_pins() { inline void servo_probe_test() { - #if !(NUM_SERVOS > 0 && HAS_SERVO_0) + #if !HAS_SERVO_0 SERIAL_ERROR_MSG("SERVO not set up."); diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index e87681684d42..eabb01130063 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2762,20 +2762,26 @@ #endif // Servos -#if PIN_EXISTS(SERVO0) && NUM_SERVOS > 0 - #define HAS_SERVO_0 1 -#endif -#if PIN_EXISTS(SERVO1) && NUM_SERVOS > 1 - #define HAS_SERVO_1 1 -#endif -#if PIN_EXISTS(SERVO2) && NUM_SERVOS > 2 - #define HAS_SERVO_2 1 -#endif -#if PIN_EXISTS(SERVO3) && NUM_SERVOS > 3 - #define HAS_SERVO_3 1 -#endif #if NUM_SERVOS > 0 #define HAS_SERVOS 1 + #if PIN_EXISTS(SERVO0) + #define HAS_SERVO_0 1 + #endif + #if PIN_EXISTS(SERVO1) && NUM_SERVOS > 1 + #define HAS_SERVO_1 1 + #endif + #if PIN_EXISTS(SERVO2) && NUM_SERVOS > 2 + #define HAS_SERVO_2 1 + #endif + #if PIN_EXISTS(SERVO3) && NUM_SERVOS > 3 + #define HAS_SERVO_3 1 + #endif + #if PIN_EXISTS(SERVO4) && NUM_SERVOS > 4 + #define HAS_SERVO_4 1 + #endif + #if PIN_EXISTS(SERVO5) && NUM_SERVOS > 5 + #define HAS_SERVO_5 1 + #endif #if defined(PAUSE_SERVO_OUTPUT) && defined(RESUME_SERVO_OUTPUT) #define HAS_PAUSE_SERVO_OUTPUT 1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 8fa189e9ce7e..a64c05c84033 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -961,9 +961,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L /** * Limited number of servos */ -#if NUM_SERVOS > NUM_SERVO_PLUGS - #error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS." -#endif +static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) is too large. The selected board only has " STRINGIFY(NUM_SERVO_PLUGS) " servos."); /** * Servo deactivation depends on servo endstops, switching nozzle, or switching extruder diff --git a/Marlin/src/module/servo.cpp b/Marlin/src/module/servo.cpp index 2782be1f2bd9..6ce12c9abecf 100644 --- a/Marlin/src/module/servo.cpp +++ b/Marlin/src/module/servo.cpp @@ -37,22 +37,30 @@ hal_servo_t servo[NUM_SERVOS]; #endif void servo_init() { - #if NUM_SERVOS >= 1 && HAS_SERVO_0 + #if HAS_SERVO_0 servo[0].attach(SERVO0_PIN); servo[0].detach(); // Just set up the pin. We don't have a position yet. Don't move to a random position. #endif - #if NUM_SERVOS >= 2 && HAS_SERVO_1 + #if HAS_SERVO_1 servo[1].attach(SERVO1_PIN); servo[1].detach(); #endif - #if NUM_SERVOS >= 3 && HAS_SERVO_2 + #if HAS_SERVO_2 servo[2].attach(SERVO2_PIN); servo[2].detach(); #endif - #if NUM_SERVOS >= 4 && HAS_SERVO_3 + #if HAS_SERVO_3 servo[3].attach(SERVO3_PIN); servo[3].detach(); #endif + #if HAS_SERVO_4 + servo[4].attach(SERVO4_PIN); + servo[4].detach(); + #endif + #if HAS_SERVO_5 + servo[5].attach(SERVO5_PIN); + servo[5].detach(); + #endif } #endif // HAS_SERVOS diff --git a/Marlin/src/module/servo.h b/Marlin/src/module/servo.h index 40cfcee3c690..0286fe905bda 100644 --- a/Marlin/src/module/servo.h +++ b/Marlin/src/module/servo.h @@ -107,6 +107,9 @@ , { ASRC(3,0), ASRC(3,1) } #if NUM_SERVOS > 4 , { ASRC(4,0), ASRC(4,1) } + #if NUM_SERVOS > 5 + , { ASRC(5,0), ASRC(5,1) } + #endif #endif #endif #endif diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 387d86ba29bb..d3b1c580634b 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -92,12 +92,6 @@ #include "servo.h" #endif -#if HAS_SERVOS && HAS_SERVO_ANGLES - #define EEPROM_NUM_SERVOS NUM_SERVOS -#else - #define EEPROM_NUM_SERVOS NUM_SERVO_PLUGS -#endif - #include "../feature/fwretract.h" #if ENABLED(POWER_LOSS_RECOVERY) @@ -318,7 +312,9 @@ typedef struct SettingsDataStruct { // // SERVO_ANGLES // - uint16_t servo_angles[EEPROM_NUM_SERVOS][2]; // M281 P L U + #if HAS_SERVO_ANGLES + uint16_t servo_angles[NUM_SERVOS][2]; // M281 P L U + #endif // // Temperature first layer compensation values @@ -1051,13 +1047,12 @@ void MarlinSettings::postprocess() { // // Servo Angles // + #if HAS_SERVO_ANGLES { _FIELD_TEST(servo_angles); - #if !HAS_SERVO_ANGLES - uint16_t servo_angles[EEPROM_NUM_SERVOS][2] = { { 0, 0 } }; - #endif EEPROM_WRITE(servo_angles); } + #endif // // Thermal first layer compensation values @@ -2082,15 +2077,17 @@ void MarlinSettings::postprocess() { // // SERVO_ANGLES // + #if HAS_SERVO_ANGLES { _FIELD_TEST(servo_angles); #if ENABLED(EDITABLE_SERVO_ANGLES) - uint16_t (&servo_angles_arr)[EEPROM_NUM_SERVOS][2] = servo_angles; + uint16_t (&servo_angles_arr)[NUM_SERVOS][2] = servo_angles; #else - uint16_t servo_angles_arr[EEPROM_NUM_SERVOS][2]; + uint16_t servo_angles_arr[NUM_SERVOS][2]; #endif EEPROM_READ(servo_angles_arr); } + #endif // // Thermal first layer compensation values diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index e5467833e56b..e97b6ceaa440 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -487,8 +487,20 @@ #define SUICIDE_PIN_STATE LOW #endif -#ifndef NUM_SERVO_PLUGS +#if PIN_EXISTS(SERVO5) + #define NUM_SERVO_PLUGS 6 +#elif PIN_EXISTS(SERVO4) + #define NUM_SERVO_PLUGS 5 +#elif PIN_EXISTS(SERVO3) #define NUM_SERVO_PLUGS 4 +#elif PIN_EXISTS(SERVO2) + #define NUM_SERVO_PLUGS 3 +#elif PIN_EXISTS(SERVO1) + #define NUM_SERVO_PLUGS 2 +#elif PIN_EXISTS(SERVO0) + #define NUM_SERVO_PLUGS 1 +#else + #define NUM_SERVO_PLUGS 0 #endif // Only used within pins files diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index 62ca3c24f274..e2e70e5f81e3 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -33,6 +33,7 @@ exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3" restore_configs opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ EXTRUDERS 3 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 \ + SERVO1_PIN PE9 SERVO2_PIN PE11 \ SERVO_DELAY '{ 300, 300, 300 }' \ SWITCHING_TOOLHEAD_X_POS '{ 215, 0 ,0 }' \ MPC_HEATER_POWER '{ 40.0f, 40.0f, 40.0f }' \ From a533e9e637cb3c7e1c86513bdce9a7802f921d44 Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Tue, 9 Jan 2024 23:42:08 +0200 Subject: [PATCH 097/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20edit=20Z=20jerk=20?= =?UTF-8?q?step=20size=20(#26650)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25514 Co-authored-by: Scott Lahteine --- Marlin/src/inc/Conditionals_LCD.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index e07d026cb961..752e3aef6bf8 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -263,10 +263,13 @@ #endif #if NUM_AXES >= 1 #define HAS_X_AXIS 1 + #define HAS_A_AXIS 1 #if NUM_AXES >= XY #define HAS_Y_AXIS 1 + #define HAS_B_AXIS 1 #if NUM_AXES >= XYZ #define HAS_Z_AXIS 1 + #define HAS_C_AXIS 1 #if NUM_AXES >= 4 #define HAS_I_AXIS 1 #if NUM_AXES >= 5 From 320b7a9ac33e908860191b27626753e76f103f21 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 10 Jan 2024 00:21:58 +0000 Subject: [PATCH 098/236] [cron] Bump distribution date (2024-01-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 3c4056e1b429..2ca028ebc562 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 "2024-01-09" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 0d4a1fe679f2..f134f53e5f6f 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 "2024-01-09" + #define STRING_DISTRIBUTION_DATE "2024-01-10" #endif /** From 12d7995a18d3ce59c871e11c4940bbaeb9c352fc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 9 Jan 2024 18:45:17 -0600 Subject: [PATCH 099/236] =?UTF-8?q?=F0=9F=8E=A8=20Minor=20temp=20/=20UI=20?= =?UTF-8?q?refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/feature/controllerfan.cpp | 34 ++++---- Marlin/src/inc/Conditionals_LCD.h | 4 + Marlin/src/lcd/e3v2/creality/dwin.cpp | 8 +- Marlin/src/lcd/marlinui.h | 6 +- Marlin/src/module/temperature.cpp | 110 ++++++++++++-------------- Marlin/src/module/temperature.h | 17 ++-- 7 files changed, 95 insertions(+), 86 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index f0bd97ac1cf7..91496b1c5c50 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -819,7 +819,7 @@ void idle(const bool no_stepper_sleep/*=false*/) { TERN_(HAS_BEEPER, buzzer.tick()); // Handle UI input / draw events - TERN(DWIN_CREALITY_LCD, dwinUpdate(), ui.update()); + ui.update(); // Run i2c Position Encoders #if ENABLED(I2C_POSITION_ENCODERS) diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp index 816ffb23b7ea..acbae459e716 100644 --- a/Marlin/src/feature/controllerfan.cpp +++ b/Marlin/src/feature/controllerfan.cpp @@ -55,17 +55,19 @@ void ControllerFan::set_fan_speed(const uint8_t s) { } void ControllerFan::update() { - static millis_t lastMotorOn = 0, // Last time a motor was turned on - nextMotorCheck = 0; // Last time the state was checked + static millis_t lastComponentOn = 0, // Last time a stepper, heater, etc. was turned on + nextFanCheck = 0; // Last time the state was checked const millis_t ms = millis(); - if (ELAPSED(ms, nextMotorCheck)) { - nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s - - // If any triggers for the controller fan are true... - // - At least one stepper driver is enabled - // - The heated bed is enabled - // - TEMP_SENSOR_BOARD is reporting >= CONTROLLER_FAN_MIN_BOARD_TEMP - // - TEMP_SENSOR_SOC is reporting >= CONTROLLER_FAN_MIN_SOC_TEMP + if (ELAPSED(ms, nextFanCheck)) { + nextFanCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s + + /** + * If any triggers for the controller fan are true... + * - At least one stepper driver is enabled + * - The heated bed (MOSFET) is enabled + * - TEMP_SENSOR_BOARD is reporting >= CONTROLLER_FAN_MIN_BOARD_TEMP + * - TEMP_SENSOR_SOC is reporting >= CONTROLLER_FAN_MIN_SOC_TEMP + */ const ena_mask_t axis_mask = TERN(CONTROLLER_FAN_USE_Z_ONLY, _BV(Z_AXIS), (ena_mask_t)~TERN0(CONTROLLER_FAN_IGNORE_Z, _BV(Z_AXIS))); if ( (stepper.axis_enabled.bits & axis_mask) || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0) @@ -75,13 +77,15 @@ void ControllerFan::update() { #ifdef CONTROLLER_FAN_MIN_SOC_TEMP || thermalManager.wholeDegSoc() >= CONTROLLER_FAN_MIN_SOC_TEMP #endif - ) lastMotorOn = ms; //... set time to NOW so the fan will turn on + ) lastComponentOn = ms; //... set time to NOW so the fan will turn on - // Fan Settings. Set fan > 0: - // - If AutoMode is on and steppers have been enabled for CONTROLLERFAN_IDLE_TIME seconds. - // - If System is on idle and idle fan speed settings is activated. + /** + * Fan Settings. Set fan > 0: + * - If AutoMode is on and hot components have been powered for CONTROLLERFAN_IDLE_TIME seconds. + * - If System is on idle and idle fan speed settings is activated. + */ set_fan_speed( - settings.auto_mode && lastMotorOn && PENDING(ms, lastMotorOn + SEC_TO_MS(settings.duration)) + settings.auto_mode && lastComponentOn && PENDING(ms, lastComponentOn + SEC_TO_MS(settings.duration)) ? settings.active_speed : settings.idle_speed ); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 752e3aef6bf8..58842209afe2 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1090,6 +1090,10 @@ #define HAS_DISPLAY 1 #endif +#if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD) + #define HAS_UI_UPDATE 1 +#endif + #if HAS_WIRED_LCD && !HAS_GRAPHICAL_TFT && !IS_DWIN_MARLINUI #define HAS_LCDPRINT 1 #endif diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 8156489f7bc5..6ba0184d71b7 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -4077,11 +4077,13 @@ void dwinInitScreen() { } void dwinUpdate() { - eachMomentUpdate(); // Status update - hmiSDCardUpdate(); // SD card update - dwinHandleScreen(); // Rotary encoder update + eachMomentUpdate(); // Status update + hmiSDCardUpdate(); // SD card update + dwinHandleScreen(); // Rotary encoder update } +void MarlinUI::update() { dwinUpdate(); } + void eachMomentUpdate() { static millis_t next_var_update_ms = 0, next_rts_update_ms = 0; diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index a463701f566a..c661e635cc83 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -505,9 +505,10 @@ class MarlinUI { template static void status_printf(int8_t level, FSTR_P const ffmt, Args... more) { status_printf_P(level, FTOP(ffmt), more...); } - #if HAS_DISPLAY + // Periodic or as-needed display update + static void update() IF_DISABLED(HAS_UI_UPDATE, {}); - static void update(); + #if HAS_DISPLAY static void abort_print(); static void pause_print(); @@ -628,7 +629,6 @@ class MarlinUI { #else // No LCD - static void update() {} static void kill_screen(FSTR_P const, FSTR_P const) {} #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index e65297b04a24..5173db02a156 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -490,8 +490,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); #if HAS_HEATED_BED bed_info_t Temperature::temp_bed; // = { 0 } // 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; + temp_raw_range_t Temperature::temp_sensor_range_bed = { TEMP_SENSOR_BED_RAW_LO_TEMP, TEMP_SENSOR_BED_RAW_HI_TEMP }; #if WATCH_BED bed_watch_t Temperature::watch_bed; // = { 0 } #endif @@ -505,8 +504,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); #if HAS_HEATED_CHAMBER millis_t next_cool_check_ms = 0; 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; + temp_raw_range_t Temperature::temp_sensor_range_chamber = { TEMP_SENSOR_CHAMBER_RAW_LO_TEMP, TEMP_SENSOR_CHAMBER_RAW_HI_TEMP }; #if WATCH_CHAMBER chamber_watch_t Temperature::watch_chamber; // = { 0 } #endif @@ -522,8 +520,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); bool flag_cooler_state; //bool flag_cooler_excess = false; celsius_float_t previous_temp = 9999; - raw_adc_t Temperature::mintemp_raw_COOLER = TEMP_SENSOR_COOLER_RAW_LO_TEMP, - Temperature::maxtemp_raw_COOLER = TEMP_SENSOR_COOLER_RAW_HI_TEMP; + temp_raw_range_t Temperature::temp_sensor_range_cooler = { TEMP_SENSOR_COOLER_RAW_LO_TEMP, TEMP_SENSOR_COOLER_RAW_HI_TEMP }; #if WATCH_COOLER cooler_watch_t Temperature::watch_cooler; // = { 0 } #endif @@ -538,8 +535,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); #if HAS_TEMP_BOARD board_info_t Temperature::temp_board; // = { 0 } #if ENABLED(THERMAL_PROTECTION_BOARD) - raw_adc_t Temperature::mintemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_LO_TEMP, - Temperature::maxtemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_HI_TEMP; + temp_raw_range_t Temperature::temp_sensor_range_board = { TEMP_SENSOR_BOARD_RAW_LO_TEMP, TEMP_SENSOR_BOARD_RAW_HI_TEMP }; #endif #endif @@ -700,7 +696,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_STARTED)); TERN_(PROUI_PID_TUNE, dwinPidTuning(isbed ? PIDTEMPBED_START : PIDTEMP_START)); - if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, temp_range[heater_id].maxtemp - (HOTEND_OVERSHOOT))) { + if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) { SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH)); TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_TEMP_TOO_HIGH)); @@ -718,7 +714,7 @@ volatile bool Temperature::raw_temps_ready = false; #if ENABLED(PRINTER_EVENT_LEDS) const celsius_float_t start_temp = GHV(degChamber(), degBed(), degHotend(heater_id)); - LEDColor color = ONHEATINGSTART(); + const LEDColor oldcolor = ONHEATINGSTART(); #endif TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = false); @@ -882,7 +878,7 @@ volatile bool Temperature::raw_temps_ready = false; if (set_result) GHV(_set_chamber_pid(tune_pid), _set_bed_pid(tune_pid), _set_hotend_pid(heater_id, tune_pid)); - TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color)); + TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(oldcolor)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); TERN_(PROUI_PID_TUNE, dwinPidTuning(AUTOTUNE_DONE)); @@ -894,13 +890,13 @@ volatile bool Temperature::raw_temps_ready = false; hal.idletask(); // Run UI update - TERN(DWIN_CREALITY_LCD, dwinUpdate(), ui.update()); + ui.update(); } wait_for_heatup = false; disable_all_heaters(); - TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color)); + TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(oldcolor)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); TERN_(PROUI_PID_TUNE, dwinPidTuning(AUTOTUNE_DONE)); @@ -1143,7 +1139,7 @@ volatile bool Temperature::raw_temps_ready = false; } Temperature::MPC_autotuner::MeasurementState Temperature::MPC_autotuner::housekeeping() { - const millis_t report_interval_ms = 1000UL; + constexpr millis_t report_interval_ms = 1000UL; curr_time_ms = millis(); if (updateTemperaturesIfReady()) { // temp sample ready @@ -1158,7 +1154,7 @@ volatile bool Temperature::raw_temps_ready = false; } hal.idletask(); - TERN(DWIN_CREALITY_LCD, dwinUpdate(), ui.update()); + ui.update(); if (!wait_for_heatup) { SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_INTERRUPTED); @@ -1834,12 +1830,18 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T // Check if temperature is within the correct band if (WITHIN(temp_bed.celsius, BED_MINTEMP, BED_MAXTEMP)) { #if ENABLED(BED_LIMIT_SWITCHING) + + // Range-limited "bang-bang" bed heating if (temp_bed.is_above_target(BED_HYSTERESIS)) temp_bed.soft_pwm_amount = 0; else if (temp_bed.is_below_target(BED_HYSTERESIS)) temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; + #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING + + // Simple (noisy) "bang-bang" bed heating temp_bed.soft_pwm_amount = temp_bed.is_below_target() ? MAX_BED_POWER >> 1 : 0; + #endif } else { @@ -2632,31 +2634,8 @@ void Temperature::updateTemperaturesFromRawValues() { TERN_(HAS_POWER_MONITOR, power_monitor.capture_values()); #if HAS_HOTEND - static constexpr int8_t temp_dir[HOTENDS] = { - #if TEMP_SENSOR_IS_ANY_MAX_TC(0) - 0 - #else - TEMPDIR(0) - #endif - #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_IS_ANY_MAX_TC(1) - , 0 - #else - , TEMPDIR(1) - #endif - #endif - #if HOTENDS > 2 - #if TEMP_SENSOR_IS_ANY_MAX_TC(2) - , 0 - #else - , TEMPDIR(2) - #endif - #endif - #if HOTENDS > 3 - #define _TEMPDIR(N) , TEMPDIR(N) - REPEAT_S(3, HOTENDS, _TEMPDIR) - #endif - }; + #define _TEMPDIR(N) TEMP_SENSOR_IS_ANY_MAX_TC(N) ? 0 : TEMPDIR(N), + static constexpr int8_t temp_dir[HOTENDS] = { REPEAT(HOTENDS, _TEMPDIR) }; HOTEND_LOOP() { const raw_adc_t r = temp_hotend[e].getraw(); @@ -2683,31 +2662,37 @@ void Temperature::updateTemperaturesFromRawValues() { #endif // HAS_HOTEND - #define TP_CMP(S,A,B) (TEMPDIR(S) < 0 ? ((A)<(B)) : ((A)>(B))) #if ENABLED(THERMAL_PROTECTION_BED) - if (TP_CMP(BED, temp_bed.getraw(), maxtemp_raw_BED)) MAXTEMP_ERROR(H_BED, temp_bed.celsius); - if (temp_bed.target > 0 && !is_bed_preheating() && TP_CMP(BED, mintemp_raw_BED, temp_bed.getraw())) MINTEMP_ERROR(H_BED, temp_bed.celsius); + if (TP_CMP(BED, temp_bed.getraw(), temp_sensor_range_bed.raw_max)) + MAXTEMP_ERROR(H_BED, temp_bed.celsius); + if (temp_bed.target > 0 && !is_bed_preheating() && TP_CMP(BED, temp_sensor_range_bed.raw_min, temp_bed.getraw())) + MINTEMP_ERROR(H_BED, temp_bed.celsius); #endif #if ALL(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) - if (TP_CMP(CHAMBER, temp_chamber.getraw(), maxtemp_raw_CHAMBER)) MAXTEMP_ERROR(H_CHAMBER, temp_chamber.celsius); - if (temp_chamber.target > 0 && TP_CMP(CHAMBER, mintemp_raw_CHAMBER, temp_chamber.getraw())) MINTEMP_ERROR(H_CHAMBER, temp_chamber.celsius); + if (TP_CMP(CHAMBER, temp_chamber.getraw(), temp_sensor_range_chamber.raw_max)) + MAXTEMP_ERROR(H_CHAMBER, temp_chamber.celsius); + if (temp_chamber.target > 0 && TP_CMP(CHAMBER, temp_sensor_range_chamber.raw_min, temp_chamber.getraw())) + MINTEMP_ERROR(H_CHAMBER, temp_chamber.celsius); #endif #if ALL(HAS_COOLER, THERMAL_PROTECTION_COOLER) - if (cutter.unitPower > 0 && TP_CMP(COOLER, temp_cooler.getraw(), maxtemp_raw_COOLER)) MAXTEMP_ERROR(H_COOLER, temp_cooler.celsius); - if (TP_CMP(COOLER, mintemp_raw_COOLER, temp_cooler.getraw())) MINTEMP_ERROR(H_COOLER, temp_cooler.celsius); + if (cutter.unitPower > 0 && TP_CMP(COOLER, temp_cooler.getraw(), temp_sensor_range_cooler.raw_max)) + MAXTEMP_ERROR(H_COOLER, temp_cooler.celsius); + if (TP_CMP(COOLER, temp_sensor_range_cooler.raw_min, temp_cooler.getraw())) + MINTEMP_ERROR(H_COOLER, temp_cooler.celsius); #endif #if ALL(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) - if (TP_CMP(BOARD, temp_board.getraw(), maxtemp_raw_BOARD)) MAXTEMP_ERROR(H_BOARD, temp_board.celsius); - if (TP_CMP(BOARD, mintemp_raw_BOARD, temp_board.getraw())) MINTEMP_ERROR(H_BOARD, temp_board.celsius); + if (TP_CMP(BOARD, temp_board.getraw(), temp_sensor_range_board.raw_max)) + MAXTEMP_ERROR(H_BOARD, temp_board.celsius); + if (TP_CMP(BOARD, temp_sensor_range_board.raw_min, temp_board.getraw())) + MINTEMP_ERROR(H_BOARD, temp_board.celsius); #endif #if ALL(HAS_TEMP_SOC, THERMAL_PROTECTION_SOC) if (TP_CMP(SOC, temp_soc.getraw(), maxtemp_raw_SOC)) MAXTEMP_ERROR(H_SOC, temp_soc.celsius); #endif - #undef TP_CMP } // Temperature::updateTemperaturesFromRawValues @@ -2733,7 +2718,6 @@ void Temperature::init() { TERN_(PROBING_HEATERS_OFF, paused_for_probing = false); - // Init (and disable) SPI thermocouples #if TEMP_SENSOR_IS_ANY_MAX_TC(0) && PIN_EXISTS(TEMP_0_CS) OUT_WRITE(TEMP_0_CS_PIN, HIGH); @@ -3051,23 +3035,31 @@ void Temperature::init() { // TODO: combine these into the macros above #if HAS_HEATED_BED - while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR); - while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) maxtemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR); + while (analog_to_celsius_bed(temp_sensor_range_bed.raw_min) < BED_MINTEMP) + temp_sensor_range_bed.raw_min += TEMPDIR(BED) * (OVERSAMPLENR); + while (analog_to_celsius_bed(temp_sensor_range_bed.raw_max) > BED_MAXTEMP) + temp_sensor_range_bed.raw_max -= TEMPDIR(BED) * (OVERSAMPLENR); #endif #if HAS_HEATED_CHAMBER - while (analog_to_celsius_chamber(mintemp_raw_CHAMBER) < CHAMBER_MINTEMP) mintemp_raw_CHAMBER += TEMPDIR(CHAMBER) * (OVERSAMPLENR); - while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) maxtemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR); + while (analog_to_celsius_chamber(temp_sensor_range_chamber.raw_min) < CHAMBER_MINTEMP) + temp_sensor_range_chamber.raw_min += TEMPDIR(CHAMBER) * (OVERSAMPLENR); + while (analog_to_celsius_chamber(temp_sensor_range_chamber.raw_max) > CHAMBER_MAXTEMP) + temp_sensor_range_chamber.raw_max -= TEMPDIR(CHAMBER) * (OVERSAMPLENR); #endif #if HAS_COOLER - while (analog_to_celsius_cooler(mintemp_raw_COOLER) > COOLER_MINTEMP) mintemp_raw_COOLER += TEMPDIR(COOLER) * (OVERSAMPLENR); - while (analog_to_celsius_cooler(maxtemp_raw_COOLER) < COOLER_MAXTEMP) maxtemp_raw_COOLER -= TEMPDIR(COOLER) * (OVERSAMPLENR); + while (analog_to_celsius_cooler(temp_sensor_range_cooler.raw_min) > COOLER_MINTEMP) + temp_sensor_range_cooler.raw_min += TEMPDIR(COOLER) * (OVERSAMPLENR); + while (analog_to_celsius_cooler(temp_sensor_range_cooler.raw_max) < COOLER_MAXTEMP) + temp_sensor_range_cooler.raw_max -= TEMPDIR(COOLER) * (OVERSAMPLENR); #endif #if ALL(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) - while (analog_to_celsius_board(mintemp_raw_BOARD) < BOARD_MINTEMP) mintemp_raw_BOARD += TEMPDIR(BOARD) * (OVERSAMPLENR); - while (analog_to_celsius_board(maxtemp_raw_BOARD) > BOARD_MAXTEMP) maxtemp_raw_BOARD -= TEMPDIR(BOARD) * (OVERSAMPLENR); + while (analog_to_celsius_board(temp_sensor_range_board.raw_min) < BOARD_MINTEMP) + temp_sensor_range_board.raw_min += TEMPDIR(BOARD) * (OVERSAMPLENR); + while (analog_to_celsius_board(temp_sensor_range_board.raw_max) > BOARD_MAXTEMP) + temp_sensor_range_board.raw_max -= TEMPDIR(BOARD) * (OVERSAMPLENR); #endif #if ALL(HAS_TEMP_SOC, THERMAL_PROTECTION_SOC) diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 2acc1205b730..c4d718e148ba 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -522,6 +522,9 @@ struct HeaterWatch { typedef struct HeaterWatch cooler_watch_t; #endif +// Just raw temperature sensor ranges +typedef struct { raw_adc_t raw_min, raw_max; } temp_raw_range_t; + // Temperature sensor read value ranges typedef struct { raw_adc_t raw_min, raw_max; celsius_t mintemp, maxtemp; } temp_range_t; @@ -727,6 +730,7 @@ class Temperature { #endif #if HAS_HOTEND + // Sensor ranges, not user-configured static temp_range_t temp_range[HOTENDS]; #endif @@ -737,7 +741,7 @@ class Temperature { #if DISABLED(PIDTEMPBED) static millis_t next_bed_check_ms; #endif - static raw_adc_t mintemp_raw_BED, maxtemp_raw_BED; + static temp_raw_range_t temp_sensor_range_bed; #endif #if HAS_HEATED_CHAMBER @@ -747,7 +751,7 @@ class Temperature { #if DISABLED(PIDTEMPCHAMBER) static millis_t next_chamber_check_ms; #endif - static raw_adc_t mintemp_raw_CHAMBER, maxtemp_raw_CHAMBER; + static temp_raw_range_t temp_sensor_range_chamber; #endif #if HAS_COOLER @@ -755,11 +759,11 @@ class Temperature { static cooler_watch_t watch_cooler; #endif static millis_t next_cooler_check_ms, cooler_fan_flush_ms; - static raw_adc_t mintemp_raw_COOLER, maxtemp_raw_COOLER; + static temp_raw_range_t temp_sensor_range_cooler; #endif #if ALL(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) - static raw_adc_t mintemp_raw_BOARD, maxtemp_raw_BOARD; + static temp_raw_range_t temp_sensor_range_board; #endif #if ALL(HAS_TEMP_SOC, THERMAL_PROTECTION_SOC) @@ -1194,7 +1198,7 @@ class Temperature { #endif /** - * Perform auto-tuning for hotend or bed in response to M303 + * M303 PID auto-tuning for hotends or bed */ #if HAS_PID_HEATING @@ -1219,6 +1223,9 @@ class Temperature { #endif // HAS_PID_HEATING + /** + * M306 MPC auto-tuning for hotends + */ #if ENABLED(MPC_AUTOTUNE) // Utility class to perform MPCTEMP auto tuning measurements From 25caae1e8c238422cb8ee00637d463ae837c5273 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:55:20 +1300 Subject: [PATCH 100/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20PID=20/=20MPC=20tu?= =?UTF-8?q?ne=20background=20tasks=20(#26652)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/module/temperature.cpp | 56 ++++++++++++++++++++++--------- Marlin/src/module/temperature.h | 2 ++ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 5173db02a156..c4920c210024 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -628,6 +628,36 @@ volatile bool Temperature::raw_temps_ready = false; * Class and Instance Methods */ +#if ANY(HAS_PID_HEATING, MPC_AUTOTUNE) + + /** + * Run the minimal required activities during a tuning loop. + * TODO: Allow tuning routines to call idle() for more complete keepalive. + */ + bool Temperature::tuning_idle(const millis_t &ms) { + + // Run HAL idle tasks + hal.idletask(); + + const bool temp_ready = updateTemperaturesIfReady(); + + #if HAS_FAN_LOGIC + if (temp_ready) manage_extruder_fans(ms); + #else + UNUSED(ms); + #endif + + // Run Controller Fan check (normally handled by manage_inactivity) + TERN_(USE_CONTROLLER_FAN, controllerFan.update()); + + // Run UI update + ui.update(); + + return temp_ready; + } + +#endif + #if HAS_PID_HEATING inline void say_default_() { SERIAL_ECHOPGM("#define DEFAULT_"); } @@ -727,7 +757,11 @@ volatile bool Temperature::raw_temps_ready = false; const millis_t ms = millis(); - if (updateTemperaturesIfReady()) { // temp sample ready + // Run minimal necessary machine tasks + const bool temp_ready = tuning_idle(ms); + + // If a new sample has arrived process things + if (temp_ready) { // Get the current temperature and constrain it current_temp = GHV(degChamber(), degBed(), degHotend(heater_id)); @@ -738,8 +772,6 @@ volatile bool Temperature::raw_temps_ready = false; ONHEATING(start_temp, current_temp, target); #endif - TERN_(HAS_FAN_LOGIC, manage_extruder_fans(ms)); - if (heating && current_temp > target && ELAPSED(ms, t2 + 5000UL)) { heating = false; SHV((bias - d) >> 1); @@ -885,12 +917,6 @@ volatile bool Temperature::raw_temps_ready = false; goto EXIT_M303; } - - // Run HAL idle tasks - hal.idletask(); - - // Run UI update - ui.update(); } wait_for_heatup = false; @@ -1142,10 +1168,11 @@ volatile bool Temperature::raw_temps_ready = false; constexpr millis_t report_interval_ms = 1000UL; curr_time_ms = millis(); - if (updateTemperaturesIfReady()) { // temp sample ready - current_temp = degHotend(e); - TERN_(HAS_FAN_LOGIC, manage_extruder_fans(curr_time_ms)); - } + // Run minimal necessary machine tasks + const bool temp_ready = tuning_idle(curr_time_ms); + + // Set MPC temp if a new sample is ready + if (temp_ready) current_temp = degHotend(e); if (ELAPSED(curr_time_ms, next_report_ms)) { next_report_ms += report_interval_ms; @@ -1153,9 +1180,6 @@ volatile bool Temperature::raw_temps_ready = false; SERIAL_EOL(); } - hal.idletask(); - ui.update(); - if (!wait_for_heatup) { SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_INTERRUPTED); TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_INTERRUPTED)); diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index c4d718e148ba..c69a272adfdf 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -1197,6 +1197,8 @@ class Temperature { static constexpr bool adaptive_fan_slowing = true; #endif + static bool tuning_idle(const millis_t &ms); + /** * M303 PID auto-tuning for hotends or bed */ From cb291e8d00a6c1ee0a778625e0170b6b7430a004 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 9 Jan 2024 22:41:00 -0600 Subject: [PATCH 101/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20some=20temp=20cons?= =?UTF-8?q?traints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/bedlevel/G26.cpp | 2 +- Marlin/src/inc/Conditionals_post.h | 8 ++++---- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 4 ++-- .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 3 +-- .../src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 4 ++-- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 6 +++--- .../lcd/extui/dgus_reloaded/DGUSRxHandler.cpp | 18 ++++++++++------- .../extui/dgus_reloaded/DGUSScreenHandler.cpp | 2 +- .../extui/dgus_reloaded/DGUSScreenHandler.h | 2 +- .../lcd/extui/dgus_reloaded/DGUSTxHandler.cpp | 20 ++++++++++++------- Marlin/src/lcd/menu/menu_configuration.cpp | 16 +++++++-------- Marlin/src/module/temperature.cpp | 6 +++--- Marlin/src/module/temperature.h | 2 +- 14 files changed, 52 insertions(+), 43 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 5c7f9e1f6d97..7fae11783e9d 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -615,7 +615,7 @@ void GcodeSuite::G26() { // If any preset or temperature was specified if (noztemp) { - if (!WITHIN(noztemp, 165, (HEATER_0_MAXTEMP) - (HOTEND_OVERSHOOT))) { + if (!WITHIN(noztemp, 165, thermalManager.hotend_max_target(active_extruder))) { SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible."); return; } diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index eabb01130063..076b1301d5e3 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2458,7 +2458,7 @@ #ifndef BED_OVERSHOOT #define BED_OVERSHOOT 10 #endif - #define BED_MAX_TARGET (BED_MAXTEMP - (BED_OVERSHOOT)) + #define BED_MAX_TARGET ((BED_MAXTEMP) - (BED_OVERSHOOT)) #else #undef PIDTEMPBED #undef PREHEAT_BEFORE_LEVELING @@ -2469,8 +2469,8 @@ #ifndef COOLER_OVERSHOOT #define COOLER_OVERSHOOT 2 #endif - #define COOLER_MIN_TARGET (COOLER_MINTEMP + (COOLER_OVERSHOOT)) - #define COOLER_MAX_TARGET (COOLER_MAXTEMP - (COOLER_OVERSHOOT)) + #define COOLER_MIN_TARGET ((COOLER_MINTEMP) + (COOLER_OVERSHOOT)) + #define COOLER_MAX_TARGET ((COOLER_MAXTEMP) - (COOLER_OVERSHOOT)) #endif #if HAS_TEMP_HOTEND || HAS_HEATED_BED || HAS_TEMP_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER || HAS_TEMP_BOARD || HAS_TEMP_SOC @@ -2482,7 +2482,7 @@ #ifndef CHAMBER_OVERSHOOT #define CHAMBER_OVERSHOOT 10 #endif - #define CHAMBER_MAX_TARGET (CHAMBER_MAXTEMP - (CHAMBER_OVERSHOOT)) + #define CHAMBER_MAX_TARGET ((CHAMBER_MAXTEMP) - (CHAMBER_OVERSHOOT)) #else #undef PIDTEMPCHAMBER #endif diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 296f46f68a32..8d0482f41075 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -114,7 +114,7 @@ #define MAX_FLOW_RATE 299 #define MIN_FLOW_RATE 10 - #define MAX_E_TEMP (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT) + #define MAX_E_TEMP thermalManager.hotend_max_target(0) #define MIN_E_TEMP 0 #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 7520b46b60e4..b42a9a263b8c 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -154,8 +154,8 @@ #endif // Editable temperature limits -#define MIN_ETEMP 0 -#define MAX_ETEMP (thermalManager.hotend_maxtemp[0] - (HOTEND_OVERSHOOT)) +#define MIN_ETEMP 0 +#define MAX_ETEMP thermalManager.hotend_max_target(0) #define MIN_BEDTEMP 0 #define MAX_BEDTEMP BED_MAX_TARGET 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 8b073652b044..f8cba1567694 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -697,8 +697,7 @@ void AnycubicTFT::getCommandFromTFT() { case 18: { // A18 set fan speed float fanPercent; if (codeSeen('S')) { - fanPercent = codeValue(); - fanPercent = constrain(fanPercent, 0, 100); + fanPercent = constrain(codeValue(), 0, 100); setTargetFan_percent(fanPercent, FAN0); } else diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index 3209aa76f248..ed4f8c73673a 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -1011,7 +1011,7 @@ namespace Anycubic { #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); + temp = constrain(uint16_t(control_value), 0, thermalManager.hotend_max_target(0)); setTargetTemp_celsius(temp, E0); //sprintf(str_buf,"%u/%u", (uint16_t)thermalManager.degHotend(0), uint16_t(control_value)); //sendTxtToTFT(str_buf, TXT_PRINT_HOTEND); @@ -1021,7 +1021,7 @@ namespace Anycubic { #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); + temp = constrain(uint16_t(control_value), 0, BED_MAX_TARGET); setTargetTemp_celsius(temp, BED); //sprintf(str_buf,"%u/%u", uint16_t(thermalManager.degBed()), uint16_t(control_value)); //sendTxtToTFT(str_buf, TXT_PRINT_BED); diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index d440ea537539..dc2156a0e225 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -379,21 +379,21 @@ void DGUSScreenHandler::handleTemperatureChanged(DGUS_VP_Variable &var, void *va default: return; #if HAS_HOTEND case VP_T_E0_Set: - NOMORE(newvalue, HEATER_0_MAXTEMP); + NOMORE(newvalue, thermalManager.hotend_max_target(0)); thermalManager.setTargetHotend(newvalue, 0); acceptedvalue = thermalManager.degTargetHotend(0); break; #endif #if HAS_MULTI_HOTEND case VP_T_E1_Set: - NOMORE(newvalue, HEATER_1_MAXTEMP); + NOMORE(newvalue, thermalManager.hotend_max_target(1)); thermalManager.setTargetHotend(newvalue, 1); acceptedvalue = thermalManager.degTargetHotend(1); break; #endif #if HAS_HEATED_BED case VP_T_Bed_Set: - NOMORE(newvalue, BED_MAXTEMP); + NOMORE(newvalue, BED_MAX_TARGET); thermalManager.setTargetBed(newvalue); acceptedvalue = thermalManager.degTargetBed(); break; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp index aa58e8569229..c953b417a53a 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp @@ -809,15 +809,19 @@ void DGUSRxHandler::pidSetTemp(DGUS_VP &vp, void *data_ptr) { switch (screen.pid_heater) { default: return; - case DGUS_Data::Heater::BED: - temp = constrain(temp, BED_MINTEMP, BED_MAX_TARGET); - break; - case DGUS_Data::Heater::H0: - temp = constrain(temp, HEATER_0_MINTEMP, (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT)); - break; + #if HAS_HEATED_BED + case DGUS_Data::Heater::BED: + LIMIT(temp, BED_MINTEMP, BED_MAX_TARGET); + break; + #endif + #if HAS_HOTEND + case DGUS_Data::Heater::H0: + LIMIT(temp, celsius_t(HEATER_0_MINTEMP), thermalManager.hotend_max_target(0)); + break; + #endif #if HAS_MULTI_HOTEND case DGUS_Data::Heater::H1: - temp = constrain(temp, HEATER_1_MINTEMP, (HEATER_1_MAXTEMP - HOTEND_OVERSHOOT)); + LIMIT(temp, celsius_t(HEATER_1_MINTEMP), thermalManager.hotend_max_target(0)); break; #endif } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index 76aa3de8727e..703c56d1e116 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -51,7 +51,7 @@ uint16_t DGUSScreenHandler::filament_length = DGUS_DEFAULT_FILAMENT_LEN; char DGUSScreenHandler::gcode[] = ""; DGUS_Data::Heater DGUSScreenHandler::pid_heater = DGUS_Data::Heater::H0; -uint16_t DGUSScreenHandler::pid_temp = DGUS_PLA_TEMP_HOTEND; +celsius_t DGUSScreenHandler::pid_temp = DGUS_PLA_TEMP_HOTEND; uint8_t DGUSScreenHandler::pid_cycles = 5; bool DGUSScreenHandler::settings_ready = false; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h index 27f7f92517ca..e5942ad44d5b 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h @@ -106,7 +106,7 @@ class DGUSScreenHandler { static char gcode[DGUS_GCODE_LEN + 1]; static DGUS_Data::Heater pid_heater; - static uint16_t pid_temp; + static celsius_t pid_temp; static uint8_t pid_cycles; static bool wait_continue; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp index 037eafcc9424..1212f715c008 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp @@ -31,7 +31,9 @@ #include "../ui_api.h" #include "../../../module/stepper.h" +#include "../../../module/temperature.h" #include "../../../module/printcounter.h" + #if ENABLED(ADVANCED_PAUSE_FEATURE) #include "../../../feature/pause.h" #endif @@ -266,15 +268,19 @@ void DGUSTxHandler::tempMax(DGUS_VP &vp) { switch (vp.addr) { default: return; - case DGUS_Addr::TEMP_Max_Bed: - temp = BED_MAX_TARGET; - break; - case DGUS_Addr::TEMP_Max_H0: - temp = HEATER_0_MAXTEMP - HOTEND_OVERSHOOT; - break; + #if HAS_HEATED_BED + case DGUS_Addr::TEMP_Max_Bed: + temp = BED_MAX_TARGET; + break; + #endif + #if HAS_HOTEND + case DGUS_Addr::TEMP_Max_H0: + temp = thermalManager.hotend_max_target(0); + break; + #endif #if HAS_MULTI_HOTEND case DGUS_Addr::TEMP_Max_H1: - temp = HEATER_1_MAXTEMP - HOTEND_OVERSHOOT; + temp = thermalManager.hotend_max_target(1); break; #endif } diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 7347f219e0ab..3280b23e5b6b 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -262,9 +262,9 @@ void menu_advanced_settings(); if (c.timeout) GCODES_ITEM(MSG_HOTEND_IDLE_DISABLE, F("M87")); EDIT_ITEM(int3, MSG_TIMEOUT, &c.timeout, 0, 999); - EDIT_ITEM(int3, MSG_TEMPERATURE, &c.trigger, 0, HEATER_0_MAXTEMP); - EDIT_ITEM(int3, MSG_HOTEND_IDLE_NOZZLE_TARGET, &c.nozzle_target, 0, HEATER_0_MAXTEMP); - EDIT_ITEM(int3, MSG_HOTEND_IDLE_BED_TARGET, &c.bed_target, 0, BED_MAXTEMP); + EDIT_ITEM(int3, MSG_TEMPERATURE, &c.trigger, 0, thermalManager.hotend_max_target(0)); + EDIT_ITEM(int3, MSG_HOTEND_IDLE_NOZZLE_TARGET, &c.nozzle_target, 0, thermalManager.hotend_max_target(0)); + EDIT_ITEM(int3, MSG_HOTEND_IDLE_BED_TARGET, &c.bed_target, 0, BED_MAX_TARGET); END_MENU(); } @@ -397,10 +397,10 @@ void menu_advanced_settings(); #if HAS_PREHEAT && DISABLED(SLIM_LCD_MENUS) void _menu_configuration_preheat_settings() { - #define _MINTEMP_ITEM(N) HEATER_##N##_MINTEMP, - #define _MAXTEMP_ITEM(N) HEATER_##N##_MAXTEMP, - #define MINTEMP_ALL _MIN(REPEAT(HOTENDS, _MINTEMP_ITEM) 999) - #define MAXTEMP_ALL _MAX(REPEAT(HOTENDS, _MAXTEMP_ITEM) 0) + #define _MIN_ITEM(N) HEATER_##N##_MINTEMP, + #define _MAX_ITEM(N) thermalManager.hotend_max_target(0), + #define MINTARGET_ALL _MIN(REPEAT(HOTENDS, _MIN_ITEM) 999) + #define MAXTARGET_ALL _MAX(REPEAT(HOTENDS, _MAX_ITEM) 0) const uint8_t m = MenuItemBase::itemIndex; START_MENU(); STATIC_ITEM_F(ui.get_preheat_label(m), SS_DEFAULT|SS_INVERT); @@ -410,7 +410,7 @@ void menu_advanced_settings(); EDIT_ITEM_N(percent, m, MSG_FAN_SPEED, &editable.uint8, 0, 255, []{ ui.material_preset[MenuItemBase::itemIndex].fan_speed = editable.uint8; }); #endif #if HAS_TEMP_HOTEND - EDIT_ITEM(int3, MSG_NOZZLE, &ui.material_preset[m].hotend_temp, MINTEMP_ALL, MAXTEMP_ALL - (HOTEND_OVERSHOOT)); + EDIT_ITEM(int3, MSG_NOZZLE, &ui.material_preset[m].hotend_temp, MINTARGET_ALL, MAXTARGET_ALL); #endif #if HAS_HEATED_BED EDIT_ITEM(int3, MSG_BED, &ui.material_preset[m].bed_temp, BED_MINTEMP, BED_MAX_TARGET); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index c4920c210024..ad1daae76245 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -301,13 +301,13 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); // 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, \ + S >= 998 || M <= _MAX(TT_NAME(S)[0].celsius, TT_NAME(S)[COUNT(TT_NAME(S)) - 1].celsius) - (HOTEND_OVERSHOOT), \ "HEATER_" STRINGIFY(N) "_MAXTEMP (" STRINGIFY(M) ") is too high for thermistor_" STRINGIFY(S) ".h with HOTEND_OVERSHOOT=" STRINGIFY(HOTEND_OVERSHOOT) "."); #define CHECK_MAXTEMP(N) TERN(TEMP_SENSOR_##N##_IS_THERMISTOR, CHECK_MAXTEMP_, CODE_0)(N, HEATER_##N##_MAXTEMP, TEMP_SENSOR_##N) REPEAT(HOTENDS, CHECK_MAXTEMP) #if HAS_PREHEAT - #define CHECK_PREHEAT__(N,P,T,M) static_assert(T <= M - HOTEND_OVERSHOOT, "PREHEAT_" STRINGIFY(P) "_TEMP_HOTEND (" STRINGIFY(T) ") must be less than HEATER_" STRINGIFY(N) "_MAXTEMP (" STRINGIFY(M) ") - " STRINGIFY(HOTEND_OVERSHOOT) "."); + #define CHECK_PREHEAT__(N,P,T,M) static_assert(T <= (M) - (HOTEND_OVERSHOOT), "PREHEAT_" STRINGIFY(P) "_TEMP_HOTEND (" STRINGIFY(T) ") must be less than HEATER_" STRINGIFY(N) "_MAXTEMP (" STRINGIFY(M) ") - " STRINGIFY(HOTEND_OVERSHOOT) "."); #define CHECK_PREHEAT_(N,P) CHECK_PREHEAT__(N, P, PREHEAT_##P##_TEMP_HOTEND, HEATER_##N##_MAXTEMP) #define CHECK_PREHEAT(P) REPEAT2(HOTENDS, CHECK_PREHEAT_, P) #if PREHEAT_COUNT >= 1 @@ -1694,7 +1694,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T } float pid_output = power * 254.0f / mpc.heater_power + 1.0f; // Ensure correct quantization into a range of 0 to 127 - pid_output = constrain(pid_output, 0, MPC_MAX); + LIMIT(pid_output, 0, MPC_MAX); /* <-- add a slash to enable static uint32_t nexttime = millis() + 1000; diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index c69a272adfdf..088a17ec1b99 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -597,7 +597,7 @@ class Temperature { #if HAS_HOTEND static hotend_info_t temp_hotend[HOTENDS]; static constexpr celsius_t hotend_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP); - static celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } + static constexpr celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } #endif #if HAS_HEATED_BED From 85ded0b9bd9550a4b2a7e0326de7e098dd465a70 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 9 Jan 2024 22:41:54 -0600 Subject: [PATCH 102/236] =?UTF-8?q?=F0=9F=A9=B9=20Clarify=20servo=20=C2=B5?= =?UTF-8?q?s=20min/max?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/shared/servo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/HAL/shared/servo.cpp b/Marlin/src/HAL/shared/servo.cpp index bb9d61801841..543bc8e873ae 100644 --- a/Marlin/src/HAL/shared/servo.cpp +++ b/Marlin/src/HAL/shared/servo.cpp @@ -60,8 +60,8 @@ ServoInfo_t servo_info[MAX_SERVOS]; // static array of servo info structures uint8_t ServoCount = 0; // the total number of attached servos -#define SERVO_MIN(v) (MIN_PULSE_WIDTH - (v) * 4) // minimum value in uS for this servo -#define SERVO_MAX(v) (MAX_PULSE_WIDTH - (v) * 4) // maximum value in uS for this servo +#define SERVO_MIN_US(v) (MIN_PULSE_WIDTH - (v) * 4) // minimum value in uS for this servo +#define SERVO_MAX_US(v) (MAX_PULSE_WIDTH - (v) * 4) // maximum value in uS for this servo /************ static functions common to all instances ***********************/ @@ -117,7 +117,7 @@ void Servo::detach() { void Servo::write(int value) { if (value < MIN_PULSE_WIDTH) // treat values less than 544 as angles in degrees (valid values in microseconds are handled as microseconds) - value = map(constrain(value, 0, 180), 0, 180, SERVO_MIN(min), SERVO_MAX(max)); + value = map(constrain(value, 0, 180), 0, 180, SERVO_MIN_US(min), SERVO_MAX_US(max)); writeMicroseconds(value); } @@ -126,8 +126,8 @@ void Servo::writeMicroseconds(int value) { byte channel = servoIndex; if (channel < MAX_SERVOS) { // ensure channel is valid // ensure pulse width is valid - value = constrain(value, SERVO_MIN(min), SERVO_MAX(max)) - (TRIM_DURATION); - value = usToTicks(value); // convert to ticks after compensating for interrupt overhead - 12 Aug 2009 + LIMIT(value, SERVO_MIN_US(min), SERVO_MAX_US(max)); + value = usToTicks(value - (TRIM_DURATION)); // convert to ticks after compensating for interrupt overhead - 12 Aug 2009 CRITICAL_SECTION_START(); servo_info[channel].ticks = value; @@ -136,7 +136,7 @@ void Servo::writeMicroseconds(int value) { } // return the value as degrees -int Servo::read() { return map(readMicroseconds() + 1, SERVO_MIN(min), SERVO_MAX(max), 0, 180); } +int Servo::read() { return map(readMicroseconds() + 1, SERVO_MIN_US(min), SERVO_MAX_US(max), 0, 180); } int Servo::readMicroseconds() { return (servoIndex == INVALID_SERVO) ? 0 : ticksToUs(servo_info[servoIndex].ticks) + (TRIM_DURATION); From 1d46e67de202ae436958c344506f14d2da975076 Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Wed, 10 Jan 2024 07:13:10 +0200 Subject: [PATCH 103/236] =?UTF-8?q?=E2=9C=A8=20PLR=5FBED=5FTHRESHOLD=20(#2?= =?UTF-8?q?6649)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration_adv.h | 19 ++++++++++--------- Marlin/src/feature/powerloss.cpp | 4 ++++ Marlin/src/feature/powerloss.h | 4 ++++ Marlin/src/gcode/feature/powerloss/M1000.cpp | 9 ++++++++- Marlin/src/gcode/feature/powerloss/M413.cpp | 14 +++++++++++++- Marlin/src/inc/Conditionals_adv.h | 5 +++++ Marlin/src/lcd/language/language_en.h | 1 + Marlin/src/lcd/menu/menu_configuration.cpp | 3 +++ Marlin/src/module/settings.cpp | 19 +++++++++++++++---- 9 files changed, 63 insertions(+), 15 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 3208364c3c2e..1d7c1a7277f3 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1743,19 +1743,20 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) - //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss - //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module. - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss - //#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor + #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) + //#define PLR_BED_THRESHOLD BED_MAXTEMP // (°C) Skip user confirmation at or above this bed temperature (0 to disable) + //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss + //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module. + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor //#define POWER_LOSS_PULLDOWN - //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume - //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, // especially with "vase mode" printing. Set too high and vases cannot be continued. - #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data // Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled! //#define POWER_LOSS_RECOVER_ZHOME diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 5a25710084b2..ce34b3a95cec 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -37,6 +37,10 @@ bool PrintJobRecovery::enabled; // Initialized by settings.load() +#if HAS_PLR_BED_THRESHOLD + celsius_t PrintJobRecovery::bed_temp_threshold; // Initialized by settings.load() +#endif + MediaFile PrintJobRecovery::file; job_recovery_info_t PrintJobRecovery::info; const char PrintJobRecovery::filename[5] = "/PLR"; diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index a69862b25957..1fdc42db26ad 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -175,6 +175,10 @@ class PrintJobRecovery { static void enable(const bool onoff); static void changed(); + #if HAS_PLR_BED_THRESHOLD + static celsius_t bed_temp_threshold; + #endif + static bool exists() { return card.jobRecoverFileExists(); } static void open(const bool read) { card.openJobRecoveryFile(read); } static void close() { file.close(); } diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index 1a1ebd517b3b..033bcf4ebbdc 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -28,6 +28,10 @@ #include "../../../feature/powerloss.h" #include "../../../module/motion.h" +#if HAS_PLR_BED_THRESHOLD + #include "../../../module/temperature.h" // for degBed +#endif + #include "../../../lcd/marlinui.h" #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" @@ -60,12 +64,15 @@ inline void plr_error(FSTR_P const prefix) { /** * M1000: Resume from power-loss (undocumented) * - With 'S' go to the Resume/Cancel menu + * ...unless the bed temperature is already above a configured minimum temperature. * - With no parameters, run recovery commands */ void GcodeSuite::M1000() { if (recovery.valid()) { - if (parser.seen_test('S')) { + const bool force_resume = TERN0(HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold && (thermalManager.degBed() >= recovery.bed_temp_threshold)); + + if (!force_resume && parser.seen_test('S')) { #if HAS_MARLINUI_MENU ui.goto_screen(menu_job_recovery); #elif HAS_DWIN_E3V2_BASIC diff --git a/Marlin/src/gcode/feature/powerloss/M413.cpp b/Marlin/src/gcode/feature/powerloss/M413.cpp index 5e508d4f28ae..8cbe468476b3 100644 --- a/Marlin/src/gcode/feature/powerloss/M413.cpp +++ b/Marlin/src/gcode/feature/powerloss/M413.cpp @@ -35,6 +35,9 @@ * Parameters * S[bool] - Flag to enable / disable. * If omitted, report current state. + * + * With PLR_BED_THRESHOLD: + * B Bed Temperature above which recovery will proceed without asking permission. */ void GcodeSuite::M413() { @@ -43,6 +46,11 @@ void GcodeSuite::M413() { else M413_report(); + #if HAS_PLR_BED_THRESHOLD + if (parser.seenval('B')) + recovery.bed_temp_threshold = parser.value_celsius(); + #endif + #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) if (parser.seen("RL")) recovery.load(); if (parser.seen_test('W')) recovery.save(true); @@ -57,7 +65,11 @@ void GcodeSuite::M413() { void GcodeSuite::M413_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, F(STR_POWER_LOSS_RECOVERY)); - SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled), " ; "); + SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled) + #if HAS_PLR_BED_THRESHOLD + , " B", recovery.bed_temp_threshold + #endif + ); serialprintln_onoff(recovery.enabled); } diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index d535553ca931..20b357c9e31e 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1355,3 +1355,8 @@ #if DISABLED(INCH_MODE_SUPPORT) #undef MANUAL_MOVE_DISTANCE_IN #endif + +// Power-Loss Recovery +#if ENABLED(POWER_LOSS_RECOVERY) && defined(PLR_BED_THRESHOLD) + #define HAS_PLR_BED_THRESHOLD 1 +#endif diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 97d8183f5200..553d9013a243 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -501,6 +501,7 @@ namespace LanguageNarrow_en { LSTR MSG_RESUME_PRINT = _UxGT("Resume Print"); LSTR MSG_STOP_PRINT = _UxGT("Stop Print"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Power Outage"); + LSTR MSG_RESUME_BED_TEMP = _UxGT("Resume Bed Temp"); LSTR MSG_HOST_START_PRINT = _UxGT("Host Start"); LSTR MSG_PRINTING_OBJECT = _UxGT("Print Obj"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Obj"); diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 3280b23e5b6b..44021ce35ad0 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -640,6 +640,9 @@ void menu_configuration() { #if ENABLED(POWER_LOSS_RECOVERY) EDIT_ITEM(bool, MSG_OUTAGE_RECOVERY, &recovery.enabled, recovery.changed); + #if HAS_PLR_BED_THRESHOLD + EDIT_ITEM(int3, MSG_RESUME_BED_TEMP, &recovery.bed_temp_threshold, 0, BED_MAX_TARGET); + #endif #endif // Preheat configurations diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index d3b1c580634b..a12728a00304 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -444,6 +444,7 @@ typedef struct SettingsDataStruct { // POWER_LOSS_RECOVERY // bool recovery_enabled; // M413 S + celsius_t bed_temp_threshold; // M413 B // // FWRETRACT @@ -1268,8 +1269,10 @@ void MarlinSettings::postprocess() { // { _FIELD_TEST(recovery_enabled); - const bool recovery_enabled = TERN(POWER_LOSS_RECOVERY, recovery.enabled, ENABLED(PLR_ENABLED_DEFAULT)); + const bool recovery_enabled = TERN0(POWER_LOSS_RECOVERY, recovery.enabled); + const celsius_t bed_temp_threshold = TERN0(HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold); EEPROM_WRITE(recovery_enabled); + EEPROM_WRITE(bed_temp_threshold); } // @@ -2310,10 +2313,15 @@ void MarlinSettings::postprocess() { // Power-Loss Recovery // { - bool recovery_enabled; _FIELD_TEST(recovery_enabled); + bool recovery_enabled; + celsius_t bed_temp_threshold; EEPROM_READ(recovery_enabled); - TERN_(POWER_LOSS_RECOVERY, if (!validating) recovery.enabled = recovery_enabled); + EEPROM_READ(bed_temp_threshold); + if (!validating) { + TERN_(POWER_LOSS_RECOVERY, recovery.enabled = recovery_enabled); + TERN_(HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold = bed_temp_threshold); + } } // @@ -3460,7 +3468,10 @@ void MarlinSettings::reset() { // // Power-Loss Recovery // - TERN_(POWER_LOSS_RECOVERY, recovery.enable(ENABLED(PLR_ENABLED_DEFAULT))); + #if ENABLED(POWER_LOSS_RECOVERY) + recovery.enable(ENABLED(PLR_ENABLED_DEFAULT)); + TERN_(HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold = PLR_BED_THRESHOLD); + #endif // // Firmware Retraction From 854f3315af645775e7b0aa39bd05db66187bcc38 Mon Sep 17 00:00:00 2001 From: plampix Date: Wed, 10 Jan 2024 07:33:54 +0100 Subject: [PATCH 104/236] =?UTF-8?q?=E2=9C=A8=20EDITABLE=5FSTEPS=5FPER=5FUN?= =?UTF-8?q?IT=20(#26618)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 7 +- Marlin/src/feature/encoder_i2c.cpp | 8 +- Marlin/src/gcode/config/M92.cpp | 7 + Marlin/src/gcode/gcode.cpp | 5 +- Marlin/src/gcode/gcode.h | 8 +- Marlin/src/inc/SanityCheck.h | 2 + Marlin/src/inc/Warnings.cpp | 7 + Marlin/src/lcd/e3v2/creality/dwin.cpp | 38 +- Marlin/src/lcd/e3v2/creality/dwin.h | 5 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 139 +++--- Marlin/src/lcd/e3v2/jyersui/dwin.h | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 44 +- Marlin/src/lcd/e3v2/proui/dwin.h | 4 +- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 56 ++- .../lcd/extui/dgus/DGUSScreenHandlerBase.h | 7 +- .../lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp | 16 +- .../lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp | 16 +- .../src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp | 18 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 62 +-- .../lcd/extui/dgus/mks/DGUSScreenHandler.h | 7 +- .../lcd/extui/dgus/origin/DGUSDisplayDef.cpp | 16 +- .../lcd/extui/dgus_e3s1pro/DGUSRxHandler.h | 13 +- .../lcd/extui/ia_creality/ia_creality_rts.cpp | 55 ++- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 42 +- .../lcd/extui/mks_ui/draw_motor_settings.cpp | 42 +- .../src/lcd/extui/mks_ui/draw_number_key.cpp | 455 ++++++++---------- .../lcd/extui/mks_ui/draw_step_settings.cpp | 4 +- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 4 +- Marlin/src/lcd/extui/mks_ui/draw_ui.h | 10 +- .../lcd/extui/mks_ui/tft_multi_language.cpp | 56 ++- Marlin/src/lcd/extui/ui_api.cpp | 20 +- Marlin/src/lcd/extui/ui_api.h | 6 +- Marlin/src/lcd/menu/menu_advanced.cpp | 53 +- Marlin/src/module/planner.cpp | 12 +- Marlin/src/module/planner.h | 43 +- Marlin/src/module/settings.cpp | 27 +- ini/features.ini | 1 + platformio.ini | 1 - 38 files changed, 711 insertions(+), 607 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index ad659f70e256..6e4afa16c6a5 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1231,11 +1231,16 @@ /** * Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°) - * Override with M92 + * Override with M92 (when enabled below) * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 } +/** + * Enable support for M92. Disable to save at least ~530 bytes of flash. + */ +#define EDITABLE_STEPS_PER_UNIT + /** * Default Max Feed Rate (linear=mm/s, rotational=°/s) * Override with M203 diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index 5a0564ee71d1..9a8e369c6a39 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -422,22 +422,22 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { travelledDistance = mm_from_count(ABS(stopCount - startCount)); SERIAL_ECHOLNPGM("Attempted travel: ", travelDistance, "mm"); - SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm"); + SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm"); - //Calculate new axis steps per unit + // Calculate new axis steps per unit old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis]; new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance; SERIAL_ECHOLNPGM("Old steps/mm: ", old_steps_mm); SERIAL_ECHOLNPGM("New steps/mm: ", new_steps_mm); - //Save new value + // Save new value planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm; if (iter > 1) { total += new_steps_mm; - // swap start and end points so next loop runs from current position + // Swap start and end points so next loop runs from current position const float tempCoord = startCoord[encoderAxis]; startCoord[encoderAxis] = endCoord[encoderAxis]; endCoord[encoderAxis] = tempCoord; diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 09153c51fd49..347de3bdea2d 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -20,6 +20,10 @@ * */ +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + #include "../gcode.h" #include "../../module/planner.h" @@ -37,6 +41,7 @@ * H - Specify micro-steps to use. Best guess if not supplied. * L - Desired layer height in current units. Nearest good heights are shown. */ + void GcodeSuite::M92() { const int8_t target_extruder = get_target_extruder_from_command(); @@ -127,3 +132,5 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/ UNUSED(e); #endif } + +#endif // EDITABLE_STEPS_PER_UNIT diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 86d73dd56fb4..1ff643dc2174 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -669,7 +669,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 87: M87(); break; // M87: Cancel Hotend Idle Timeout #endif - case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes + #endif + case 114: M114(); break; // M114: Report current position #if ENABLED(CAPABILITIES_REPORT) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 6be5dc642c81..7a72097141b7 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -128,7 +128,7 @@ * M84 - Disable steppers until next move, or use S to specify an idle * duration after which steppers should turn off. S0 disables the timeout. * M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default) - * M92 - Set planner.settings.axis_steps_per_mm for one or more axes. + * M92 - Set planner.settings.axis_steps_per_mm for one or more axes. (Requires EDITABLE_STEPS_PER_UNIT) * * M100 - Watch Free Memory (for debugging) (Requires M100_FREE_MEMORY_WATCHER) * @@ -719,8 +719,10 @@ class GcodeSuite { static void M87(); #endif - static void M92(); - static void M92_report(const bool forReplay=true, const int8_t e=-1); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + static void M92(); + static void M92_report(const bool forReplay=true, const int8_t e=-1); + #endif #if ENABLED(M100_FREE_MEMORY_WATCHER) static void M100(); diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a64c05c84033..bab6fa1d0193 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -458,6 +458,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #if ENABLED(I2C_POSITION_ENCODERS) #if !ALL(BABYSTEPPING, BABYSTEP_XY) #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY." + #elif DISABLED(EDITABLE_STEPS_PER_UNIT) + #error "EDITABLE_STEPS_PER_UNIT is required for I2C_POSITION_ENCODERS." #elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5) #error "I2CPE_ENCODER_CNT must be between 1 and 5." #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 669f3fce76fa..519bb7651a67 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -833,3 +833,10 @@ #if ALL(FT_MOTION, I2S_STEPPER_STREAM) #warning "FT_MOTION has not been tested with I2S_STEPPER_STREAM." #endif + +/** + * User doesn't have or disabled G92? + */ +#if DISABLED(EDITABLE_STEPS_PER_UNIT) + #warning "EDITABLE_STEPS_PER_UNIT is required to enable G92 runtime configuration of steps-per-unit." +#endif diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 6ba0184d71b7..ea6265b419a1 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1619,23 +1619,27 @@ void hmiMaxAccelerationXYZE() { #endif // CLASSIC_JERK -void hmiStepXYZE() { - EncoderState encoder_diffState = encoderReceiveAnalyze(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - if (applyEncoder(encoder_diffState, hmiValues.maxStepScaled)) { - checkkey = ID_Step; - encoderRate.enabled = false; +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + + void hmiStepXYZE() { + EncoderState encoder_diffState = encoderReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (applyEncoder(encoder_diffState, hmiValues.maxStepScaled)) { + checkkey = ID_Step; + encoderRate.enabled = false; + if (WITHIN(hmiFlag.step_axis, X_AXIS, LAST_AXIS)) + planner.settings.axis_steps_per_mm[hmiFlag.step_axis] = hmiValues.maxStepScaled / MINUNITMULT; + drawEditFloat3(select_step.now, hmiValues.maxStepScaled); + return; + } + // Step limit if (WITHIN(hmiFlag.step_axis, X_AXIS, LAST_AXIS)) - planner.settings.axis_steps_per_mm[hmiFlag.step_axis] = hmiValues.maxStepScaled / MINUNITMULT; - drawEditFloat3(select_step.now, hmiValues.maxStepScaled); - return; + LIMIT(hmiValues.maxStepScaled, min_steps_edit_values[hmiFlag.step_axis] * MINUNITMULT, max_steps_edit_values[hmiFlag.step_axis] * MINUNITMULT); + // Step value + drawEditFloat3(select_step.now, hmiValues.maxStepScaled, true); } - // Step limit - if (WITHIN(hmiFlag.step_axis, X_AXIS, LAST_AXIS)) - LIMIT(hmiValues.maxStepScaled, min_steps_edit_values[hmiFlag.step_axis] * MINUNITMULT, max_steps_edit_values[hmiFlag.step_axis] * MINUNITMULT); - // Step value - drawEditFloat3(select_step.now, hmiValues.maxStepScaled, true); -} + +#endif // EDITABLE_STEPS_PER_UNIT // Draw X, Y, Z and blink if in an un-homed or un-trusted state void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y, const bool blink, const bool force) { @@ -4279,7 +4283,9 @@ void dwinHandleScreen() { #if ENABLED(CLASSIC_JERK) case ID_MaxJerkValue: hmiMaxJerkXYZE(); break; #endif - case ID_StepValue: hmiStepXYZE(); break; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case ID_StepValue: hmiStepXYZE(); break; + #endif default: break; } } diff --git a/Marlin/src/lcd/e3v2/creality/dwin.h b/Marlin/src/lcd/e3v2/creality/dwin.h index 17a7a965ee39..461c57f11cfb 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.h +++ b/Marlin/src/lcd/e3v2/creality/dwin.h @@ -204,7 +204,10 @@ void hmiPrintSpeed(); void hmiMaxFeedspeedXYZE(); void hmiMaxAccelerationXYZE(); void hmiMaxJerkXYZE(); -void hmiStepXYZE(); +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + void hmiStepXYZE(); +#endif + void hmiSetLanguageCache(); void updateVariable(); diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 8d0482f41075..856229b0d845 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -2364,6 +2364,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra else drawMenu(ID_MaxAcceleration); break; + #if ENABLED(CLASSIC_JERK) case MOTION_JERK: if (draw) @@ -2372,12 +2373,16 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra drawMenu(ID_MaxJerk); break; #endif - case MOTION_STEPS: - if (draw) - drawMenuItem(row, ICON_Step, GET_TEXT_F(MSG_STEPS_PER_MM), nullptr, true); - else - drawMenu(ID_Steps); - break; + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case MOTION_STEPS: + if (draw) + drawMenuItem(row, ICON_Step, GET_TEXT_F(MSG_STEPS_PER_MM), nullptr, true); + else + drawMenu(ID_Steps); + break; + #endif + #if HAS_HOTEND case MOTION_FLOW: if (draw) { @@ -2388,6 +2393,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra modifyValue(planner.flow_percentage[0], MIN_FLOW_RATE, MAX_FLOW_RATE, 1, []{ planner.refresh_e_factor(0); }); break; #endif + #if ENABLED(LIN_ADVANCE) case MOTION_LA: if (draw) { @@ -2613,64 +2619,69 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra } break; #endif - case ID_Steps: - #define STEPS_BACK 0 - #define STEPS_X (STEPS_BACK + ENABLED(HAS_X_AXIS)) - #define STEPS_Y (STEPS_X + ENABLED(HAS_Y_AXIS)) - #define STEPS_Z (STEPS_Y + ENABLED(HAS_Z_AXIS)) - #define STEPS_E (STEPS_Z + ENABLED(HAS_HOTEND)) - #define STEPS_TOTAL STEPS_E + #if ENABLED(EDITABLE_STEPS_PER_UNIT) - switch (item) { - case STEPS_BACK: - if (draw) - drawMenuItem(row, ICON_Back, GET_TEXT_F(MSG_BACK)); - else - drawMenu(ID_Motion, MOTION_STEPS); - break; - #if HAS_X_AXIS - case STEPS_X: - if (draw) { - drawMenuItem(row, ICON_StepX, GET_TEXT_F(MSG_A_STEPS)); - drawFloat(planner.settings.axis_steps_per_mm[X_AXIS], row, false, STEPS_UNIT); - } - else - modifyValue(planner.settings.axis_steps_per_mm[X_AXIS], min_steps_edit_values.x, max_steps_edit_values.x, STEPS_UNIT); - break; - #endif - #if HAS_Y_AXIS - case STEPS_Y: - if (draw) { - drawMenuItem(row, ICON_StepY, GET_TEXT_F(MSG_B_STEPS)); - drawFloat(planner.settings.axis_steps_per_mm[Y_AXIS], row, false, STEPS_UNIT); - } - else - modifyValue(planner.settings.axis_steps_per_mm[Y_AXIS], min_steps_edit_values.y, max_steps_edit_values.y, STEPS_UNIT); - break; - #endif - #if HAS_Z_AXIS - case STEPS_Z: - if (draw) { - drawMenuItem(row, ICON_StepZ, GET_TEXT_F(MSG_C_STEPS)); - drawFloat(planner.settings.axis_steps_per_mm[Z_AXIS], row, false, STEPS_UNIT); - } - else - modifyValue(planner.settings.axis_steps_per_mm[Z_AXIS], min_steps_edit_values.z, max_steps_edit_values.z, STEPS_UNIT); - break; - #endif - #if HAS_HOTEND - case STEPS_E: - if (draw) { - drawMenuItem(row, ICON_StepE, GET_TEXT_F(MSG_E_STEPS)); - drawFloat(planner.settings.axis_steps_per_mm[E_AXIS], row, false, STEPS_UNIT); - } + case ID_Steps: + + #define STEPS_BACK 0 + #define STEPS_X (STEPS_BACK + ENABLED(HAS_X_AXIS)) + #define STEPS_Y (STEPS_X + ENABLED(HAS_Y_AXIS)) + #define STEPS_Z (STEPS_Y + ENABLED(HAS_Z_AXIS)) + #define STEPS_E (STEPS_Z + ENABLED(HAS_HOTEND)) + #define STEPS_TOTAL STEPS_E + + switch (item) { + case STEPS_BACK: + if (draw) + drawMenuItem(row, ICON_Back, GET_TEXT_F(MSG_BACK)); else - modifyValue(planner.settings.axis_steps_per_mm[E_AXIS], min_steps_edit_values.e, max_steps_edit_values.e, STEPS_UNIT); + drawMenu(ID_Motion, MOTION_STEPS); break; - #endif - } - break; + #if HAS_X_AXIS + case STEPS_X: + if (draw) { + drawMenuItem(row, ICON_StepX, GET_TEXT_F(MSG_A_STEPS)); + drawFloat(planner.settings.axis_steps_per_mm[X_AXIS], row, false, STEPS_UNIT); + } + else + modifyValue(planner.settings.axis_steps_per_mm[X_AXIS], min_steps_edit_values.x, max_steps_edit_values.x, STEPS_UNIT); + break; + #endif + #if HAS_Y_AXIS + case STEPS_Y: + if (draw) { + drawMenuItem(row, ICON_StepY, GET_TEXT_F(MSG_B_STEPS)); + drawFloat(planner.settings.axis_steps_per_mm[Y_AXIS], row, false, STEPS_UNIT); + } + else + modifyValue(planner.settings.axis_steps_per_mm[Y_AXIS], min_steps_edit_values.y, max_steps_edit_values.y, STEPS_UNIT); + break; + #endif + #if HAS_Z_AXIS + case STEPS_Z: + if (draw) { + drawMenuItem(row, ICON_StepZ, GET_TEXT_F(MSG_C_STEPS)); + drawFloat(planner.settings.axis_steps_per_mm[Z_AXIS], row, false, STEPS_UNIT); + } + else + modifyValue(planner.settings.axis_steps_per_mm[Z_AXIS], min_steps_edit_values.z, max_steps_edit_values.z, STEPS_UNIT); + break; + #endif + #if HAS_HOTEND + case STEPS_E: + if (draw) { + drawMenuItem(row, ICON_StepE, GET_TEXT_F(MSG_E_STEPS)); + drawFloat(planner.settings.axis_steps_per_mm[E_AXIS], row, false, STEPS_UNIT); + } + else + modifyValue(planner.settings.axis_steps_per_mm[E_AXIS], min_steps_edit_values.e, max_steps_edit_values.e, STEPS_UNIT); + break; + #endif + } + break; + + #endif // EDITABLE_STEPS_PER_UNIT case ID_Visual: @@ -4173,7 +4184,9 @@ FSTR_P JyersDWIN::getMenuTitle(const uint8_t menu) { #if ENABLED(CLASSIC_JERK) case ID_MaxJerk: return F("Max Jerk"); #endif - case ID_Steps: return GET_TEXT_F(MSG_STEPS_PER_MM); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case ID_Steps: return GET_TEXT_F(MSG_STEPS_PER_MM); + #endif case ID_Visual: return F("Visual Settings"); case ID_Advanced: return GET_TEXT_F(MSG_ADVANCED_SETTINGS); #if HAS_BED_PROBE @@ -4250,7 +4263,9 @@ uint8_t JyersDWIN::getMenuSize(const uint8_t menu) { #if ENABLED(CLASSIC_JERK) case ID_MaxJerk: return JERK_TOTAL; #endif - case ID_Steps: return STEPS_TOTAL; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case ID_Steps: return STEPS_TOTAL; + #endif case ID_Visual: return VISUAL_TOTAL; case ID_Advanced: return ADVANCED_TOTAL; #if HAS_BED_PROBE diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.h b/Marlin/src/lcd/e3v2/jyersui/dwin.h index 050a4cb39eae..97c5a85adaa6 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.h +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.h @@ -101,7 +101,7 @@ enum menuID : uint8_t { ID_MaxSpeed, ID_MaxAcceleration, ID_MaxJerk, - ID_Steps, + OPTITEM(EDITABLE_STEPS_PER_UNIT, ID_Steps) ID_Visual, ID_ColorSettings, ID_Advanced, diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index b42a9a263b8c..721859f1be7a 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -3528,7 +3528,9 @@ void drawMotionMenu() { #if ENABLED(ADAPTIVE_STEP_SMOOTHING) EDIT_ITEM(ICON_UBLActive, MSG_STEP_SMOOTHING, onDrawChkbMenu, setAdaptiveStepSmoothing, &hmiData.adaptiveStepSmoothing); #endif - MENU_ITEM(ICON_Step, MSG_STEPS_PER_MM, onDrawSteps, drawStepsMenu); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + MENU_ITEM(ICON_Step, MSG_STEPS_PER_MM, onDrawSteps, drawStepsMenu); + #endif EDIT_ITEM(ICON_Flow, MSG_FLOW, onDrawPIntMenu, setFlow, &planner.flow_percentage[0]); EDIT_ITEM(ICON_Speed, MSG_SPEED, onDrawPIntMenu, setSpeed, &feedrate_percentage); } @@ -3703,25 +3705,29 @@ void drawMaxAccelMenu() { #endif // CLASSIC_JERK -void drawStepsMenu() { - checkkey = ID_Menu; - if (SET_MENU_R(stepsMenu, selrect({1, 16, 28, 13}), MSG_STEPS_PER_MM, 5)) { - BACK_ITEM(drawMotionMenu); - #if HAS_X_AXIS - EDIT_ITEM(ICON_StepX, MSG_A_STEPS, onDrawStepsX, setStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]); - #endif - #if HAS_Y_AXIS - EDIT_ITEM(ICON_StepY, MSG_B_STEPS, onDrawStepsY, setStepsY, &planner.settings.axis_steps_per_mm[Y_AXIS]); - #endif - #if HAS_Z_AXIS - EDIT_ITEM(ICON_StepZ, MSG_C_STEPS, onDrawStepsZ, setStepsZ, &planner.settings.axis_steps_per_mm[Z_AXIS]); - #endif - #if HAS_HOTEND - EDIT_ITEM(ICON_StepE, MSG_E_STEPS, onDrawStepsE, setStepsE, &planner.settings.axis_steps_per_mm[E_AXIS]); - #endif +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + + void drawStepsMenu() { + checkkey = ID_Menu; + if (SET_MENU_R(stepsMenu, selrect({1, 16, 28, 13}), MSG_STEPS_PER_MM, 5)) { + BACK_ITEM(drawMotionMenu); + #if HAS_X_AXIS + EDIT_ITEM(ICON_StepX, MSG_A_STEPS, onDrawStepsX, setStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]); + #endif + #if HAS_Y_AXIS + EDIT_ITEM(ICON_StepY, MSG_B_STEPS, onDrawStepsY, setStepsY, &planner.settings.axis_steps_per_mm[Y_AXIS]); + #endif + #if HAS_Z_AXIS + EDIT_ITEM(ICON_StepZ, MSG_C_STEPS, onDrawStepsZ, setStepsZ, &planner.settings.axis_steps_per_mm[Z_AXIS]); + #endif + #if HAS_HOTEND + EDIT_ITEM(ICON_StepE, MSG_E_STEPS, onDrawStepsE, setStepsE, &planner.settings.axis_steps_per_mm[E_AXIS]); + #endif + } + updateMenu(stepsMenu); } - updateMenu(stepsMenu); -} + +#endif //============================================================================= // UI editable custom colors diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 675c087074ac..fe48822e4865 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -345,7 +345,9 @@ void drawMaxAccelMenu(); #if ENABLED(CLASSIC_JERK) void drawMaxJerkMenu(); #endif -void drawStepsMenu(); +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + void drawStepsMenu(); +#endif #if ANY(HAS_BED_PROBE, BABYSTEPPING) void drawZOffsetWizMenu(); #endif diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index dc2156a0e225..4403716fff65 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -469,36 +469,40 @@ void DGUSScreenHandler::handleSettings(DGUS_VP_Variable &var, void *val_ptr) { } } -void DGUSScreenHandler::handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) { - const uint16_t value_raw = BE16_P(val_ptr); - const float value = (float)value_raw / 10; - ExtUI::axis_t axis; - switch (var.VP) { - case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break; - case VP_Y_STEP_PER_MM: axis = ExtUI::axis_t::Y; break; - case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; - default: return; +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + + void DGUSScreenHandler::handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t value_raw = BE16_P(val_ptr); + const float value = (float)value_raw / 10; + ExtUI::axis_t axis; + switch (var.VP) { + case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break; + case VP_Y_STEP_PER_MM: axis = ExtUI::axis_t::Y; break; + case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; + default: return; + } + ExtUI::setAxisSteps_per_mm(value, axis); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } - ExtUI::setAxisSteps_per_mm(value, axis); - skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel -} -void DGUSScreenHandler::handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) { - const uint16_t value_raw = BE16_P(val_ptr); - const float value = (float)value_raw / 10; - ExtUI::extruder_t extruder; - switch (var.VP) { - default: return; - #if HAS_EXTRUDERS - case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; - #if HAS_MULTI_EXTRUDER - case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; + void DGUSScreenHandler::handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t value_raw = BE16_P(val_ptr); + const float value = (float)value_raw / 10; + ExtUI::extruder_t extruder; + switch (var.VP) { + default: return; + #if HAS_EXTRUDERS + case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; + #if HAS_MULTI_EXTRUDER + case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; + #endif #endif - #endif + } + ExtUI::setAxisSteps_per_mm(value, extruder); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } - ExtUI::setAxisSteps_per_mm(value, extruder); - skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel -} + +#endif // EDITABLE_STEPS_PER_UNIT #if HAS_PID_HEATING void DGUSScreenHandler::handlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr) { diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h b/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h index 163a095d0819..3764920be1d0 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h @@ -80,8 +80,11 @@ class DGUSScreenHandler { #endif // Hook for settings static void handleSettings(DGUS_VP_Variable &var, void *val_ptr); - static void handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); - static void handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + static void handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); + static void handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + #endif #if HAS_PID_HEATING // Hook for "Change this temperature PID para" diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp index 08d5387ceff3..243dbfbab6f2 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp @@ -431,13 +431,15 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, screen.sendPrintsTotalToDisplay), #endif - VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - #if HAS_EXTRUDERS - VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), - #if HAS_MULTI_EXTRUDER - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if HAS_EXTRUDERS + VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if HAS_MULTI_EXTRUDER + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #endif #endif #endif diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp index d99a4fe4f688..56d58a19b07f 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp @@ -424,13 +424,15 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, screen.sendPrintsTotalToDisplay), #endif - VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - #if HAS_HOTEND - VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), - #if HAS_MULTI_HOTEND - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if HAS_HOTEND + VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if HAS_MULTI_HOTEND + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #endif #endif #endif diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp index 2b5b6d956e2a..5878d145ea76 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -646,9 +646,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, screen.sendPrintsTotalToDisplay), #endif - VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<0>), - VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<0>), - VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<0>), + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<0>), + #endif VPHELPER(VP_X_MAX_SPEED, &planner.settings.max_feedrate_mm_s[X_AXIS], screen.handleMaxSpeedChange, screen.sendFloatAsIntValueToDisplay<0>), VPHELPER(VP_Y_MAX_SPEED, &planner.settings.max_feedrate_mm_s[Y_AXIS], screen.handleMaxSpeedChange, screen.sendFloatAsIntValueToDisplay<0>), @@ -742,10 +744,12 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_AutoTurnOffSw, nullptr, screen.getTurnOffCtrl, nullptr), - #if HAS_HOTEND - VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<0>), - #if HAS_MULTI_HOTEND - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<0>), + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + #if HAS_HOTEND + VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<0>), + #if HAS_MULTI_HOTEND + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<0>), + #endif #endif #endif diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 4c1995cebc24..4af271951d55 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -872,40 +872,44 @@ void DGUSScreenHandlerMKS::handleChangeLevelPoint(DGUS_VP_Variable &var, void *v skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } -void DGUSScreenHandlerMKS::handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) { - const uint16_t raw = BE16_P(val_ptr); - const float value = (float)raw; +#if ENABLED(EDITABLE_STEPS_PER_UNIT) - ExtUI::axis_t axis; - switch (var.VP) { - default: return; - case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break; - case VP_Y_STEP_PER_MM: axis = ExtUI::axis_t::Y; break; - case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; + void DGUSScreenHandlerMKS::handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t raw = BE16_P(val_ptr); + const float value = (float)raw; + + ExtUI::axis_t axis; + switch (var.VP) { + default: return; + case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break; + case VP_Y_STEP_PER_MM: axis = ExtUI::axis_t::Y; break; + case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; + } + ExtUI::setAxisSteps_per_mm(value, axis); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } - ExtUI::setAxisSteps_per_mm(value, axis); - settings.save(); - skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel -} -void DGUSScreenHandlerMKS::handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) { - const uint16_t raw = BE16_P(val_ptr); - const float value = (float)raw; + void DGUSScreenHandlerMKS::handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t raw = BE16_P(val_ptr); + const float value = (float)raw; - ExtUI::extruder_t extruder; - switch (var.VP) { - default: return; - #if HAS_HOTEND - case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; - #endif - #if HAS_MULTI_HOTEND - case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; - #endif + ExtUI::extruder_t extruder; + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; + #endif + #if HAS_MULTI_HOTEND + case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; + #endif + } + ExtUI::setAxisSteps_per_mm(value, extruder); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } - ExtUI::setAxisSteps_per_mm(value, extruder); - settings.save(); - skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel -} + +#endif // EDITABLE_STEPS_PER_UNIT void DGUSScreenHandlerMKS::handleMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr) { const uint16_t raw = BE16_P(val_ptr); diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h index 9527badb5a79..0e61080e67a4 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h @@ -63,8 +63,11 @@ class DGUSScreenHandlerMKS : public DGUSScreenHandler { static void lcdBLKAdjust(DGUS_VP_Variable &var, void *val_ptr); static void sdFileBack(DGUS_VP_Variable &var, void *val_ptr); - static void handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); - static void handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + static void handleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); + static void handleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + #endif + static void handleMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr); static void handleExtruderMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr); static void handleAccChange(DGUS_VP_Variable &var, void *val_ptr); diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp index d69041ebc5e0..8c82b63f3a41 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp @@ -232,13 +232,15 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, screen.sendPrintsTotalToDisplay), #endif - VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), - #if HAS_HOTEND - VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), - #if HAS_MULTI_HOTEND - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], screen.handleStepPerMMChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if HAS_HOTEND + VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #if HAS_MULTI_HOTEND + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], screen.handleStepPerMMExtruderChanged, screen.sendFloatAsIntValueToDisplay<1>), + #endif #endif #endif diff --git a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSRxHandler.h b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSRxHandler.h index 562edf950948..adbc1c628dca 100644 --- a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSRxHandler.h +++ b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSRxHandler.h @@ -51,11 +51,14 @@ namespace DGUSRxHandler { float maxJerk = dgus.fromFixedPoint(Endianness::fromBE_P(data)); ExtUI::setAxisMaxJerk_mm_s(maxJerk, axis); } - template - void stepsPerMM(DGUS_VP &vp, void *data) { - float stepsPerMm = dgus.fromFixedPoint(Endianness::fromBE_P(data)); - ExtUI::setAxisSteps_per_mm(stepsPerMm, axis); - } + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + template + void stepsPerMM(DGUS_VP &vp, void *data) { + float stepsPerMm = dgus.fromFixedPoint(Endianness::fromBE_P(data)); + ExtUI::setAxisSteps_per_mm(stepsPerMm, axis); + } + #endif #if ENABLED(PIDTEMP) template diff --git a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp index 01a2c4ebccdd..8ff9fd9f7144 100644 --- a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp @@ -654,12 +654,19 @@ void RTS::handleData() { switch (recdat.addr) { case Flowrate: - case StepMM_X ... StepMM_E: + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case StepMM_X ... StepMM_E: + #endif case ProbeOffset_X ... ProbeOffset_Y: case HotendPID_AutoTmp ... BedPID_AutoTmp: case HotendPID_P ... HotendPID_D: case BedPID_P ... BedPID_D: - case T2Offset_X ... T2StepMM_E: + #if ENABLED(DUAL_X_CARRIAGE) + case T2Offset_X ... T2Offset_Z + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case T2StepMM_E: + #endif + #endif case Accel_X ... Accel_E: case Feed_X ... Feed_E: case Jerk_X ... Jerk_E: @@ -940,25 +947,33 @@ void RTS::handleData() { tmp_float_handling = (float(recdat.data[0]) - 65536) / 100; else tmp_float_handling = float(recdat.data[0]) / 100; - if (recdat.addr == StepMM_X) { - setAxisSteps_per_mm(tmp_float_handling * 10, X); - } - else if (recdat.addr == StepMM_Y) { - setAxisSteps_per_mm(tmp_float_handling * 10, Y); - } - else if (recdat.addr == StepMM_Z) { - setAxisSteps_per_mm(tmp_float_handling * 10, Z); - } - else if (recdat.addr == StepMM_E) { - setAxisSteps_per_mm(tmp_float_handling * 10, E0); - #if DISABLED(DUAL_X_CARRIAGE) - setAxisSteps_per_mm(tmp_float_handling * 10, E1); - #endif - } - #if ENABLED(DUAL_X_CARRIAGE) - else if (recdat.addr == T2StepMM_E) { - setAxisSteps_per_mm(tmp_float_handling * 10, E1); + + if (false) {} + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + else if (recdat.addr == StepMM_X) { + setAxisSteps_per_mm(tmp_float_handling * 10, X); + } + else if (recdat.addr == StepMM_Y) { + setAxisSteps_per_mm(tmp_float_handling * 10, Y); + } + else if (recdat.addr == StepMM_Z) { + setAxisSteps_per_mm(tmp_float_handling * 10, Z); + } + else if (recdat.addr == StepMM_E) { + setAxisSteps_per_mm(tmp_float_handling * 10, E0); + #if DISABLED(DUAL_X_CARRIAGE) + setAxisSteps_per_mm(tmp_float_handling * 10, E1); + #endif } + #endif // EDITABLE_STEPS_PER_UNIT + + #if ENABLED(DUAL_X_CARRIAGE) + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + else if (recdat.addr == T2StepMM_E) { + setAxisSteps_per_mm(tmp_float_handling * 10, E1); + } + #endif else if (recdat.addr == T2Offset_X) { setNozzleOffset_mm(tmp_float_handling * 10, X, E1); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index f0609f4ebbf7..1f703f365291 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -380,6 +380,7 @@ void lv_draw_dialog(uint8_t type) { lv_label_set_text(labelDialog, DIALOG_UPDATE_NO_DEVICE_EN); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } + #if ENABLED(MKS_WIFI_MODULE) else if (DIALOG_IS(TYPE_UPLOAD_FILE)) { if (upload_result == 1) { @@ -391,28 +392,12 @@ void lv_draw_dialog(uint8_t type) { lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } else if (upload_result == 3) { - char buf[200]; - int _index = 0; - - strcpy_P(buf, PSTR(DIALOG_UPLOAD_FINISH_EN)); - _index = strlen(buf); - buf[_index++] = '\n'; - strcat_P(buf, PSTR(DIALOG_UPLOAD_SIZE_EN)); - - _index = strlen(buf); - buf[_index++] = ':'; - sprintf_P(&buf[_index], PSTR(" %d KBytes\n"), (int)(upload_size / 1024)); - - strcat_P(buf, PSTR(DIALOG_UPLOAD_TIME_EN)); - _index = strlen(buf); - buf[_index++] = ':'; - sprintf_P(&buf[_index], PSTR(" %d s\n"), (int)upload_time_sec); - - strcat_P(buf, PSTR(DIALOG_UPLOAD_SPEED_EN)); - _index = strlen(buf); - buf[_index++] = ':'; - sprintf_P(&buf[_index], PSTR(" %d KBytes/s\n"), (int)(upload_size / upload_time_sec / 1024)); - + MString<200> buf( + F(DIALOG_UPLOAD_FINISH_EN), '\n', + F(DIALOG_UPLOAD_SIZE_EN), F(": "), int(upload_size / 1024), F(" KBytes\n"), + F(DIALOG_UPLOAD_TIME_EN), F(": "), int(upload_time_sec), F(" s\n"), + F(DIALOG_UPLOAD_SPEED_EN), F(": "), int(upload_size / upload_time_sec / 1024), F(" KBytes/s\n"), + ); lv_label_set_text(labelDialog, buf); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } @@ -422,6 +407,7 @@ void lv_draw_dialog(uint8_t type) { lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } #endif // MKS_WIFI_MODULE + else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT)) { lv_label_set_text(labelDialog, filament_menu.filament_dialog_load_heat); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); @@ -491,7 +477,11 @@ void filament_dialog_handle() { planner.synchronize(); uiCfg.filament_loading_time_flg = true; uiCfg.filament_loading_time_cnt = 0; - sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); + #if HAS_TOOLCHANGE + sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); + #else + sprintf_P(public_buf_m, PSTR("G91\nG1 E%d F%d\nG90"), gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); + #endif queue.inject(public_buf_m); } if (uiCfg.filament_heat_completed_unload) { @@ -501,7 +491,11 @@ void filament_dialog_handle() { planner.synchronize(); uiCfg.filament_unloading_time_flg = true; uiCfg.filament_unloading_time_cnt = 0; - sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E-%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); + #if HAS_TOOLCHANGE + sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E-%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); + #else + sprintf_P(public_buf_m, PSTR("G91\nG1 E-%d F%d\nG90"), gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); + #endif queue.inject(public_buf_m); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp index df17ac7687b9..08e2dd876331 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp @@ -34,7 +34,7 @@ static lv_obj_t *scr; enum { ID_MOTOR_RETURN = 1, - ID_MOTOR_STEPS, + OPTITEM(EDITABLE_STEPS_PER_UNIT, ID_MOTOR_STEPS) ID_MOTOR_TMC_CURRENT, ID_MOTOR_STEP_MODE, ID_HOME_SENSE @@ -44,26 +44,20 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; lv_clear_motor_settings(); switch (obj->mks_obj_id) { - case ID_MOTOR_RETURN: - draw_return_ui(); - break; - case ID_MOTOR_STEPS: - lv_draw_step_settings(); - break; + case ID_MOTOR_RETURN: draw_return_ui(); break; + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case ID_MOTOR_STEPS: lv_draw_step_settings(); break; + #endif + #if USE_SENSORLESS - case ID_HOME_SENSE: - lv_draw_homing_sensitivity_settings(); - break; + case ID_HOME_SENSE: lv_draw_homing_sensitivity_settings(); break; #endif #if HAS_TRINAMIC_CONFIG - case ID_MOTOR_TMC_CURRENT: - lv_draw_tmc_current_settings(); - break; + case ID_MOTOR_TMC_CURRENT: lv_draw_tmc_current_settings(); break; #if HAS_STEALTHCHOP - case ID_MOTOR_STEP_MODE: - lv_draw_tmc_step_mode_settings(); - break; + case ID_MOTOR_STEP_MODE: lv_draw_tmc_step_mode_settings(); break; #endif #endif } @@ -73,17 +67,19 @@ void lv_draw_motor_settings() { int index = 0; scr = lv_screen_create(MOTOR_SETTINGS_UI, machine_menu.MotorConfTitle); - lv_screen_menu_item(scr, machine_menu.StepsConf, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_MOTOR_STEPS, index++); + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + lv_screen_menu_item(scr, machine_menu.StepsConf, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_MOTOR_STEPS, index++); + #endif + #if USE_SENSORLESS - lv_screen_menu_item(scr, machine_menu.HomingSensitivityConf, PARA_UI_POS_X, PARA_UI_POS_Y * (index + 1), event_handler, ID_HOME_SENSE, index); - index++; + lv_screen_menu_item(scr, machine_menu.HomingSensitivityConf, PARA_UI_POS_X, PARA_UI_POS_Y * (index + 1), event_handler, ID_HOME_SENSE, index++); #endif + #if HAS_TRINAMIC_CONFIG - lv_screen_menu_item(scr, machine_menu.TMCcurrentConf, PARA_UI_POS_X, PARA_UI_POS_Y * (index + 1), event_handler, ID_MOTOR_TMC_CURRENT, index); - index++; + lv_screen_menu_item(scr, machine_menu.TMCcurrentConf, PARA_UI_POS_X, PARA_UI_POS_Y * (index + 1), event_handler, ID_MOTOR_TMC_CURRENT, index++); #if HAS_STEALTHCHOP - lv_screen_menu_item(scr, machine_menu.TMCStepModeConf, PARA_UI_POS_X, PARA_UI_POS_Y * (index + 1), event_handler, ID_MOTOR_STEP_MODE, index); - index++; + lv_screen_menu_item(scr, machine_menu.TMCStepModeConf, PARA_UI_POS_X, PARA_UI_POS_Y * (index + 1), event_handler, ID_MOTOR_STEP_MODE, index++); #endif #endif lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACK_POS_X + 10, PARA_UI_BACK_POS_Y, event_handler, ID_MOTOR_RETURN, true); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp index c39678ed0f88..b1444fae11c4 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp @@ -56,15 +56,9 @@ static bool point_flag = true; enum { ID_NUM_KEY1 = 1, - ID_NUM_KEY2, - ID_NUM_KEY3, - ID_NUM_KEY4, - ID_NUM_KEY5, - ID_NUM_KEY6, - ID_NUM_KEY7, - ID_NUM_KEY8, - ID_NUM_KEY9, - ID_NUM_KEY0, + ID_NUM_KEY2, ID_NUM_KEY3, ID_NUM_KEY4, + ID_NUM_KEY5, ID_NUM_KEY6, ID_NUM_KEY7, + ID_NUM_KEY8, ID_NUM_KEY9, ID_NUM_KEY0, ID_NUM_BACK, ID_NUM_RESET, ID_NUM_CONFIRM, @@ -86,201 +80,136 @@ static void disp_key_value() { case TravelAcceleration: dtostrf(planner.settings.travel_acceleration, 1, 1, public_buf_m); break; - case XAcceleration: - itoa(planner.settings.max_acceleration_mm_per_s2[X_AXIS], public_buf_m, 10); - break; - case YAcceleration: - itoa(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], public_buf_m, 10); - break; - case ZAcceleration: - itoa(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], public_buf_m, 10); - break; - case E0Acceleration: - itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS], public_buf_m, 10); - break; - case E1Acceleration: - itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], public_buf_m, 10); - break; - case XMaxFeedRate: - dtostrf(planner.settings.max_feedrate_mm_s[X_AXIS], 1, 1, public_buf_m); - break; - case YMaxFeedRate: - dtostrf(planner.settings.max_feedrate_mm_s[Y_AXIS], 1, 1, public_buf_m); - break; - case ZMaxFeedRate: - dtostrf(planner.settings.max_feedrate_mm_s[Z_AXIS], 1, 1, public_buf_m); - break; - case E0MaxFeedRate: - dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS], 1, 1, public_buf_m); - break; - case E1MaxFeedRate: - dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], 1, 1, public_buf_m); - break; - case XJerk: - #if ENABLED(CLASSIC_JERK) - dtostrf(planner.max_jerk.x, 1, 1, public_buf_m); + #if HAS_X_AXIS + case XAcceleration: itoa(planner.settings.max_acceleration_mm_per_s2[X_AXIS], public_buf_m, 10); break; + #endif + #if HAS_Y_AXIS + case YAcceleration: itoa(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], public_buf_m, 10); break; + #endif + #if HAS_Z_AXIS + case ZAcceleration: itoa(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], public_buf_m, 10); break; + #endif + #if HAS_EXTRUDERS + case E0Acceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS], public_buf_m, 10); + break; + #if HAS_MULTI_EXTRUDER + case E1Acceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], public_buf_m, 10); + break; #endif - break; - case YJerk: - #if ENABLED(CLASSIC_JERK) - dtostrf(planner.max_jerk.y, 1, 1, public_buf_m); + #endif + + #if HAS_X_AXIS + case XMaxFeedRate: dtostrf(planner.settings.max_feedrate_mm_s[X_AXIS], 1, 1, public_buf_m); break; + #endif + #if HAS_Y_AXIS + case YMaxFeedRate: dtostrf(planner.settings.max_feedrate_mm_s[Y_AXIS], 1, 1, public_buf_m); break; + #endif + #if HAS_Z_AXIS + case ZMaxFeedRate: dtostrf(planner.settings.max_feedrate_mm_s[Z_AXIS], 1, 1, public_buf_m); break; + #endif + #if HAS_EXTRUDERS + case E0MaxFeedRate: dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS], 1, 1, public_buf_m); break; + #if HAS_MULTI_EXTRUDER + case E1MaxFeedRate: dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], 1, 1, public_buf_m); break; #endif - break; - case ZJerk: - #if ENABLED(CLASSIC_JERK) - dtostrf(planner.max_jerk.z, 1, 1, public_buf_m); + #endif + + #if ENABLED(CLASSIC_JERK) + #if HAS_X_AXIS + case XJerk: dtostrf(planner.max_jerk.x, 1, 1, public_buf_m); break; #endif - break; - case EJerk: - #if ENABLED(CLASSIC_JERK) - dtostrf(planner.max_jerk.e, 1, 1, public_buf_m); + #if HAS_Y_AXIS + case YJerk: dtostrf(planner.max_jerk.y, 1, 1, public_buf_m); break; #endif - break; - - case Xstep: - dtostrf(planner.settings.axis_steps_per_mm[X_AXIS], 1, 1, public_buf_m); - break; - case Ystep: - dtostrf(planner.settings.axis_steps_per_mm[Y_AXIS], 1, 1, public_buf_m); - - break; - case Zstep: - dtostrf(planner.settings.axis_steps_per_mm[Z_AXIS], 1, 1, public_buf_m); - - break; - case E0step: - dtostrf(planner.settings.axis_steps_per_mm[E_AXIS], 1, 1, public_buf_m); - - break; - case E1step: - dtostrf(planner.settings.axis_steps_per_mm[E_AXIS_N(1)], 1, 1, public_buf_m); - break; - - case Xcurrent: - #if AXIS_IS_TMC(X) - milliamps = stepperX.getMilliamps(); - dtostrf(milliamps, 1, 1, public_buf_m); + #if HAS_Z_AXIS + case ZJerk: dtostrf(planner.max_jerk.z, 1, 1, public_buf_m); break; #endif - break; - - case Ycurrent: - #if AXIS_IS_TMC(Y) - milliamps = stepperY.getMilliamps(); - dtostrf(milliamps, 1, 1, public_buf_m); + #if HAS_EXTRUDERS + case EJerk: dtostrf(planner.max_jerk.e, 1, 1, public_buf_m); break; #endif - break; + #endif - case Zcurrent: - #if AXIS_IS_TMC(Z) - milliamps = stepperZ.getMilliamps(); - dtostrf(milliamps, 1, 1, public_buf_m); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + #if HAS_X_AXIS + case Xstep: dtostrf(planner.settings.axis_steps_per_mm[X_AXIS], 1, 1, public_buf_m); break; #endif - break; - - case E0current: - #if AXIS_IS_TMC(E0) - milliamps = stepperE0.getMilliamps(); - dtostrf(milliamps, 1, 1, public_buf_m); + #if HAS_Y_AXIS + case Ystep: dtostrf(planner.settings.axis_steps_per_mm[Y_AXIS], 1, 1, public_buf_m); break; #endif - break; - - case E1current: - #if AXIS_IS_TMC(E1) - milliamps = stepperE1.getMilliamps(); - dtostrf(milliamps, 1, 1, public_buf_m); + #if HAS_Z_AXIS + case Zstep: dtostrf(planner.settings.axis_steps_per_mm[Z_AXIS], 1, 1, public_buf_m); break; #endif - break; - - case pause_pos_x: - dtostrf(gCfgItems.pausePosX, 1, 1, public_buf_m); - break; - case pause_pos_y: - dtostrf(gCfgItems.pausePosY, 1, 1, public_buf_m); - break; - case pause_pos_z: - dtostrf(gCfgItems.pausePosZ, 1, 1, public_buf_m); - break; - case level_pos_x1: - itoa(gCfgItems.trammingPos[0].x, public_buf_m, 10); - break; - case level_pos_y1: - itoa(gCfgItems.trammingPos[0].y, public_buf_m, 10); - break; - case level_pos_x2: - itoa(gCfgItems.trammingPos[1].x, public_buf_m, 10); - break; - case level_pos_y2: - itoa(gCfgItems.trammingPos[1].y, public_buf_m, 10); - break; - case level_pos_x3: - itoa(gCfgItems.trammingPos[2].x, public_buf_m, 10); - break; - case level_pos_y3: - itoa(gCfgItems.trammingPos[2].y, public_buf_m, 10); - break; - case level_pos_x4: - itoa(gCfgItems.trammingPos[3].x, public_buf_m, 10); - break; - case level_pos_y4: - itoa(gCfgItems.trammingPos[3].y, public_buf_m, 10); - break; - case level_pos_x5: - itoa(gCfgItems.trammingPos[4].x, public_buf_m, 10); - break; - case level_pos_y5: - itoa(gCfgItems.trammingPos[4].y, public_buf_m, 10); - break; - #if HAS_BED_PROBE - case x_offset: - #if HAS_PROBE_XY_OFFSET - dtostrf(probe.offset.x, 1, 3, public_buf_m); - #endif - break; - case y_offset: - #if HAS_PROBE_XY_OFFSET - dtostrf(probe.offset.y, 1, 3, public_buf_m); + #if HAS_EXTRUDERS + case E0step: dtostrf(planner.settings.axis_steps_per_mm[E_AXIS], 1, 1, public_buf_m); break; + #if HAS_MULTI_EXTRUDER + case E1step: dtostrf(planner.settings.axis_steps_per_mm[E_AXIS_N(1)], 1, 1, public_buf_m); break; #endif - break; - case z_offset: - dtostrf(probe.offset.z, 1, 3, public_buf_m); - break; - #endif - case load_length: - itoa(gCfgItems.filamentchange_load_length, public_buf_m, 10); - break; - case load_speed: - itoa(gCfgItems.filamentchange_load_speed, public_buf_m, 10); - break; - case unload_length: - itoa(gCfgItems.filamentchange_unload_length, public_buf_m, 10); - break; - case unload_speed: - itoa(gCfgItems.filamentchange_unload_speed, public_buf_m, 10); - break; - case filament_temp: - itoa(gCfgItems.filament_limit_temp, public_buf_m, 10); - break; - case x_sensitivity: - #if X_SENSORLESS - itoa(TERN(X_SENSORLESS, stepperX.homing_threshold(), 0), public_buf_m, 10); #endif - break; - case y_sensitivity: - #if Y_SENSORLESS - itoa(TERN(Y_SENSORLESS, stepperY.homing_threshold(), 0), public_buf_m, 10); - #endif - break; - case z_sensitivity: - #if Z_SENSORLESS - itoa(TERN(Z_SENSORLESS, stepperZ.homing_threshold(), 0), public_buf_m, 10); + #endif + + #if AXIS_IS_TMC(X) + case Xcurrent: dtostrf(stepperX.getMilliamps(), 1, 1, public_buf_m); break; + #endif + #if AXIS_IS_TMC(Y) + case Ycurrent: dtostrf(stepperY.getMilliamps(), 1, 1, public_buf_m); break; + #endif + #if AXIS_IS_TMC(Z) + case Zcurrent: dtostrf(stepperZ.getMilliamps(), 1, 1, public_buf_m); break; + #endif + #if AXIS_IS_TMC(E0) + case E0current: dtostrf(stepperE0.getMilliamps(), 1, 1, public_buf_m); break; + #endif + #if AXIS_IS_TMC(E1) + case E1current: dtostrf(stepperE1.getMilliamps(), 1, 1, public_buf_m); break; + #endif + + case pause_pos_x: dtostrf(gCfgItems.pausePosX, 1, 1, public_buf_m); break; + case pause_pos_y: dtostrf(gCfgItems.pausePosY, 1, 1, public_buf_m); break; + case pause_pos_z: dtostrf(gCfgItems.pausePosZ, 1, 1, public_buf_m); break; + + case level_pos_x1: itoa(gCfgItems.trammingPos[0].x, public_buf_m, 10); break; + case level_pos_y1: itoa(gCfgItems.trammingPos[0].y, public_buf_m, 10); break; + case level_pos_x2: itoa(gCfgItems.trammingPos[1].x, public_buf_m, 10); break; + case level_pos_y2: itoa(gCfgItems.trammingPos[1].y, public_buf_m, 10); break; + case level_pos_x3: itoa(gCfgItems.trammingPos[2].x, public_buf_m, 10); break; + case level_pos_y3: itoa(gCfgItems.trammingPos[2].y, public_buf_m, 10); break; + case level_pos_x4: itoa(gCfgItems.trammingPos[3].x, public_buf_m, 10); break; + case level_pos_y4: itoa(gCfgItems.trammingPos[3].y, public_buf_m, 10); break; + case level_pos_x5: itoa(gCfgItems.trammingPos[4].x, public_buf_m, 10); break; + case level_pos_y5: itoa(gCfgItems.trammingPos[4].y, public_buf_m, 10); break; + + #if HAS_BED_PROBE + #if HAS_PROBE_XY_OFFSET + case x_offset: dtostrf(probe.offset.x, 1, 3, public_buf_m); break; #endif - break; - case z2_sensitivity: - #if Z2_SENSORLESS - itoa(TERN(Z2_SENSORLESS, stepperZ2.homing_threshold(), 0), public_buf_m, 10); + #if HAS_PROBE_XY_OFFSET + case y_offset: dtostrf(probe.offset.y, 1, 3, public_buf_m); break; #endif - break; + case z_offset: dtostrf(probe.offset.z, 1, 3, public_buf_m); break; + #endif + + // TODO: Use built-in filament change instead of the MKS UI implementation + case load_length: itoa(gCfgItems.filamentchange_load_length, public_buf_m, 10); break; + case load_speed: itoa(gCfgItems.filamentchange_load_speed, public_buf_m, 10); break; + case unload_length: itoa(gCfgItems.filamentchange_unload_length, public_buf_m, 10); break; + case unload_speed: itoa(gCfgItems.filamentchange_unload_speed, public_buf_m, 10); break; + case filament_temp: itoa(gCfgItems.filament_limit_temp, public_buf_m, 10); break; + + #if X_SENSORLESS + case x_sensitivity: itoa(TERN(X_SENSORLESS, stepperX.homing_threshold(), 0), public_buf_m, 10); break; + #endif + #if Y_SENSORLESS + case y_sensitivity: itoa(TERN(Y_SENSORLESS, stepperY.homing_threshold(), 0), public_buf_m, 10); break; + #endif + #if Z_SENSORLESS + case z_sensitivity: itoa(TERN(Z_SENSORLESS, stepperZ.homing_threshold(), 0), public_buf_m, 10); break; + #endif + #if Z2_SENSORLESS + case z2_sensitivity: itoa(TERN(Z2_SENSORLESS, stepperZ2.homing_threshold(), 0), public_buf_m, 10); break; + #endif } strcpy(key_value, public_buf_m); @@ -297,53 +226,74 @@ static void set_value_confirm() { case PrintAcceleration: planner.settings.acceleration = atof(key_value); break; case RetractAcceleration: planner.settings.retract_acceleration = atof(key_value); break; case TravelAcceleration: planner.settings.travel_acceleration = atof(key_value); break; - case XAcceleration: planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value); break; - case YAcceleration: planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = atof(key_value); break; - case ZAcceleration: planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = atof(key_value); break; - case E0Acceleration: planner.settings.max_acceleration_mm_per_s2[E_AXIS] = atof(key_value); break; - case E1Acceleration: planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)] = atof(key_value); break; - case XMaxFeedRate: planner.settings.max_feedrate_mm_s[X_AXIS] = atof(key_value); break; - case YMaxFeedRate: planner.settings.max_feedrate_mm_s[Y_AXIS] = atof(key_value); break; - case ZMaxFeedRate: planner.settings.max_feedrate_mm_s[Z_AXIS] = atof(key_value); break; - case E0MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS] = atof(key_value); break; - case E1MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); break; - case XJerk: TERN_(CLASSIC_JERK, planner.max_jerk.x = atof(key_value)); break; - case YJerk: TERN_(CLASSIC_JERK, planner.max_jerk.y = atof(key_value)); break; - case ZJerk: TERN_(CLASSIC_JERK, planner.max_jerk.z = atof(key_value)); break; - case EJerk: TERN_(CLASSIC_JERK, planner.max_jerk.e = atof(key_value)); break; - case Xstep: planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); planner.refresh_positioning(); break; - case Ystep: planner.settings.axis_steps_per_mm[Y_AXIS] = atof(key_value); planner.refresh_positioning(); break; - case Zstep: planner.settings.axis_steps_per_mm[Z_AXIS] = atof(key_value); planner.refresh_positioning(); break; - case E0step: planner.settings.axis_steps_per_mm[E_AXIS] = atof(key_value); planner.refresh_positioning(); break; - case E1step: planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value); planner.refresh_positioning(); break; - case Xcurrent: - #if AXIS_IS_TMC(X) - stepperX.rms_current(atoi(key_value)); - #endif - break; - case Ycurrent: - #if AXIS_IS_TMC(Y) - stepperY.rms_current(atoi(key_value)); - #endif - break; - case Zcurrent: - #if AXIS_IS_TMC(Z) - stepperZ.rms_current(atoi(key_value)); - #endif - break; - case E0current: - #if AXIS_IS_TMC(E0) - stepperE0.rms_current(atoi(key_value)); - #endif - break; - case E1current: - #if AXIS_IS_TMC(E1) - stepperE1.rms_current(atoi(key_value)); + + #if HAS_X_AXIS + case XAcceleration: planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value); break; + #endif + #if HAS_Y_AXIS + case YAcceleration: planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = atof(key_value); break; + #endif + #if HAS_Z_AXIS + case ZAcceleration: planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = atof(key_value); break; + #endif + #if HAS_EXTRUDERS + case E0Acceleration: planner.settings.max_acceleration_mm_per_s2[E_AXIS] = atof(key_value); break; + #if HAS_MULTI_EXTRUDER + case E1Acceleration: planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)] = atof(key_value); break; #endif - break; + #endif + + #if HAS_X_AXIS + case XMaxFeedRate: planner.settings.max_feedrate_mm_s[X_AXIS] = atof(key_value); break; + #endif + #if HAS_Y_AXIS + case YMaxFeedRate: planner.settings.max_feedrate_mm_s[Y_AXIS] = atof(key_value); break; + #endif + #if HAS_Z_AXIS + case ZMaxFeedRate: planner.settings.max_feedrate_mm_s[Z_AXIS] = atof(key_value); break; + #endif + #if HAS_E0_AXIS + case E0MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS] = atof(key_value); break; + #endif + #if HAS_E1_AXIS + case E1MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); break; + #endif + + #if ENABLED(CLASSIC_JERK) + case XJerk: planner.max_jerk.x = atof(key_value); break; + case YJerk: planner.max_jerk.y = atof(key_value); break; + case ZJerk: planner.max_jerk.z = atof(key_value); break; + case EJerk: planner.max_jerk.e = atof(key_value); break; + #endif + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case Xstep: planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case Ystep: planner.settings.axis_steps_per_mm[Y_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case Zstep: planner.settings.axis_steps_per_mm[Z_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case E0step: planner.settings.axis_steps_per_mm[E_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case E1step: planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value); planner.refresh_positioning(); break; + #endif + + #if AXIS_IS_TMC(X) + case Xcurrent: stepperX.rms_current(atoi(key_value)); break; + #endif + #if AXIS_IS_TMC(Y) + case Ycurrent: stepperY.rms_current(atoi(key_value)); break; + #endif + #if AXIS_IS_TMC(Z) + case Zcurrent: stepperZ.rms_current(atoi(key_value)); break; + #endif + #if AXIS_IS_TMC(E0) + case E0current: stepperE0.rms_current(atoi(key_value)); break; + #endif + #if AXIS_IS_TMC(E1) + case E1current: stepperE1.rms_current(atoi(key_value)); break; + #endif + case pause_pos_x: gCfgItems.pausePosX = atof(key_value); update_spi_flash(); break; case pause_pos_y: gCfgItems.pausePosY = atof(key_value); update_spi_flash(); break; case pause_pos_z: gCfgItems.pausePosZ = atof(key_value); update_spi_flash(); break; + case level_pos_x1: gCfgItems.trammingPos[0].x = atoi(key_value); update_spi_flash(); break; case level_pos_y1: gCfgItems.trammingPos[0].y = atoi(key_value); update_spi_flash(); break; case level_pos_x2: gCfgItems.trammingPos[1].x = atoi(key_value); update_spi_flash(); break; @@ -354,51 +304,51 @@ static void set_value_confirm() { case level_pos_y4: gCfgItems.trammingPos[3].y = atoi(key_value); update_spi_flash(); break; case level_pos_x5: gCfgItems.trammingPos[4].x = atoi(key_value); update_spi_flash(); break; case level_pos_y5: gCfgItems.trammingPos[4].y = atoi(key_value); update_spi_flash(); break; + #if HAS_BED_PROBE - case x_offset: { - #if HAS_PROBE_XY_OFFSET + #if HAS_PROBE_XY_OFFSET + case x_offset: { const float x = atof(key_value); - if (WITHIN(x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX)) - probe.offset.x = x; - #endif - } break; - case y_offset: { - #if HAS_PROBE_XY_OFFSET + if (WITHIN(x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX)) probe.offset.x = x; + } break; + #endif + #if HAS_PROBE_XY_OFFSET + case y_offset: { const float y = atof(key_value); - if (WITHIN(y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX)) - probe.offset.y = y; - #endif - } break; + if (WITHIN(y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX)) probe.offset.y = y; + } break; + #endif case z_offset: { const float z = atof(key_value); - if (WITHIN(z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) - probe.offset.z = z; + if (WITHIN(z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) probe.offset.z = z; } break; #endif + case load_length: gCfgItems.filamentchange_load_length = atoi(key_value); - uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length*60.0/gCfgItems.filamentchange_load_speed)+0.5); + uiCfg.filament_loading_time = uint32_t((gCfgItems.filamentchange_load_length * 60.0f / gCfgItems.filamentchange_load_speed) + 0.5f); update_spi_flash(); break; case load_speed: gCfgItems.filamentchange_load_speed = atoi(key_value); - uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length*60.0/gCfgItems.filamentchange_load_speed)+0.5); + uiCfg.filament_loading_time = uint32_t((gCfgItems.filamentchange_load_length * 60.0f / gCfgItems.filamentchange_load_speed) + 0.5f); update_spi_flash(); break; case unload_length: gCfgItems.filamentchange_unload_length = atoi(key_value); - uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length*60.0/gCfgItems.filamentchange_unload_speed)+0.5); + uiCfg.filament_unloading_time = uint32_t((gCfgItems.filamentchange_unload_length * 60.0f / gCfgItems.filamentchange_unload_speed) + 0.5f); update_spi_flash(); break; case unload_speed: gCfgItems.filamentchange_unload_speed = atoi(key_value); - uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length*60.0/gCfgItems.filamentchange_unload_speed)+0.5); + uiCfg.filament_unloading_time = uint32_t((gCfgItems.filamentchange_unload_length * 60.0f / gCfgItems.filamentchange_unload_speed) + 0.5f); update_spi_flash(); break; case filament_temp: gCfgItems.filament_limit_temp = atoi(key_value); update_spi_flash(); break; + case x_sensitivity: TERN_(X_SENSORLESS, stepperX.homing_threshold(atoi(key_value))); break; case y_sensitivity: TERN_(Y_SENSORLESS, stepperY.homing_threshold(atoi(key_value))); break; case z_sensitivity: TERN_(Z_SENSORLESS, stepperZ.homing_threshold(atoi(key_value))); break; @@ -530,9 +480,8 @@ void lv_draw_number_key() { } void lv_clear_number_key() { - #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); - #endif + if (TERN0(HAS_ROTARY_ENCODER, gCfgItems.encoder_enable)) + lv_group_remove_all_objs(g); lv_obj_del(scr); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp index 4807a63a2c85..ba19173f3132 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_TFT_LVGL_UI +#if ALL(HAS_TFT_LVGL_UI, EDITABLE_STEPS_PER_UNIT) #include "draw_ui.h" #include @@ -114,4 +114,4 @@ void lv_clear_step_settings() { lv_obj_del(scr); } -#endif // HAS_TFT_LVGL_UI +#endif // HAS_TFT_LVGL_UI && EDITABLE_STEPS_PER_UNIT diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 13dbb5dee5ff..61ab345dd76e 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -1059,7 +1059,9 @@ void draw_return_ui() { case DELTA_LEVELING_PARA_UI: break; case MANUAL_LEVELING_POSITION_UI: lv_draw_tramming_pos_settings(); break; case MAXFEEDRATE_UI: lv_draw_max_feedrate_settings(); break; - case STEPS_UI: lv_draw_step_settings(); break; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + case STEPS_UI: lv_draw_step_settings(); break; + #endif case ACCELERATION_UI: lv_draw_acceleration_settings(); break; #if ENABLED(CLASSIC_JERK) case JERK_UI: lv_draw_jerk_settings(); break; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.h b/Marlin/src/lcd/extui/mks_ui/draw_ui.h index da43f2a49098..10b8dcee2875 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.h @@ -294,9 +294,7 @@ typedef enum { LEVELING_UI, MESHLEVELING_UI, BIND_UI, - #if HAS_BED_PROBE - NOZZLE_PROBE_OFFSET_UI, - #endif + OPTITEM(HAS_BED_PROBE, NOZZLE_PROBE_OFFSET_UI) TOOL_UI, HARDWARE_TEST_UI, WIFI_LIST_UI, @@ -402,11 +400,11 @@ typedef enum { level_pos_y4, level_pos_x5, level_pos_y5, + #if HAS_BED_PROBE - x_offset, - y_offset, - z_offset, + x_offset, y_offset, z_offset, #endif + load_length, load_speed, unload_length, diff --git a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp index aaddbcb892d2..c4cf725dbbc4 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp @@ -208,12 +208,14 @@ void machine_setting_disp() { machine_menu.Z_Jerk = Z_JERK_CN; machine_menu.E_Jerk = E_JERK_CN; - machine_menu.StepsConfTitle = STEPS_CONF_TITLE_CN; - machine_menu.X_Steps = X_STEPS_CN; - machine_menu.Y_Steps = Y_STEPS_CN; - machine_menu.Z_Steps = Z_STEPS_CN; - machine_menu.E0_Steps = E0_STEPS_CN; - machine_menu.E1_Steps = E1_STEPS_CN; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + machine_menu.StepsConfTitle = STEPS_CONF_TITLE_CN; + machine_menu.X_Steps = X_STEPS_CN; + machine_menu.Y_Steps = Y_STEPS_CN; + machine_menu.Z_Steps = Z_STEPS_CN; + machine_menu.E0_Steps = E0_STEPS_CN; + machine_menu.E1_Steps = E1_STEPS_CN; + #endif machine_menu.TmcCurrentConfTitle = TMC_CURRENT_CONF_TITLE_CN; machine_menu.X_Current = X_TMC_CURRENT_CN; @@ -436,12 +438,14 @@ void machine_setting_disp() { machine_menu.Z_Jerk = Z_JERK_T_CN; machine_menu.E_Jerk = E_JERK_T_CN; - machine_menu.StepsConfTitle = STEPS_CONF_TITLE_T_CN; - machine_menu.X_Steps = X_STEPS_T_CN; - machine_menu.Y_Steps = Y_STEPS_T_CN; - machine_menu.Z_Steps = Z_STEPS_T_CN; - machine_menu.E0_Steps = E0_STEPS_T_CN; - machine_menu.E1_Steps = E1_STEPS_T_CN; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + machine_menu.StepsConfTitle = STEPS_CONF_TITLE_T_CN; + machine_menu.X_Steps = X_STEPS_T_CN; + machine_menu.Y_Steps = Y_STEPS_T_CN; + machine_menu.Z_Steps = Z_STEPS_T_CN; + machine_menu.E0_Steps = E0_STEPS_T_CN; + machine_menu.E1_Steps = E1_STEPS_T_CN; + #endif machine_menu.TmcCurrentConfTitle = TMC_CURRENT_CONF_TITLE_T_CN; machine_menu.X_Current = X_TMC_CURRENT_T_CN; @@ -668,12 +672,14 @@ void machine_setting_disp() { machine_menu.Z_Jerk = Z_JERK_EN; machine_menu.E_Jerk = E_JERK_EN; - machine_menu.StepsConfTitle = STEPS_CONF_TITLE_EN; - machine_menu.X_Steps = X_STEPS_EN; - machine_menu.Y_Steps = Y_STEPS_EN; - machine_menu.Z_Steps = Z_STEPS_EN; - machine_menu.E0_Steps = E0_STEPS_EN; - machine_menu.E1_Steps = E1_STEPS_EN; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + machine_menu.StepsConfTitle = STEPS_CONF_TITLE_EN; + machine_menu.X_Steps = X_STEPS_EN; + machine_menu.Y_Steps = Y_STEPS_EN; + machine_menu.Z_Steps = Z_STEPS_EN; + machine_menu.E0_Steps = E0_STEPS_EN; + machine_menu.E1_Steps = E1_STEPS_EN; + #endif machine_menu.TmcCurrentConfTitle = TMC_CURRENT_CONF_TITLE_EN; machine_menu.X_Current = X_TMC_CURRENT_EN; @@ -1747,12 +1753,14 @@ void disp_language_init() { machine_menu.Z_Jerk = Z_JERK_RU; machine_menu.E_Jerk = E_JERK_RU; - machine_menu.StepsConfTitle = STEPS_CONF_TITLE_RU; - machine_menu.X_Steps = X_STEPS_RU; - machine_menu.Y_Steps = Y_STEPS_RU; - machine_menu.Z_Steps = Z_STEPS_RU; - machine_menu.E0_Steps = E0_STEPS_RU; - machine_menu.E1_Steps = E1_STEPS_RU; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + machine_menu.StepsConfTitle = STEPS_CONF_TITLE_RU; + machine_menu.X_Steps = X_STEPS_RU; + machine_menu.Y_Steps = Y_STEPS_RU; + machine_menu.Z_Steps = Z_STEPS_RU; + machine_menu.E0_Steps = E0_STEPS_RU; + machine_menu.E1_Steps = E1_STEPS_RU; + #endif machine_menu.TmcCurrentConfTitle = TMC_CURRENT_CONF_TITLE_RU; machine_menu.X_Current = X_TMC_CURRENT_RU; diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 19f4903cc69b..2ba01a694d0e 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -672,16 +672,18 @@ namespace ExtUI { return planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)]; } - void setAxisSteps_per_mm(const_float_t value, const axis_t axis) { - planner.settings.axis_steps_per_mm[axis] = value; - planner.refresh_positioning(); - } + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + void setAxisSteps_per_mm(const_float_t value, const axis_t axis) { + planner.settings.axis_steps_per_mm[axis] = value; + planner.refresh_positioning(); + } - void setAxisSteps_per_mm(const_float_t value, const extruder_t extruder) { - UNUSED(extruder); - planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)] = value; - planner.refresh_positioning(); - } + void setAxisSteps_per_mm(const_float_t value, const extruder_t extruder) { + UNUSED(extruder); + planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)] = value; + planner.refresh_positioning(); + } + #endif feedRate_t getAxisMaxFeedrate_mm_s(const axis_t axis) { return planner.settings.max_feedrate_mm_s[axis]; diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 0d2c3e8d86a5..28c34bd08abb 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -265,8 +265,10 @@ namespace ExtUI { void setAxisPosition_mm(const_float_t, const extruder_t, const feedRate_t=0); // Planner Control - void setAxisSteps_per_mm(const_float_t, const axis_t); - void setAxisSteps_per_mm(const_float_t, const extruder_t); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + void setAxisSteps_per_mm(const_float_t, const axis_t); + void setAxisSteps_per_mm(const_float_t, const extruder_t); + #endif void setAxisMaxFeedrate_mm_s(const feedRate_t, const axis_t); void setAxisMaxFeedrate_mm_s(const feedRate_t, const extruder_t); void setAxisMaxAcceleration_mm_s2(const_float_t, const axis_t); diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 698687b96dcd..840b658d09c9 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -641,32 +641,38 @@ void menu_backlash(); #endif // !SLIM_LCD_MENUS -// M92 Steps-per-mm -void menu_advanced_steps_per_mm() { - START_MENU(); - BACK_ITEM(MSG_ADVANCED_SETTINGS); +#if ENABLED(EDITABLE_STEPS_PER_UNIT) - LOOP_NUM_AXES(a) - EDIT_ITEM_FAST_N(float72, a, MSG_N_STEPS, &planner.settings.axis_steps_per_mm[a], 5, 9999, []{ planner.refresh_positioning(); }); + // M92 Steps-per-mm + void menu_advanced_steps_per_mm() { + START_MENU(); + BACK_ITEM(MSG_ADVANCED_SETTINGS); - #if ENABLED(DISTINCT_E_FACTORS) - for (uint8_t n = 0; n < E_STEPPERS; ++n) - EDIT_ITEM_FAST_N(float72, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ - const uint8_t e = MenuItemBase::itemIndex; - if (e == active_extruder) - planner.refresh_positioning(); - else - planner.mm_per_step[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)]; - }); - #elif E_STEPPERS - EDIT_ITEM_FAST_N(float72, E_AXIS, MSG_N_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); }); - #endif + LOOP_NUM_AXES(a) + EDIT_ITEM_FAST_N(float72, a, MSG_N_STEPS, &planner.settings.axis_steps_per_mm[a], 5, 9999, []{ planner.refresh_positioning(); }); - END_MENU(); -} + #if ENABLED(DISTINCT_E_FACTORS) + for (uint8_t n = 0; n < E_STEPPERS; ++n) + EDIT_ITEM_FAST_N(float72, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ + const uint8_t e = MenuItemBase::itemIndex; + if (e == active_extruder) + planner.refresh_positioning(); + else + planner.mm_per_step[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)]; + }); + #elif E_STEPPERS + EDIT_ITEM_FAST_N(float72, E_AXIS, MSG_N_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); }); + #endif + + END_MENU(); + } + +#endif // EDITABLE_STEPS_PER_UNIT void menu_advanced_settings() { - const bool is_busy = printer_busy(); + #if ANY(POLARGRAPH, SHAPING_MENU, HAS_BED_PROBE, EDITABLE_STEPS_PER_UNIT) + const bool is_busy = printer_busy(); + #endif #if ENABLED(SD_FIRMWARE_UPDATE) bool sd_update_state = settings.sd_update_status(); @@ -722,8 +728,9 @@ void menu_advanced_settings() { #endif // !SLIM_LCD_MENUS // M92 - Steps Per mm - if (!is_busy) - SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + if (!is_busy) SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm); + #endif #if ENABLED(BACKLASH_GCODE) SUBMENU(MSG_BACKLASH, menu_backlash); diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 0c6027bfdead..6b27971d9d1e 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -133,6 +133,12 @@ volatile uint8_t Planner::block_buffer_head, // Index of the next block to be uint16_t Planner::cleaning_buffer_counter; // A counter to disable queuing of blocks uint8_t Planner::delay_before_delivering; // Delay block delivery so initial blocks in an empty queue may merge +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step +#else + constexpr float PlannerSettings::axis_steps_per_mm[DISTINCT_AXES]; + constexpr float Planner::mm_per_step[DISTINCT_AXES]; +#endif planner_settings_t Planner::settings; // Initialized by settings.load() /** @@ -146,8 +152,6 @@ planner_settings_t Planner::settings; // Initialized by settings.load( uint32_t Planner::max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) Derived from mm_per_s2 -float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step - #if HAS_JUNCTION_DEVIATION float Planner::junction_deviation_mm; // (mm) M205 J #if HAS_LINEAR_E_JERK @@ -3308,7 +3312,9 @@ void Planner::refresh_acceleration_rates() { * Must be called whenever settings.axis_steps_per_mm changes! */ void Planner::refresh_positioning() { - LOOP_DISTINCT_AXES(i) mm_per_step[i] = 1.0f / settings.axis_steps_per_mm[i]; + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + LOOP_DISTINCT_AXES(i) mm_per_step[i] = 1.0f / settings.axis_steps_per_mm[i]; + #endif set_position_mm(current_position); refresh_acceleration_rates(); } diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 726ccb4d3f81..42eee677cbc6 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -340,10 +340,30 @@ constexpr uint8_t block_inc_mod(const uint8_t v1, const uint8_t v2) { } laser_state_t; #endif -typedef struct { +#if DISABLED(EDITABLE_STEPS_PER_UNIT) + static constexpr float _dasu[] = DEFAULT_AXIS_STEPS_PER_UNIT; +#endif + +typedef struct PlannerSettings { uint32_t max_acceleration_mm_per_s2[DISTINCT_AXES], // (mm/s^2) M201 XYZE min_segment_time_us; // (µs) M205 B - float axis_steps_per_mm[DISTINCT_AXES]; // (steps) M92 XYZE - Steps per millimeter + + // (steps) M92 XYZE - Steps per millimeter + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + float axis_steps_per_mm[DISTINCT_AXES]; + #else + #define _DLIM(I) _MIN(I, (signed)COUNT(_dasu) - 1) + #define _DASU(N) _dasu[_DLIM(N)], + #define _EASU(N) _dasu[_DLIM(E_AXIS + N)], + static constexpr float axis_steps_per_mm[DISTINCT_AXES] = { + REPEAT(NUM_AXES, _DASU) + TERN_(HAS_EXTRUDERS, REPEAT(DISTINCT_E, _EASU)) + }; + #undef _EASU + #undef _DASU + #undef _DLIM + #endif + feedRate_t max_feedrate_mm_s[DISTINCT_AXES]; // (mm/s) M203 XYZE - Max speeds float acceleration, // (mm/s^2) M204 S - Normal acceleration. DEFAULT ACCELERATION for all printing moves. retract_acceleration, // (mm/s^2) M204 R - Retract acceleration. Filament pull-back and push-forward while standing still in the other axes @@ -450,15 +470,15 @@ class Planner { #endif #if DISABLED(NO_VOLUMETRICS) - static float filament_size[EXTRUDERS], // diameter of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder - volumetric_area_nominal, // Nominal cross-sectional area - volumetric_multiplier[EXTRUDERS]; // Reciprocal of cross-sectional area of filament (in mm^2). Pre-calculated to reduce computation in the planner + static float filament_size[EXTRUDERS], // (mm) Diameter of filament, typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder + volumetric_area_nominal, // (mm^3) Nominal cross-sectional area + volumetric_multiplier[EXTRUDERS]; // (1/mm^2) Reciprocal of cross-sectional area of filament. Pre-calculated to reduce computation in the planner // May be auto-adjusted by a filament width sensor #endif #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - static float volumetric_extruder_limit[EXTRUDERS], // Maximum mm^3/sec the extruder can handle - volumetric_extruder_feedrate_limit[EXTRUDERS]; // Feedrate limit (mm/s) calculated from volume limit + static float volumetric_extruder_limit[EXTRUDERS], // (mm^3/sec) Maximum volume the extruder can handle + volumetric_extruder_feedrate_limit[EXTRUDERS]; // (mm/s) Feedrate limit calculated from volume limit #endif static planner_settings_t settings; @@ -468,7 +488,14 @@ class Planner { #endif static uint32_t max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) Derived from mm_per_s2 - static float mm_per_step[DISTINCT_AXES]; // Millimeters per step + + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + static float mm_per_step[DISTINCT_AXES]; // Millimeters per step + #else + #define _RSTEP(N) RECIPROCAL(settings.axis_steps_per_mm[N]), + static constexpr float mm_per_step[DISTINCT_AXES] = { REPEAT(DISTINCT_AXES, _RSTEP) }; + #undef _RSTEP + #endif #if HAS_JUNCTION_DEVIATION static float junction_deviation_mm; // (mm) M205 J diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index a12728a00304..adbd3dcf47dc 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -198,8 +198,10 @@ typedef struct { bool NUM_AXIS_LIST_(X:1, Y:1, Z:1, I:1, J:1, K:1, U:1, V:1, // Defaults for reset / fill in on load static const uint32_t _DMA[] PROGMEM = DEFAULT_MAX_ACCELERATION; -static const float _DASU[] PROGMEM = DEFAULT_AXIS_STEPS_PER_UNIT; static const feedRate_t _DMF[] PROGMEM = DEFAULT_MAX_FEEDRATE; +#if ENABLED(EDITABLE_STEPS_PER_UNIT) + static const float _DASU[] PROGMEM = DEFAULT_AXIS_STEPS_PER_UNIT; +#endif /** * Current EEPROM Layout @@ -1855,17 +1857,22 @@ void MarlinSettings::postprocess() { // Get only the number of E stepper parameters previously stored // Any steppers added later are set to their defaults uint32_t tmp1[NUM_AXES + e_factors]; - float tmp2[NUM_AXES + e_factors]; - feedRate_t tmp3[NUM_AXES + e_factors]; EEPROM_READ((uint8_t *)tmp1, sizeof(tmp1)); // max_acceleration_mm_per_s2 + EEPROM_READ(planner.settings.min_segment_time_us); + + float tmp2[NUM_AXES + e_factors]; EEPROM_READ((uint8_t *)tmp2, sizeof(tmp2)); // axis_steps_per_mm + + feedRate_t tmp3[NUM_AXES + e_factors]; EEPROM_READ((uint8_t *)tmp3, sizeof(tmp3)); // max_feedrate_mm_s if (!validating) LOOP_DISTINCT_AXES(i) { const bool in = (i < e_factors + NUM_AXES); planner.settings.max_acceleration_mm_per_s2[i] = in ? tmp1[i] : pgm_read_dword(&_DMA[ALIM(i, _DMA)]); - planner.settings.axis_steps_per_mm[i] = in ? tmp2[i] : pgm_read_float(&_DASU[ALIM(i, _DASU)]); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + planner.settings.axis_steps_per_mm[i] = in ? tmp2[i] : pgm_read_float(&_DASU[ALIM(i, _DASU)]); + #endif planner.settings.max_feedrate_mm_s[i] = in ? tmp3[i] : pgm_read_float(&_DMF[ALIM(i, _DMF)]); } @@ -3082,7 +3089,9 @@ void MarlinSettings::postprocess() { void MarlinSettings::reset() { LOOP_DISTINCT_AXES(i) { planner.settings.max_acceleration_mm_per_s2[i] = pgm_read_dword(&_DMA[ALIM(i, _DMA)]); - planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]); + #endif planner.settings.max_feedrate_mm_s[i] = pgm_read_float(&_DMF[ALIM(i, _DMF)]); } @@ -3664,7 +3673,9 @@ void MarlinSettings::reset() { #define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(V); }while(0) #define CONFIG_ECHO_HEADING(STR) gcode.report_heading(forReplay, F(STR)) - void M92_report(const bool echo=true, const int8_t e=-1); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + void M92_report(const bool echo=true, const int8_t e=-1); + #endif /** * M503 - Report current settings in RAM @@ -3702,7 +3713,9 @@ void MarlinSettings::reset() { // // M92 Steps per Unit // - gcode.M92_report(forReplay); + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + gcode.M92_report(forReplay); + #endif // // M203 Maximum feedrates (units/s) diff --git a/ini/features.ini b/ini/features.ini index c4af1d0d951f..8e0cb964f18b 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -288,6 +288,7 @@ HAS_EXTRA_ENDSTOPS = build_src_filter=+ DIRECT_PIN_CONTROL = build_src_filter=+ + PINS_DEBUGGING = build_src_filter=+ +EDITABLE_STEPS_PER_UNIT = build_src_filter=+ HAS_MULTI_EXTRUDER = build_src_filter=+ HAS_HOTEND_OFFSET = build_src_filter=+ EDITABLE_SERVO_ANGLES = build_src_filter=+ diff --git a/platformio.ini b/platformio.ini index e6adfe2b6be5..76200cbbd5c3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -97,7 +97,6 @@ default_src_filter = + - - ; Minimal Requirements ; + - + + + + From f44f9eb9f831e007156e310de09ab3ba03100cf0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 10 Jan 2024 14:49:28 -0600 Subject: [PATCH 105/236] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20style=20adjustme?= =?UTF-8?q?nts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/config/M92.cpp | 6 +++--- Marlin/src/module/settings.cpp | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 347de3bdea2d..2f33be63a1dc 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -98,6 +98,7 @@ void GcodeSuite::M92() { void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { report_heading_etc(forReplay, F(STR_STEPS_PER_UNIT)); #if NUM_AXES + #define PRINT_EOL SERIAL_ECHOPGM_P(LIST_N(DOUBLE(NUM_AXES), PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]), SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]), @@ -112,12 +113,11 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/ #endif #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + #define PRINT_EOL SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); #endif - #if NUM_AXES || (HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)) - SERIAL_EOL(); - #endif + if (ENABLED(PRINT_EOL)) SERIAL_EOL(); #if ENABLED(DISTINCT_E_FACTORS) for (uint8_t i = 0; i < E_STEPPERS; ++i) { diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index adbd3dcf47dc..da62a4278199 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -3713,9 +3713,7 @@ void MarlinSettings::reset() { // // M92 Steps per Unit // - #if ENABLED(EDITABLE_STEPS_PER_UNIT) - gcode.M92_report(forReplay); - #endif + TERN_(EDITABLE_STEPS_PER_UNIT, gcode.M92_report(forReplay)); // // M203 Maximum feedrates (units/s) From ef92b6c369fdf6ea99d7c79a663c7f6b308e31ec Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 11 Jan 2024 00:21:50 +0000 Subject: [PATCH 106/236] [cron] Bump distribution date (2024-01-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 2ca028ebc562..3c0cc959209c 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 "2024-01-10" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 f134f53e5f6f..1bf88818d2de 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 "2024-01-10" + #define STRING_DISTRIBUTION_DATE "2024-01-11" #endif /** From 0f43ac79f610df25d865667e41baef707aaf40da Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 10 Jan 2024 18:25:17 -0600 Subject: [PATCH 107/236] =?UTF-8?q?=E2=8F=AA=EF=B8=8F=20Revert=20encoder?= =?UTF-8?q?=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts #26501 --- Marlin/src/lcd/marlinui.cpp | 114 ++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 64 deletions(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 73094761822d..dfb2a8d47c06 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -67,8 +67,6 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; -#define BLOCK_CLICK_AFTER_MOVEMENT_MS 100 - #if HAS_STATUS_MESSAGE #if ENABLED(STATUS_MESSAGE_SCROLLING) && ANY(HAS_WIRED_LCD, DWIN_LCD_PROUI) uint8_t MarlinUI::status_scroll_offset; // = 0 @@ -942,7 +940,6 @@ void MarlinUI::init() { void MarlinUI::update() { static uint16_t max_display_update_time = 0; - static millis_t next_encoder_enable_ms = 0; const millis_t ms = millis(); #if LED_POWEROFF_TIMEOUT > 0 @@ -993,12 +990,7 @@ void MarlinUI::init() { if (!touch_buttons) { // Integrated LCD click handling via button_pressed if (!external_control && button_pressed()) { - if (!wait_for_unclick) { - if (ELAPSED(ms, next_encoder_enable_ms)) - do_click(); // Handle the click - else - wait_for_unclick = true; - } + if (!wait_for_unclick) do_click(); // Handle the click } else wait_for_unclick = false; @@ -1035,73 +1027,68 @@ void MarlinUI::init() { uint8_t abs_diff = ABS(encoderDiff); #if ENCODER_PULSES_PER_STEP > 1 - #if HAS_TOUCH_SLEEP - static int8_t lastEncoderDiff; - if (lastEncoderDiff != encoderDiff) { - wakeup_screen(); - lastEncoderDiff = encoderDiff; - } - #endif + // When reversing the encoder direction, a movement step can be missed because + // encoderDiff has a non-zero residual value, making the controller unresponsive. + // The fix clears the residual value when the encoder is idle. + // Also check if past half the threshold to compensate for missed single steps. + static int8_t lastEncoderDiff; + + // Timeout? No decoder change since last check. 10 or 20 times per second. + if (encoderDiff == lastEncoderDiff && abs_diff <= epps / 2) // Same direction & size but not over a half-step? + encoderDiff = 0; // Clear residual pulses. + else if (WITHIN(abs_diff, epps / 2 + 1, epps - 1)) { // Past half of threshold? + abs_diff = epps; // Treat as a full step size + encoderDiff = (encoderDiff < 0 ? -1 : 1) * abs_diff; // ...in the spin direction. + } + TERN_(HAS_TOUCH_SLEEP, if (lastEncoderDiff != encoderDiff) wakeup_screen()); + lastEncoderDiff = encoderDiff; #endif const bool encoderPastThreshold = (abs_diff >= epps); - if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { + if (encoderPastThreshold || lcd_clicked) { + if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { - #if ALL(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLIER) + #if ALL(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLIER) - int32_t encoderMultiplier = 1; + int32_t encoderMultiplier = 1; - if (encoderRateMultiplierEnabled) { - if (lastEncoderMovementMillis) { + if (encoderRateMultiplierEnabled) { const float encoderMovementSteps = float(abs_diff) / epps; - // Note that the rate is always calculated between two passes through the - // loop and that the abs of the encoderDiff value is tracked. - const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; - - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - - // Enable to output the encoder steps per second value - //#define ENCODER_RATE_MULTIPLIER_DEBUG - #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPGM(" Multiplier: ", encoderMultiplier); - SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); - SERIAL_EOL(); - #endif - } - lastEncoderMovementMillis = ms; - } // encoderRateMultiplierEnabled + if (lastEncoderMovementMillis) { + // Note that the rate is always calculated between two passes through the + // loop and that the abs of the encoderDiff value is tracked. + const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; - #else + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - constexpr int32_t encoderMultiplier = 1; + // Enable to output the encoder steps per second value + //#define ENCODER_RATE_MULTIPLIER_DEBUG + #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); + SERIAL_ECHOPGM(" Multiplier: ", encoderMultiplier); + SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); + SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); + SERIAL_EOL(); + #endif + } - #endif // ENCODER_RATE_MULTIPLIER + lastEncoderMovementMillis = ms; + } // encoderRateMultiplierEnabled - int8_t fullSteps = encoderDiff / epps; - if (fullSteps != 0) { + #else - #if ENABLED(ENCODER_RATE_MULTIPLIER) - static bool lastFwd; - const bool fwd = fullSteps > 0; - if (encoderMultiplier != 1 && fwd != lastFwd) - fullSteps *= -1; // Fast move and direction changed? Assume glitch. - else - lastFwd = fwd; // Slow move or lastFwd==fwd already. Remember dir. - #endif + constexpr int32_t encoderMultiplier = 1; + + #endif // ENCODER_RATE_MULTIPLIER + + if (can_encode()) encoderPosition += (encoderDiff * encoderMultiplier) / epps; - next_encoder_enable_ms = ms + BLOCK_CLICK_AFTER_MOVEMENT_MS; - encoderDiff -= fullSteps * epps; - if (can_encode() && !lcd_clicked) - encoderPosition += (fullSteps * encoderMultiplier); + encoderDiff = 0; } - } - if (encoderPastThreshold || lcd_clicked) { reset_status_timeout(ms); #if HAS_BACKLIGHT_TIMEOUT @@ -1115,7 +1102,7 @@ void MarlinUI::init() { #if LED_POWEROFF_TIMEOUT > 0 if (!powerManager.psu_on) leds.reset_timeout(ms); #endif - } + } // encoder activity #endif // HAS_ENCODER_ACTION @@ -1413,10 +1400,9 @@ void MarlinUI::init() { #if HAS_ENCODER_WHEEL static uint8_t lastEncoderBits; - bool ignore = false; // Manage encoder rotation - #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: encoderDiff += encoderDirection; break; case _E2: encoderDiff -= encoderDirection; break; default: ignore = true; } + #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: encoderDiff += encoderDirection; break; case _E2: encoderDiff -= encoderDirection; } uint8_t enc = 0; if (buttons & EN_A) enc |= B01; @@ -1431,7 +1417,7 @@ void MarlinUI::init() { #if ALL(HAS_MARLINUI_MENU, AUTO_BED_LEVELING_UBL) external_encoder(); #endif - if (!ignore) lastEncoderBits = enc; + lastEncoderBits = enc; } #endif // HAS_ENCODER_WHEEL From 46f370ae3cc1501bd831c495b46ab0e571e99f10 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 12 Jan 2024 00:21:50 +0000 Subject: [PATCH 108/236] [cron] Bump distribution date (2024-01-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 3c0cc959209c..282e5a93bdfb 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 "2024-01-11" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 1bf88818d2de..ac26536f1974 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 "2024-01-11" + #define STRING_DISTRIBUTION_DATE "2024-01-12" #endif /** From ab3497161a37ae309e030a23e0f8e3f3eb61daea Mon Sep 17 00:00:00 2001 From: ThomasToka <117008525+ThomasToka@users.noreply.github.com> Date: Fri, 12 Jan 2024 06:56:45 +0100 Subject: [PATCH 109/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20PLR=20pos/sdpos=20?= =?UTF-8?q?(#26365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/feature/powerloss.cpp | 10 ++++++---- Marlin/src/gcode/feature/powerloss/M1000.cpp | 1 + Marlin/src/gcode/queue.cpp | 4 ++++ Marlin/src/gcode/queue.h | 4 ++-- Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp | 8 ++++---- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index ce34b3a95cec..7c90bb684a03 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -358,7 +358,9 @@ void PrintJobRecovery::write() { * Resume the saved print job */ void PrintJobRecovery::resume() { - const uint32_t resume_sdpos = info.sdpos; // Get here before the stepper ISR overwrites it + // Get these fields before any moves because stepper.cpp overwrites them + const xyze_pos_t resume_pos = info.current_position; + const uint32_t resume_sdpos = info.sdpos; // Apply the dry-run flag if enabled if (info.flag.dryrun) marlin_debug_flags |= MARLIN_DEBUG_DRYRUN; @@ -400,7 +402,7 @@ void PrintJobRecovery::resume() { #endif // Interpret the saved Z according to flags - const float z_print = info.current_position.z, + const float z_print = resume_pos.z, z_raised = z_print + info.zraise; // @@ -540,7 +542,7 @@ void PrintJobRecovery::resume() { // Move back over to the saved XY PROCESS_SUBCOMMANDS_NOW(TS( - F("G1F3000X"), p_float_t(info.current_position.x, 3), 'Y', p_float_t(info.current_position.y, 3) + F("G1F3000X"), p_float_t(resume_pos.x, 3), 'Y', p_float_t(resume_pos.y, 3) )); // Move back down to the saved Z for printing @@ -550,7 +552,7 @@ void PrintJobRecovery::resume() { PROCESS_SUBCOMMANDS_NOW(TS(F("G1F"), info.feedrate)); // Restore E position with G92.9 - PROCESS_SUBCOMMANDS_NOW(TS(F("G92.9E"), p_float_t(info.current_position.e, 3))); + PROCESS_SUBCOMMANDS_NOW(TS(F("G92.9E"), p_float_t(resume_pos.e, 3))); TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat); TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset); diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index 033bcf4ebbdc..c735b72cedbb 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -65,6 +65,7 @@ inline void plr_error(FSTR_P const prefix) { * M1000: Resume from power-loss (undocumented) * - With 'S' go to the Resume/Cancel menu * ...unless the bed temperature is already above a configured minimum temperature. + * - With 'C' execute a cancel selection * - With no parameters, run recovery commands */ void GcodeSuite::M1000() { diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index db06af82f061..6b34a3b46b04 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -91,6 +91,10 @@ PGM_P GCodeQueue::injected_commands_P; // = nullptr */ char GCodeQueue::injected_commands[64]; // = { 0 } +/** + * Commit the accumulated G-code command to the ring buffer, + * also setting its origin info. + */ void GCodeQueue::RingBuffer::commit_command(const bool skip_ok OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind/*=-1*/) ) { diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index 91cad1f08d94..7281a48bb702 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -80,11 +80,11 @@ class GCodeQueue { void advance_pos(uint8_t &p, const int inc) { if (++p >= BUFSIZE) p = 0; length += inc; } void commit_command(const bool skip_ok - OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind = serial_index_t()) + OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind=serial_index_t()) ); bool enqueue(const char *cmd, const bool skip_ok=true - OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind = serial_index_t()) + OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind=serial_index_t()) ); void ok_to_send(); diff --git a/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp index 2d6c2aa96e68..490e427b855c 100644 --- a/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp @@ -342,10 +342,10 @@ void onSettingsLoaded(const bool success) { // Called when power-loss state is detected } void onPowerLossResume() { - startprogress = 254; - show_status = true; - tpShowStatus = false; - no_reentry = false; + startprogress = 254; + show_status = true; + tpShowStatus = false; + no_reentry = false; rts.sendData(ExchangePageBase + 76, ExchangepageAddr); } #endif From cadef644180ecb049826159612853411e111c4f0 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 13 Jan 2024 00:21:34 +0000 Subject: [PATCH 110/236] [cron] Bump distribution date (2024-01-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 282e5a93bdfb..8293f72b4bdc 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 "2024-01-12" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 ac26536f1974..a801b895a6ba 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 "2024-01-12" + #define STRING_DISTRIBUTION_DATE "2024-01-13" #endif /** From b2fd631d82b9b3e64226ceac6a132ec917aaee21 Mon Sep 17 00:00:00 2001 From: Robherc <68039049+robherc@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:03:34 -0500 Subject: [PATCH 111/236] =?UTF-8?q?=F0=9F=94=A7=20Fix=20SD=20connection=20?= =?UTF-8?q?defaults=20(#26666)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> Co-authored-by: Scott Lahteine --- Marlin/src/inc/Conditionals_LCD.h | 2 ++ Marlin/src/inc/SanityCheck.h | 4 ++-- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 2 +- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 6 +++++- Marlin/src/pins/stm32f1/pins_MD_D301.h | 4 ++-- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 6 +++++- Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 2 +- Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h | 2 +- Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h | 2 +- Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 2 +- Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h | 2 +- 13 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 58842209afe2..729f450147e3 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -784,6 +784,7 @@ #elif ENABLED(CR10_STOCKDISPLAY) #define IS_RRD_FG_SC 1 + #define NO_LCD_SDCARD #define LCD_ST7920_DELAY_1 125 #define LCD_ST7920_DELAY_2 125 #define LCD_ST7920_DELAY_3 125 @@ -1684,6 +1685,7 @@ #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_SPI + #define NO_LCD_SDCARD #elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index bab6fa1d0193..a60ead1d08e4 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2705,8 +2705,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i 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 ANY(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." +#if ENABLED(NO_LCD_SDCARD) && SD_CONNECTION_IS(LCD) + #error "SDCARD_CONNECTION cannot be set to LCD for the enabled display. No available SD card reader." #endif /** diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index ca8010493bb9..569c9781d270 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -96,7 +96,7 @@ #define BTN_EN1 P4_28 #define BTN_EN2 P1_27 #define BTN_ENC P3_26 - #ifndef SDCARD_CONNECTION + #if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index 75eea8e0f6ca..ee3934a4ef2d 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -119,7 +119,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index a9184073c5d6..7aa4aa642349 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -160,7 +160,11 @@ // #ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD + #if ENABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION ONBOARD + #else + #define SDCARD_CONNECTION LCD + #endif #endif #if SD_CONNECTION_IS(LCD) diff --git a/Marlin/src/pins/stm32f1/pins_MD_D301.h b/Marlin/src/pins/stm32f1/pins_MD_D301.h index 5724879badec..bcede1d4be9c 100644 --- a/Marlin/src/pins/stm32f1/pins_MD_D301.h +++ b/Marlin/src/pins/stm32f1/pins_MD_D301.h @@ -160,8 +160,8 @@ // // SD Support // -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD +#if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION LCD #endif #define SD_DETECT_PIN PE3 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 f88c75a27dd5..855e94c72dc3 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -235,7 +235,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD 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 42ee66caace7..3ff29e6862d4 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -250,7 +250,11 @@ // #if HAS_MEDIA #ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD + #if ENABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION ONBOARD + #else + #define SDCARD_CONNECTION LCD + #endif #endif #if SD_CONNECTION_IS(ONBOARD) //#define SOFTWARE_SPI 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 fc3f679b8d18..796527b364d5 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -228,7 +228,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h index ad24d902f92e..d55e0a3f84f8 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h @@ -326,7 +326,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h index 346cd1c3481f..bc6118228ff8 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h @@ -272,7 +272,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD 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 b0890036ee7b..6c081f9b56ee 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -254,7 +254,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h index 43b3d6852237..148b21de0b3c 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h @@ -246,7 +246,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD From 8916e6f826aa86b4b0a2b08c72d0128fce8c28c4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 14 Jan 2024 00:24:03 +0000 Subject: [PATCH 112/236] [cron] Bump distribution date (2024-01-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 8293f72b4bdc..808dafa70c19 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 "2024-01-13" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 a801b895a6ba..d3d3af9cb932 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 "2024-01-13" + #define STRING_DISTRIBUTION_DATE "2024-01-14" #endif /** From 3019af1c9398da0172b5d5f5bb0d3a5506e56e4d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 13 Jan 2024 18:30:43 -0600 Subject: [PATCH 113/236] =?UTF-8?q?=F0=9F=94=A8=20Make=20/=20pins-format?= =?UTF-8?q?=20patches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 30 ++++++++++++--------------- buildroot/bin/mftest | 2 ++ buildroot/share/scripts/pinsformat.js | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 11e908ef8342..bc26173aaf36 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,14 @@ CONTAINER_IMAGE := marlin-dev help: @echo "Tasks for local development:" - @echo "* format-pins: Reformat all pins files" - @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" - @echo "* tests-all-local: Run all tests locally" - @echo "* tests-all-local-docker: Run all tests locally, using docker" - @echo "* setup-local-docker: Build the local docker image" + @echo "make marlin : Build marlin for the configured board" + @echo "make format-pins : Reformat all pins files" + @echo "make tests-single-ci : Run a single test from inside the CI" + @echo "make tests-single-local : Run a single test locally" + @echo "make tests-single-local-docker : Run a single test locally, using docker" + @echo "make tests-all-local : Run all tests locally" + @echo "make tests-all-local-docker : Run all tests locally, using docker" + @echo "make setup-local-docker : Build the local docker image" @echo "" @echo "Options for testing:" @echo " TEST_TARGET Set when running tests-single-*, to select the" @@ -24,46 +25,41 @@ help: @echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value" @echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:" @echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!" -.PHONY: help + +marlin: + ./buildroot/bin/mftest -a +.PHONY: marlin tests-single-ci: export GIT_RESET_HARD=true $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION -.PHONY: tests-single-ci tests-single-local: @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET= or use make tests-all-local" ; return 1; fi export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \ && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \ && run_tests . $(TEST_TARGET) "$(ONLY_TEST)" -.PHONY: 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 @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 $$($(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: @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: $(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile . -.PHONY: setup-local-docker PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h') -.PHONY: $(PINS) - $(PINS): %: - @echo "Formatting $@" && node buildroot/share/scripts/pinsformat.js $@ + @echo "Formatting $@" && node $(SCRIPTS_DIR)/pinsformat.js $@ format-pins: $(PINS) diff --git a/buildroot/bin/mftest b/buildroot/bin/mftest index e4132f02a75c..5ccfd1df558e 100755 --- a/buildroot/bin/mftest +++ b/buildroot/bin/mftest @@ -8,6 +8,8 @@ [[ -d Marlin/src ]] || { echo "Please 'cd' to the Marlin repo root." ; exit 1 ; } +which pio || { echo "Make sure 'pio' is in your execution PATH." ; exit 1 ; } + perror() { echo -e "$0: \033[0;31m$1 -- $2\033[0m" ; } errout() { echo -e "\033[0;31m$1\033[0m" ; } bugout() { ((DEBUG)) && echo -e "\033[0;32m$1\033[0m" ; } diff --git a/buildroot/share/scripts/pinsformat.js b/buildroot/share/scripts/pinsformat.js index 41bdfdab871a..16e9dcb88f08 100755 --- a/buildroot/share/scripts/pinsformat.js +++ b/buildroot/share/scripts/pinsformat.js @@ -42,7 +42,7 @@ String.prototype.concat_with_space = function(str) { }; 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+(${'|'.join(mpatt)})\\s*(//.*)?$`, 'gm'), + definePatt = new RegExp(`^\\s*(//)?#define\\s+[A-Z_][A-Z0-9_]+\\s+(${mpatt.join('|')})\\s*(//.*)?$`, 'gm'), ppad = [ 3, 4, 5, 5 ], col_comment = 50, col_value_rj = col_comment - 3; From 745577693d1dd27d209aa547ca1745d6ca6ecc1b Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 15 Jan 2024 00:22:58 +0000 Subject: [PATCH 114/236] [cron] Bump distribution date (2024-01-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 808dafa70c19..a048893b1b95 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 "2024-01-14" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 d3d3af9cb932..7681ac4f90ad 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 "2024-01-14" + #define STRING_DISTRIBUTION_DATE "2024-01-15" #endif /** From 8d4ab15748eb9c6bcbc1dd30c1b8f51d2cc94dc5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 15 Jan 2024 21:36:15 -0600 Subject: [PATCH 115/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Twe?= =?UTF-8?q?ak=20planner=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/planner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 6b27971d9d1e..14cc06419eb0 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1905,13 +1905,13 @@ bool Planner::_populate_block( SERIAL_ECHOLNPGM( " _populate_block FR:", fr_mm_s, #if HAS_X_AXIS - " A:", target.a, " (", dist.a, " steps)" + " " STR_A ":", target.a, " (", dist.a, " steps)" #endif #if HAS_Y_AXIS - " B:", target.b, " (", dist.b, " steps)" + " " STR_B ":", target.b, " (", dist.b, " steps)" #endif #if HAS_Z_AXIS - " C:", target.c, " (", dist.c, " steps)" + " " STR_C ":", target.c, " (", dist.c, " steps)" #endif #if HAS_I_AXIS " " STR_I ":", target.i, " (", dist.i, " steps)" From 1f1ca34ea6c37d8d22808f3fb25992776abfe4f2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 15 Jan 2024 22:22:08 -0600 Subject: [PATCH 116/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Twe?= =?UTF-8?q?ak=20limit=5Fand=5Fwarn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/planner.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 14cc06419eb0..6371a960a7d1 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -3320,16 +3320,12 @@ void Planner::refresh_positioning() { } // Apply limits to a variable and give a warning if the value was out of range -inline void limit_and_warn(float &val, const AxisEnum axis, PGM_P const setting_name, const xyze_float_t &max_limit) { +inline void limit_and_warn(float &val, const AxisEnum axis, FSTR_P const setting_name, const xyze_float_t &max_limit) { const uint8_t lim_axis = TERN_(HAS_EXTRUDERS, axis > E_AXIS ? E_AXIS :) axis; const float before = val; LIMIT(val, 0.1f, max_limit[lim_axis]); - if (before != val) { - SERIAL_CHAR(AXIS_CHAR(lim_axis)); - SERIAL_ECHOPGM(" Max "); - SERIAL_ECHOPGM_P(setting_name); - SERIAL_ECHOLNPGM(" limited to ", val); - } + if (before != val) + SERIAL_ECHOLN(C(AXIS_CHAR(lim_axis)), F(" Max "), setting_name, F(" limited to "), val); } /** @@ -3348,7 +3344,7 @@ void Planner::set_max_acceleration(const AxisEnum axis, float inMaxAccelMMS2) { constexpr xyze_float_t max_accel_edit = DEFAULT_MAX_ACCELERATION; const xyze_float_t max_acc_edit_scaled = max_accel_edit * 2; #endif - limit_and_warn(inMaxAccelMMS2, axis, PSTR("Acceleration"), max_acc_edit_scaled); + limit_and_warn(inMaxAccelMMS2, axis, F("Acceleration"), max_acc_edit_scaled); #endif settings.max_acceleration_mm_per_s2[axis] = inMaxAccelMMS2; @@ -3371,7 +3367,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { constexpr xyze_float_t max_fr_edit = DEFAULT_MAX_FEEDRATE; const xyze_float_t max_fr_edit_scaled = max_fr_edit * 2; #endif - limit_and_warn(inMaxFeedrateMMS, axis, PSTR("Feedrate"), max_fr_edit_scaled); + limit_and_warn(inMaxFeedrateMMS, axis, F("Feedrate"), max_fr_edit_scaled); #endif settings.max_feedrate_mm_s[axis] = inMaxFeedrateMMS; } @@ -3394,7 +3390,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 } #endif ; - limit_and_warn(inMaxJerkMMS, axis, PSTR("Jerk"), max_jerk_edit); + limit_and_warn(inMaxJerkMMS, axis, F("Jerk"), max_jerk_edit); #endif max_jerk[axis] = inMaxJerkMMS; } From 76dce41580e5fbe527e2b8939f358a624b3c0e04 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 16 Jan 2024 06:06:41 +0000 Subject: [PATCH 117/236] [cron] Bump distribution date (2024-01-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 a048893b1b95..123993aceb39 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 "2024-01-15" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 7681ac4f90ad..3027e40e6458 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 "2024-01-15" + #define STRING_DISTRIBUTION_DATE "2024-01-16" #endif /** From c31381183b0daeb4361249bb20b74b7b2e0940f1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 16 Jan 2024 23:15:04 -0600 Subject: [PATCH 118/236] =?UTF-8?q?=E2=9C=A8=20Minor=20Orca=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26534 --- Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h index b2afe6de9bde..13e32145c62e 100644 --- a/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h +++ b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h @@ -299,7 +299,7 @@ //#define LED_PIN EXP1_07_PIN // green //#define LED_PIN EXP1_08_PIN // blue - //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + //#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) // #ifndef RGB_LED_R_PIN // #define RGB_LED_R_PIN EXP1_06_PIN // #endif From 220060798930227fea158a81b5f83e241b7630ff Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 17 Jan 2024 06:06:41 +0000 Subject: [PATCH 119/236] [cron] Bump distribution date (2024-01-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 123993aceb39..a66d53a06528 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 "2024-01-16" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 3027e40e6458..3b32efe2694d 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 "2024-01-16" + #define STRING_DISTRIBUTION_DATE "2024-01-17" #endif /** From 12434e78e4478b8d098793a382db109e54cee0e8 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:55:37 -0500 Subject: [PATCH 120/236] =?UTF-8?q?=F0=9F=94=A8=20Improve=20CMakeLists.txt?= =?UTF-8?q?=20(#26700)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/share/cmake/CMakeLists.txt b/buildroot/share/cmake/CMakeLists.txt index 0316c7fc0bcf..09b5b6f1bff1 100644 --- a/buildroot/share/cmake/CMakeLists.txt +++ b/buildroot/share/cmake/CMakeLists.txt @@ -82,7 +82,7 @@ message("-- Running CMake version: " ${CMAKE_VERSION}) # Replace the CMake Ver. in the Arduino.cmake file(READ "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" ORIGINAL_FILE_CONTENTS) -string(REPLACE "cmake_minimum_required(VERSION 2.8.5)" "cmake_minimum_required(VERSION 3.5)" NEW_FILE_CONTENTS "${ORIGINAL_FILE_CONTENTS}") +string(REGEX REPLACE "cmake_minimum_required\\(VERSION[^\n]*\n" "cmake_minimum_required(VERSION 3.5)\n" NEW_FILE_CONTENTS "${ORIGINAL_FILE_CONTENTS}") file(WRITE "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" "${NEW_FILE_CONTENTS}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/modules) From cef623b7d2a5e1c49911ce539b3e031d5e307ad6 Mon Sep 17 00:00:00 2001 From: engrenage <32837871+petaflot@users.noreply.github.com> Date: Fri, 19 Jan 2024 00:57:46 +0100 Subject: [PATCH 121/236] =?UTF-8?q?=F0=9F=94=A7=20Clarify=20M600=20sanity-?= =?UTF-8?q?check=20(#26702)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a60ead1d08e4..b54010f4de95 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -542,7 +542,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif FILAMENT_RUNOUT_DISTANCE_MM < 0 #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero." #elif DISABLED(ADVANCED_PAUSE_FEATURE) && defined(FILAMENT_RUNOUT_SCRIPT) - static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR."); + static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "FILAMENT_RUNOUT_SCRIPT cannot make use of M600 unless ADVANCED_PAUSE_FEATURE is enabled"); #endif #endif @@ -614,7 +614,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif ENABLED(MMU2_MENUS) && !HAS_MARLINUI_MENU #error "MMU2_MENUS requires an LCD supporting MarlinUI." #elif DISABLED(ADVANCED_PAUSE_FEATURE) - static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2(S) / HAS_EXTENDABLE_MMU(S)."); + static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "MMU2_FILAMENT_RUNOUT_SCRIPT cannot make use of M600 unless ADVANCED_PAUSE_FEATURE is enabled"); #endif #endif From 0df25b100854008907a68393eaa6027941917a48 Mon Sep 17 00:00:00 2001 From: Abdullah YILMAZ Date: Fri, 19 Jan 2024 03:00:43 +0300 Subject: [PATCH 122/236] =?UTF-8?q?=F0=9F=8C=90=20Update=20Turkish=20langu?= =?UTF-8?q?age=20(#26676)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_tr.h | 279 +++++++++++++++++--------- 1 file changed, 189 insertions(+), 90 deletions(-) diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index c3c3b76cec99..86c5f6701c4b 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -37,7 +37,7 @@ namespace LanguageNarrow_tr { LSTR LANGUAGE = _UxGT("Turkish"); // These strings should be translated - LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" hazır."); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Hazır."); LSTR MSG_YES = _UxGT("EVET"); LSTR MSG_NO = _UxGT("HAYIR"); LSTR MSG_HIGH = _UxGT("YÜKSEK"); @@ -48,13 +48,15 @@ namespace LanguageNarrow_tr { LSTR MSG_MEDIA_INSERTED = _UxGT("SD K. Yerleştirildi."); LSTR MSG_MEDIA_REMOVED = _UxGT("SD Kart Çıkarıldı."); LSTR MSG_MEDIA_WAITING = _UxGT("SD Kart Bekleniyor"); - LSTR MSG_MEDIA_INIT_FAIL = MEDIA_TYPE_EN _UxGT(" Başlatma Başarısız"); + LSTR MSG_MEDIA_INIT_FAIL = _UxGT("SD K. Başlatma Hatası"); LSTR MSG_MEDIA_READ_ERROR = _UxGT("Kart Okuma Hatası"); LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB Çıkarıldı"); LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB Başlat. Hatası"); + LSTR MSG_MEDIA_SORT = _UxGT("Medyayı Sırala"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Medyayı Güncelle"); 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_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); LSTR MSG_MAIN_MENU = _UxGT("Ana"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Gelişmiş Ayarlar"); LSTR MSG_CONFIGURATION = _UxGT("Yapılandırma"); @@ -62,12 +64,15 @@ namespace LanguageNarrow_tr { LSTR MSG_DISABLE_STEPPERS = _UxGT("Motorları Durdur"); LSTR MSG_DEBUG_MENU = _UxGT("Hata Ayıklama"); LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Durum Çubuğu Testi"); + LSTR MSG_ENDSTOP_TEST = _UxGT("Endstop Test"); + LSTR MSG_Z_PROBE = _UxGT("Z Probe"); LSTR MSG_HOMING = _UxGT("Sıfırlanıyor"); LSTR MSG_AUTO_HOME = _UxGT("Eksenleri Sıfırla"); LSTR MSG_AUTO_HOME_A = _UxGT("@ Sıfırla"); LSTR MSG_AUTO_HOME_X = _UxGT("X Sıfırla"); LSTR MSG_AUTO_HOME_Y = _UxGT("Y Sıfırla"); LSTR MSG_AUTO_HOME_Z = _UxGT("Z Sıfırla"); + LSTR MSG_Z_AFTER_HOME = _UxGT("Z After Homing"); LSTR MSG_FILAMENT_SET = _UxGT("Filament Ayarları"); LSTR MSG_FILAMENT_MAN = _UxGT("Filament Yönetimi"); LSTR MSG_MANUAL_LEVELING = _UxGT("Manuel Seviyeleme"); @@ -92,27 +97,29 @@ namespace LanguageNarrow_tr { LSTR MSG_HOME_OFFSET_Y = _UxGT("Y Ofset Sıfırla"); LSTR MSG_HOME_OFFSET_Z = _UxGT("Z Ofset Sıfırla"); LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofset Tamam"); + LSTR MSG_ERR_M428_TOO_FAR = _UxGT("MIN/MAX Çok Fazla"); LSTR MSG_TRAMMING_WIZARD = _UxGT("Hizalama Sihirbazı"); LSTR MSG_SELECT_ORIGIN = _UxGT("Başlangıç Seç"); LSTR MSG_LAST_VALUE_SP = _UxGT("Son değer "); - LSTR MSG_PREHEAT_1 = _UxGT("Ön Isınma ") PREHEAT_1_LABEL; - LSTR MSG_PREHEAT_1_H = _UxGT("Ön Isınma ") PREHEAT_1_LABEL " ~"; - LSTR MSG_PREHEAT_1_END = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Nozul"); - LSTR MSG_PREHEAT_1_END_E = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Nozul ~"); - LSTR MSG_PREHEAT_1_ALL = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Tüm"); - LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Tabla"); - LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Ayarlar"); - - LSTR MSG_PREHEAT_M = _UxGT("Ön Isınma $"); - LSTR MSG_PREHEAT_M_H = _UxGT("Ön Isınma $ ~"); - LSTR MSG_PREHEAT_M_END = _UxGT("Ön Isınma $ Nozul"); - LSTR MSG_PREHEAT_M_END_E = _UxGT("Ön Isınma $ Nozul ~"); - LSTR MSG_PREHEAT_M_ALL = _UxGT("Ön Isınma $ Tüm"); - LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Ön Isınma $ Tabla"); - LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Ön Isınma $ Ayarlar"); - - LSTR MSG_PREHEAT_CUSTOM = _UxGT("Özel Ön Isınma"); + LSTR MSG_PREHEAT_1 = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Nozul"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Nozul ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Tüm"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Tabla"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Ayar"); + + LSTR MSG_PREHEAT_M = _UxGT("ÖnIsıtma $"); + LSTR MSG_PREHEAT_M_H = _UxGT("ÖnIsıtma $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("ÖnIsıtma $ Nozul"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("ÖnIsıtma $ Nozul ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("ÖnIsıtma $ Tüm"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("ÖnIsıtma $ Tabla"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("ÖnIsıtma $ Ayar"); + + LSTR MSG_PREHEAT_HOTEND = _UxGT("Nozul Ön Isıtma"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Özel Ön Isıtma"); LSTR MSG_COOLDOWN = _UxGT("Soğut/(Durdur)"); LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frekans"); @@ -123,8 +130,8 @@ namespace LanguageNarrow_tr { LSTR MSG_LASER_TOGGLE = _UxGT("Lazer Değiştir"); LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Üfleyici Değiştir"); LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Hava Desteği"); - LSTR MSG_LASER_PULSE_MS = _UxGT("Test Pulse ms"); - LSTR MSG_LASER_FIRE_PULSE = _UxGT("Fire Pulse"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Test Darbesi ms"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Atış Darbe"); LSTR MSG_FLOWMETER_FAULT = _UxGT("Soğutucu Akış Hatası"); LSTR MSG_SPINDLE_TOGGLE = _UxGT("Spindle Değiştir"); LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Vakum Değiştir"); @@ -136,7 +143,7 @@ namespace LanguageNarrow_tr { LSTR MSG_RETRACT = _UxGT("Geri Çek"); LSTR MSG_MOVE_AXIS = _UxGT("Eksen Hareketleri"); LSTR MSG_BED_LEVELING = _UxGT("Tabla Seviyeleme"); - LSTR MSG_LEVEL_BED = _UxGT("Tabla Seviyesi"); + LSTR MSG_LEVEL_BED = _UxGT("Tablayı Seviyele"); LSTR MSG_BED_TRAMMING = _UxGT("Tabla Hizalama"); LSTR MSG_BED_TRAMMING_MANUAL = _UxGT("Manuel Hizalama"); LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Prob tetiklenene kadar tablayı ayarlayın."); @@ -163,6 +170,7 @@ namespace LanguageNarrow_tr { LSTR MSG_MESH_CENTER = _UxGT("Merkez Alan"); LSTR MSG_MESH_EDIT_Z = _UxGT("Z Değeri"); LSTR MSG_MESH_CANCEL = _UxGT("Mesh iptal edildi"); + LSTR MSG_MESH_RESET = _UxGT("Mesh reset"); LSTR MSG_CUSTOM_COMMANDS = _UxGT("Özel Komutlar"); LSTR MSG_M48_TEST = _UxGT("M48 Prob Testi"); LSTR MSG_M48_POINT = _UxGT("M48 Nokta"); @@ -244,9 +252,10 @@ namespace LanguageNarrow_tr { LSTR MSG_UBL_INVALID_SLOT = _UxGT("Önce Mesh Yuvası Seç"); LSTR MSG_MESH_LOADED = _UxGT("Mesh %i yüklendi"); LSTR MSG_MESH_SAVED = _UxGT("Mesh %i kayıtlandı"); + LSTR MSG_MESH_ACTIVE = _UxGT("%i mesh aktif"); LSTR MSG_UBL_NO_STORAGE = _UxGT("Depolama Yok"); - LSTR MSG_UBL_SAVE_ERROR = _UxGT("Hata: UBL Kayıt"); - LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Hata: UBL Yenileme"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("UBL Kaydetme Hatası"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("UBL Geri Yükleme Hatası"); LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Ofset: "); LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Ofset Durduruldu"); LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Adım Adım UBL"); @@ -293,8 +302,9 @@ namespace LanguageNarrow_tr { LSTR MSG_MOVE_N_MM = _UxGT("$mm"); LSTR MSG_MOVE_N_IN = _UxGT("$in"); LSTR MSG_MOVE_N_DEG = _UxGT("$") LCD_STR_DEGREE; + LSTR MSG_LIVE_MOVE = _UxGT("Canlı Hareket"); LSTR MSG_SPEED = _UxGT("Hız"); - LSTR MSG_BED_Z = _UxGT("Z Mesafesi"); + LSTR MSG_MESH_Z_OFFSET = _UxGT("Z Mesafesi"); LSTR MSG_NOZZLE = _UxGT("Nozul"); LSTR MSG_NOZZLE_N = _UxGT("Nozul ~"); LSTR MSG_NOZZLE_PARKED = _UxGT("Nozul Park Edildi"); @@ -311,7 +321,7 @@ namespace LanguageNarrow_tr { LSTR MSG_STORED_FAN_N = _UxGT("Depolanan Fan ~"); LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Ekstra Fan Hızı"); LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Ekstra Fan Hızı ~"); - LSTR MSG_CONTROLLER_FAN = _UxGT("Kontrolör Fanı"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Sistem Fan Kontrol"); LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Rölanti Hızı"); LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Otomatik Mod"); LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktif Hız"); @@ -326,58 +336,72 @@ namespace LanguageNarrow_tr { LSTR MSG_LCD_ON = _UxGT("Açık"); LSTR MSG_LCD_OFF = _UxGT("Kapalı"); LSTR MSG_PID_AUTOTUNE = _UxGT("PID Kalibrasyon"); - LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Kalibrasyon *"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Kalibrasyon * PID"); LSTR MSG_PID_CYCLE = _UxGT("PID Döngüleri"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID ayarı yapıldı"); - LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("PID Autotune başarısız!"); - LSTR MSG_BAD_EXTRUDER_NUM = _UxGT("Kötü ekstruder."); + LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Kalibrasyon başarısız!"); + LSTR MSG_BAD_HEATER_ID = _UxGT("Kötü ekstruder."); LSTR MSG_TEMP_TOO_HIGH = _UxGT("Sıcaklık çok yüksek."); - LSTR MSG_TIMEOUT = _UxGT("Zaman aşımı."); - LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Otomatik ayar başarısız! Kötü ekstruder."); - LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Otomatik ayar başarısız! Sıcaklık çok yüksek."); - LSTR MSG_PID_TIMEOUT = _UxGT("Otomatik ayar başarısız! Zaman aşımı."); + LSTR MSG_TIMEOUT = _UxGT("Zaman aşımı"); + LSTR MSG_PID_BAD_HEATER_ID = _UxGT("Kalibrasyon başarısız! Kötü ekstruder."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Kalibrasyon başarısız! Sıcaklık çok yüksek."); + LSTR MSG_PID_TIMEOUT = _UxGT("Kalibrasyon başarısız! Zaman aşımı."); LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Isı kaybı test ediliyor"); + LSTR MSG_MPC_HEATING_PAST_200 = _UxGT(">200C Isıtma"); + LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Ortam ısısına soğutma"); LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Otomatik Ayarı"); LSTR MSG_MPC_EDIT = _UxGT("Düzenle * MPC"); + LSTR MSG_MPC_POWER = _UxGT("Isıtıcı Gücü"); LSTR MSG_MPC_POWER_E = _UxGT("Güç *"); - LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Blok C *"); - LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensör çözünürlüğü *"); - LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ortam h *"); - LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Amb. h fan *"); + LSTR MSG_MPC_BLOCK_HEAT_CAPACITY = _UxGT("Isı Kapasitesi"); + LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Isı Kap. *"); + LSTR MSG_SENSOR_RESPONSIVENESS = _UxGT("Sensör Hassasiyeti"); + LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensör Has. *"); + LSTR MSG_MPC_AMBIENT_XFER_COEFF = _UxGT("Ortam Kats."); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ortam Ka. *"); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN = _UxGT("Fan kats."); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Fan kats. *"); LSTR MSG_SELECT_E = _UxGT("Seç *"); LSTR MSG_ACC = _UxGT("İvme"); - LSTR MSG_JERK = _UxGT("Sarsma"); - LSTR MSG_VA_JERK = _UxGT("V") STR_A _UxGT(" Sarsma"); - LSTR MSG_VB_JERK = _UxGT("V") STR_B _UxGT(" Sarsma"); - LSTR MSG_VC_JERK = _UxGT("V") STR_C _UxGT(" Sarsma"); - LSTR MSG_VN_JERK = _UxGT("Max @ Sarsma"); - LSTR MSG_VE_JERK = _UxGT("Max E Sarsma"); + LSTR MSG_JERK = _UxGT("Sarsım"); + LSTR MSG_VA_JERK = _UxGT("Max ") STR_A _UxGT(" Sarsımı"); + LSTR MSG_VB_JERK = _UxGT("Max ") STR_B _UxGT(" Sarsımı"); + LSTR MSG_VC_JERK = _UxGT("Max ") STR_C _UxGT(" Sarsımı"); + LSTR MSG_VN_JERK = _UxGT("Max @ Sarsımı"); + LSTR MSG_VE_JERK = _UxGT("Max E Sarsımı"); LSTR MSG_JUNCTION_DEVIATION = _UxGT("Jonksiyon Sapması"); - LSTR MSG_MAX_SPEED = _UxGT("Hız Vektörü"); - LSTR MSG_VMAX_A = _UxGT("Max ") STR_A _UxGT(" Hız"); - LSTR MSG_VMAX_B = _UxGT("Max ") STR_B _UxGT(" Hız"); - LSTR MSG_VMAX_C = _UxGT("Max ") STR_C _UxGT(" Hız"); - LSTR MSG_VMAX_N = _UxGT("Max @ Hız"); - LSTR MSG_VMAX_E = _UxGT("Max E Hız"); - LSTR MSG_VMAX_EN = _UxGT("Max * Hız"); + LSTR MSG_STEP_SMOOTHING = _UxGT("Adım Yumuşatma"); + LSTR MSG_MAX_SPEED = _UxGT("Max Hız (mm/s)"); + LSTR MSG_VMAX_A = _UxGT("Max ") STR_A _UxGT(" Hızı"); + LSTR MSG_VMAX_B = _UxGT("Max ") STR_B _UxGT(" Hızı"); + LSTR MSG_VMAX_C = _UxGT("Max ") STR_C _UxGT(" Hızı"); + LSTR MSG_VMAX_N = _UxGT("Max @ Hızı"); + LSTR MSG_VMAX_E = _UxGT("Max E Hızı"); + LSTR MSG_VMAX_EN = _UxGT("Max * Hızı"); LSTR MSG_VMIN = _UxGT("Min Hız"); LSTR MSG_VTRAV_MIN = _UxGT("Min Gezme Hızı"); - LSTR MSG_ACCELERATION = _UxGT("Ivme"); - LSTR MSG_AMAX_A = _UxGT("Max ") STR_A _UxGT(" İvme"); - LSTR MSG_AMAX_B = _UxGT("Max ") STR_B _UxGT(" İvme"); - LSTR MSG_AMAX_C = _UxGT("Max ") STR_C _UxGT(" İvme"); - LSTR MSG_AMAX_N = _UxGT("Max @ İvme"); - LSTR MSG_AMAX_E = _UxGT("Max E İvme"); - LSTR MSG_AMAX_EN = _UxGT("Max * İvme"); + LSTR MSG_ACCELERATION = _UxGT("İvme"); + LSTR MSG_AMAX_A = _UxGT("Max ") STR_A _UxGT(" İvmesi"); + LSTR MSG_AMAX_B = _UxGT("Max ") STR_B _UxGT(" İvmesi"); + LSTR MSG_AMAX_C = _UxGT("Max ") STR_C _UxGT(" İvmesi"); + LSTR MSG_AMAX_N = _UxGT("Max @ İvmesi"); + LSTR MSG_AMAX_E = _UxGT("Max E İvmesi"); + LSTR MSG_AMAX_EN = _UxGT("Max * İvmesi"); LSTR MSG_A_RETRACT = _UxGT("G.Çekme Hızı"); LSTR MSG_A_TRAVEL = _UxGT("Gezinme Hızı"); - LSTR MSG_INPUT_SHAPING = _UxGT("Girdi Şekillendirme"); + LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); LSTR MSG_SHAPING_ENABLE = _UxGT("Biçimleme @ aktif"); LSTR MSG_SHAPING_DISABLE = _UxGT("Biçimleme @ pasif"); LSTR MSG_SHAPING_FREQ = _UxGT("@ frekans"); LSTR MSG_SHAPING_ZETA = _UxGT("@ sönümleme"); + LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frekansı"); + LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frekansı"); + LSTR MSG_SHAPING_A_ZETA = STR_A _UxGT(" sönümleme "); + LSTR MSG_SHAPING_B_ZETA = STR_B _UxGT(" sönümleme "); + LSTR MSG_SHAPING_X_ENABLE = _UxGT("X şekilleme etkin"); + LSTR MSG_SHAPING_Y_ENABLE = _UxGT("Y şekilleme etkin"); LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Frek. Sınırı"); - LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factörü"); LSTR MSG_STEPS_PER_MM = _UxGT("Adım/mm"); LSTR MSG_A_STEPS = STR_A _UxGT(" adım/mm"); LSTR MSG_B_STEPS = STR_B _UxGT(" adım/mm"); @@ -388,6 +412,7 @@ namespace LanguageNarrow_tr { LSTR MSG_TEMPERATURE = _UxGT("Sıcaklık"); LSTR MSG_MOTION = _UxGT("Hareket"); LSTR MSG_FILAMENT = _UxGT("Filaman"); + LSTR MSG_FILAMENT_EN = _UxGT("Filaman *"); LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("Ekstrüzyon/mm") SUPERSCRIPT_THREE; LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); @@ -396,16 +421,19 @@ namespace LanguageNarrow_tr { LSTR MSG_FILAMENT_UNLOAD = _UxGT("Çıkart mm"); LSTR MSG_FILAMENT_LOAD = _UxGT("Yükle mm"); LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Segment/Sn"); - LSTR MSG_DRAW_MIN_X = _UxGT("Draw Min X"); - LSTR MSG_DRAW_MAX_X = _UxGT("Draw Max X"); - LSTR MSG_DRAW_MIN_Y = _UxGT("Draw Min Y"); - LSTR MSG_DRAW_MAX_Y = _UxGT("Draw Max Y"); + LSTR MSG_DRAW_MIN_X = _UxGT("Min X Çiz"); + LSTR MSG_DRAW_MAX_X = _UxGT("Max X Çiz"); + LSTR MSG_DRAW_MIN_Y = _UxGT("Min Y Çİz"); + LSTR MSG_DRAW_MAX_Y = _UxGT("Max Y Çiz"); LSTR MSG_MAX_BELT_LEN = _UxGT("Max Kayış Boyu"); - LSTR MSG_ADVANCE_K = _UxGT("K İlerlet"); - LSTR MSG_ADVANCE_K_E = _UxGT("K İlerlet *"); + LSTR MSG_LINEAR_ADVANCE = _UxGT("Doğrusal İlerleme"); + LSTR MSG_ADVANCE_K = _UxGT("K. Değeri"); + LSTR MSG_ADVANCE_K_E = _UxGT("K. Değeri *"); LSTR MSG_CONTRAST = _UxGT("LCD Kontrast"); LSTR MSG_BRIGHTNESS = _UxGT("LCD Parlaklığı"); LSTR MSG_SCREEN_TIMEOUT = _UxGT("LCD Zaman Aşımı (m)"); + LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Nozul Isı Grafiği"); + LSTR MSG_BED_TEMP_GRAPH = _UxGT("Tablo Isı Grafiği"); LSTR MSG_BRIGHTNESS_OFF = _UxGT("Arka Işık Kapalı"); LSTR MSG_STORE_EEPROM = _UxGT("Hafızaya Al"); LSTR MSG_LOAD_EEPROM = _UxGT("Hafızadan Yükle"); @@ -414,8 +442,9 @@ namespace LanguageNarrow_tr { LSTR MSG_ERR_EEPROM_CRC = _UxGT("Hata: EEPROM CRC"); LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Hata: EEPROM Boyutu"); LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Hata: EEPROM Sürümü"); + LSTR MSG_ERR_EEPROM_CORRUPT = _UxGT("Hata: EEPROM Bozuk"); LSTR MSG_SETTINGS_STORED = _UxGT("Ayarlar Kaydedildi"); - LSTR MSG_MEDIA_UPDATE = _UxGT("SD Güncellemesi"); + LSTR MSG_HAS_PREVIEW = _UxGT("Önizleme var"); LSTR MSG_RESET_PRINTER = _UxGT("Yazıcıyı Resetle"); LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Yenile"); LSTR MSG_INFO_SCREEN = _UxGT("Bilgi Ekranı"); @@ -456,16 +485,15 @@ namespace LanguageNarrow_tr { LSTR MSG_RESUME_PRINT = _UxGT("Baskıyı Sürdür"); LSTR MSG_STOP_PRINT = _UxGT("Baskıyı Durdur"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Kesinti Kurtarma"); - - LSTR MSG_HOST_START_PRINT = _UxGT("Host Başlatma"); + LSTR MSG_RESUME_BED_TEMP = _UxGT("Tabla Isıtmayı Sürdür"); + LSTR MSG_HOST_START_PRINT = _UxGT("Host Başlat"); 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_CONTINUE_PRINT_JOB = _UxGT("İşe Devam Et"); - LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Yazdır"); + LSTR MSG_MEDIA_MENU = _UxGT("Medyayı Yazdır"); LSTR MSG_TURN_OFF = _UxGT("Şimdi kapat"); LSTR MSG_END_LOOPS = _UxGT("Son Döngüler"); - LSTR MSG_NO_MEDIA = _UxGT("SD Kart Yok!"); LSTR MSG_DWELL = _UxGT("Uyku..."); LSTR MSG_USERWAIT = _UxGT("Devam için tıkla..."); @@ -481,7 +509,7 @@ namespace LanguageNarrow_tr { LSTR MSG_STOPPED = _UxGT("DURDURULDU. "); LSTR MSG_FWRETRACT = _UxGT("Yazılım Geri Çekme"); LSTR MSG_CONTROL_RETRACT = _UxGT("Geri Çek mm"); - LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("GÇ. Değiş mm"); LSTR MSG_CONTROL_RETRACTF = _UxGT("Geri Çekme V"); LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Atlama mm"); LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Geri Çek. mm"); @@ -498,6 +526,7 @@ namespace LanguageNarrow_tr { LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Geri Çekme Sil"); LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Geri Çekme Hızı"); LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Kafa Park"); + LSTR MSG_PARK_FAILED = _UxGT("Kafa park edilemiyor"); LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Kurtarma Hızı"); LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fan Hızı"); LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fan Süresi"); @@ -514,9 +543,11 @@ namespace LanguageNarrow_tr { LSTR MSG_FILAMENTUNLOAD = _UxGT("Filaman Çıkart"); LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Filaman Çıkart *"); LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Tümünü Çıkart"); - LSTR MSG_ATTACH_MEDIA = _UxGT("Ekle ") MEDIA_TYPE_EN; - LSTR MSG_CHANGE_MEDIA = _UxGT("Değiştir ") MEDIA_TYPE_EN; - LSTR MSG_RELEASE_MEDIA = _UxGT("Çıkart ") MEDIA_TYPE_EN; + LSTR MSG_ATTACH_MEDIA = _UxGT("Medyayı Ekle"); + LSTR MSG_ATTACH_SD_MEDIA = _UxGT("SD Kartı takın"); + LSTR MSG_ATTACH_USB_MEDIA = _UxGT("USB Sürücüyü takın"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Medyayı Değiştir"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Medyayı Çıkart"); LSTR MSG_ZPROBE_OUT = _UxGT("Z Prob Tablayı Geçti"); LSTR MSG_SKEW_FACTOR = _UxGT("Çarpıklık Faktörü"); LSTR MSG_BLTOUCH = _UxGT("BLTouch"); @@ -539,8 +570,10 @@ namespace LanguageNarrow_tr { LSTR MSG_TOUCHMI_SAVE = _UxGT("Kaydet"); LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI Aç"); LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Probe Aç"); + LSTR MSG_MANUAL_PENUP = _UxGT("Kalem yukarı"); + LSTR MSG_MANUAL_PENDOWN = _UxGT("Kalem aşağı"); LSTR MSG_MANUAL_STOW = _UxGT("Z-Probe Kapat"); - LSTR MSG_HOME_FIRST = _UxGT("Önce %s%s%s Sıfırla"); + LSTR MSG_HOME_FIRST = _UxGT("Önce %s Sıfırla"); LSTR MSG_ZPROBE_SETTINGS = _UxGT("Prob Ayarları"); LSTR MSG_ZPROBE_OFFSETS = _UxGT("Prob Ofsetleri"); LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofset"); @@ -561,8 +594,8 @@ namespace LanguageNarrow_tr { LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ISI SORUNU"); LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("SICAKLIK ARIZASI"); LSTR MSG_ERR_COOLING_FAILED = _UxGT("Soğutma Başarısız"); - LSTR MSG_ERR_MAXTEMP = _UxGT("Hata: MAX.SICAKLIK"); - LSTR MSG_ERR_MINTEMP = _UxGT("Hata: MIN.SICAKLIK"); + LSTR MSG_ERR_MAXTEMP = _UxGT("HATA:MAX.SICAK."); + LSTR MSG_ERR_MINTEMP = _UxGT("HATA:MIN.SICAK."); LSTR MSG_HALTED = _UxGT("YAZICI DURDURULDU"); LSTR MSG_PLEASE_WAIT = _UxGT("Lütfen bekleyin..."); LSTR MSG_PLEASE_RESET = _UxGT("Lütfen Resetleyin"); @@ -571,12 +604,14 @@ namespace LanguageNarrow_tr { LSTR MSG_COOLING = _UxGT("Soğuyor..."); LSTR MSG_BED_HEATING = _UxGT("Tabla Isınıyor..."); LSTR MSG_BED_COOLING = _UxGT("Tabla Soğuyor..."); + LSTR MSG_BED_ANNEALING = _UxGT("Tavlama..."); LSTR MSG_PROBE_HEATING = _UxGT("Prob ısınıyor..."); LSTR MSG_PROBE_COOLING = _UxGT("Prob Soğuyor..."); LSTR MSG_CHAMBER_HEATING = _UxGT("Kabin Isınıyor..."); LSTR MSG_CHAMBER_COOLING = _UxGT("Kabin Soğuyor..."); LSTR MSG_LASER_COOLING = _UxGT("Lazer Soğuyor..."); LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrasyonu"); + LSTR MSG_DELTA_CALIBRATION_IN_PROGRESS = _UxGT("Delta Kalibrasyonu sürüyor"); LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Ayarla X"); LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Ayarla Y"); LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Ayarla Z"); @@ -595,6 +630,7 @@ namespace LanguageNarrow_tr { LSTR MSG_MESH_LEVELING = _UxGT("Mesh Seviyeleme"); LSTR MSG_MESH_DONE = _UxGT("Mesh sondalama tamam"); LSTR MSG_INFO_STATS_MENU = _UxGT("İstatistikler"); + LSTR MSG_RESET_STATS = _UxGT("Yazdırma istatistik Sıfırla?"); LSTR MSG_INFO_BOARD_MENU = _UxGT("Kontrolcü Bilgisi"); LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistörler"); LSTR MSG_INFO_EXTRUDERS = _UxGT("Ekstruderler"); @@ -603,11 +639,14 @@ namespace LanguageNarrow_tr { LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Kaçak İzleme: KAPALI"); LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Kaçak İzleme: AÇIK"); LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Boşta Zamn Aş"); + LSTR MSG_HOTEND_IDLE_DISABLE = _UxGT("Zaman Aşımı Pasif"); + LSTR MSG_HOTEND_IDLE_NOZZLE_TARGET = _UxGT("Meme Boşta Isısı"); + LSTR MSG_HOTEND_IDLE_BED_TARGET = _UxGT("Tabla Boşta Isısı"); LSTR MSG_FAN_SPEED_FAULT = _UxGT("Fan hızı hatası"); - LSTR MSG_CASE_LIGHT = _UxGT("Aydınlatmayı Aç"); + LSTR MSG_CASE_LIGHT = _UxGT("Aydınlatma"); LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Işık Parlaklğı"); - LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Yanlış Yazıcı"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("HATALI YAZICI"); LSTR MSG_COLORS_GET = _UxGT("Renk Al"); LSTR MSG_COLORS_SELECT = _UxGT("Renkleri Seç"); @@ -643,11 +682,11 @@ namespace LanguageNarrow_tr { LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("FILAMAN YüKLE"); LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("FILAMAN ÇIKART"); LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Seçenekler:"); - LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Daha Fazla Tasviye"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Daha Fazla Temizle"); LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Baskıyı sürdür"); LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Temizle veya Devam?"); LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozul: "); - LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout Sensörü"); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Fil. Sensörü"); LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Aşınma Farkı mm"); LSTR MSG_RUNOUT_ENABLE = _UxGT("Fil. Sens. Aç"); LSTR MSG_RUNOUT_ACTIVE = _UxGT("Fil. Sens. Aktif"); @@ -669,14 +708,15 @@ namespace LanguageNarrow_tr { LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Filaman Çıkart"); LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Filaman Çıkart ~"); LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Filamenti Boşalt"); - LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Fil. Yükleniyor %i..."); - LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Fil Çıkartılıyor. ..."); - LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Fil. Boşaltılıyor...."); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("%i Filaman Yükle..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Filaman Çek..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Filaman Boşalt...."); LSTR MSG_MMU2_ALL = _UxGT("Tümü"); LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filaman ~"); LSTR MSG_MMU2_RESET = _UxGT("MMU Resetle"); - LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetleniyot..."); - LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kaldır, tıkla"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetleniyor..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("MMU2 Eject Recover"); + LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Kaldır ve tıkla..."); LSTR MSG_MIX = _UxGT("Karışım"); LSTR MSG_MIX_COMPONENT_N = _UxGT("Bileşen {"); @@ -717,9 +757,7 @@ namespace LanguageNarrow_tr { LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Kaydetmeyi Unutma!"); LSTR MSG_PASSWORD_REMOVED = _UxGT("Şifre Kaldırıldı"); - // // Filament Değişim ekranları 3 satırlı ekranda 2 satıra kadar - // LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Sürdürmek İçin Tıkla")); LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Park Ediliyor...")); LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Lütfen bekleyiniz...")); @@ -731,9 +769,12 @@ namespace LanguageNarrow_tr { LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Temizleniyor...")); LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Bitirmek için Tıkla")); LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Sürdürülüyor...")); - LSTR MSG_TMC_DRIVERS = _UxGT("TMC Sürücüleri"); LSTR MSG_TMC_CURRENT = _UxGT("Sürücü Akımı"); + LSTR MSG_TMC_ACURRENT = STR_A _UxGT("Sürücü Akımı"); + LSTR MSG_TMC_BCURRENT = STR_B _UxGT("Sürücü Akımı"); + LSTR MSG_TMC_CCURRENT = STR_C _UxGT("Sürücü Akımı"); + LSTR MSG_TMC_ECURRENT = _UxGT("E Sürücü Akımı"); LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hibrit Eşiği"); LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensörsüz Sıfırlama"); LSTR MSG_TMC_STEPPING_MODE = _UxGT("Adım Modu"); @@ -744,6 +785,26 @@ namespace LanguageNarrow_tr { LSTR MSG_BACKLASH_CORRECTION = _UxGT("Düzeltme"); LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Yumuşatma"); + LSTR MSG_FIXED_TIME_MOTION = _UxGT("Sabit Zamanlı Hareket"); + LSTR MSG_FTM_MODE = _UxGT("Hareket Modu:"); + LSTR MSG_FTM_ZV = _UxGT("ZV"); + LSTR MSG_FTM_ZVD = _UxGT("ZVD"); + LSTR MSG_FTM_ZVDD = _UxGT("ZVDD"); + LSTR MSG_FTM_ZVDDD = _UxGT("ZVDDD"); + LSTR MSG_FTM_EI = _UxGT("EI"); + LSTR MSG_FTM_2HEI = _UxGT("2HEI"); + LSTR MSG_FTM_3HEI = _UxGT("3HEI"); + LSTR MSG_FTM_MZV = _UxGT("MZV"); + //LSTR MSG_FTM_ULENDO_FBS = _UxGT("Ulendo FBS"); + //LSTR MSG_FTM_DISCTF = _UxGT("DISCTF"); + LSTR MSG_FTM_DYN_MODE = _UxGT("DF Modu:"); + LSTR MSG_FTM_Z_BASED = _UxGT("Z-based"); + LSTR MSG_FTM_MASS_BASED = _UxGT("Mass-based"); + LSTR MSG_FTM_BASE_FREQ_N = _UxGT("@ Base Freq."); + LSTR MSG_FTM_DFREQ_K_N = _UxGT("@ Dyn. Freq."); + LSTR MSG_FTM_ZETA_N = _UxGT("@ Damping"); + LSTR MSG_FTM_VTOL_N = _UxGT("@ Vib. Level"); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Seviye X Ekseni"); LSTR MSG_AUTO_CALIBRATE = _UxGT("Otomatik Kalibre Et"); LSTR MSG_FTDI_HEATER_TIMEOUT = _UxGT("Boşta kalma zaman aşımı, sıcaklık düştü. Yeniden ısıtmak ve tekrar devam etmek için için Tamam'a basın."); @@ -779,11 +840,49 @@ namespace LanguageNarrow_tr { LSTR MSG_SHORT_DAY = _UxGT("g"); // One character only LSTR MSG_SHORT_HOUR = _UxGT("s"); // One character only LSTR MSG_SHORT_MINUTE = _UxGT("d"); // One character only + + // These strings can be the same in all languages + LSTR MSG_MARLIN = _UxGT("Marlin"); + LSTR MSG_PID_P = _UxGT("PID-P"); + LSTR MSG_PID_P_E = _UxGT("PID-P *"); + LSTR MSG_PID_I = _UxGT("PID-I"); + LSTR MSG_PID_I_E = _UxGT("PID-I *"); + LSTR MSG_PID_D = _UxGT("PID-D"); + LSTR MSG_PID_D_E = _UxGT("PID-D *"); + LSTR MSG_PID_C = _UxGT("PID-C"); + LSTR MSG_PID_C_E = _UxGT("PID-C *"); + LSTR MSG_PID_F = _UxGT("PID-F"); + LSTR MSG_PID_F_E = _UxGT("PID-F *"); + LSTR MSG_BACKLASH_N = _UxGT("@"); + + // DGUS-Specific message strings, not used elsewhere + LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Yazdırma sırasında izin verilmez"); + LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Boştayken izin verilmez"); + LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Seçili dosya yok"); + LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Sıcaklık çok düşük"); + LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Komut yürütülüyor..."); + LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("Tabla PID pasif"); + LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID devre dışı"); + LSTR DGUS_MSG_PID_AUTOTUNING = _UxGT("PID otomatik ayarlama..."); + LSTR DGUS_MSG_INVALID_RECOVERY_DATA = _UxGT("Geçersiz kurtarma verileri"); + + LSTR DGUS_MSG_HOMING_REQUIRED = _UxGT("Eve dönüş gerekli"); + LSTR DGUS_MSG_BUSY = _UxGT("Meşgul"); + LSTR DGUS_MSG_HOMING = _UxGT("Eve dönüş..."); + LSTR DGUS_MSG_FW_OUTDATED = _UxGT("DWIN GUI/OS güncelleme gerekli"); + LSTR DGUS_MSG_ABL_REQUIRED = _UxGT("Oto tabla seviyeleme gerekli"); + LSTR DGUS_MSG_PROBING_FAILED = _UxGT("Sondalama başarısız"); + LSTR DGUS_MSG_PROBING_SUCCESS = _UxGT("Sondalama başarılı"); + LSTR DGUS_MSG_RESET_EEPROM = _UxGT("EEPROM sıfırla"); + LSTR DGUS_MSG_WRITE_EEPROM_FAILED = _UxGT("EEPROM yazımı başarısız"); + LSTR DGUS_MSG_READ_EEPROM_FAILED = _UxGT("EEPROM okuma başarısız"); + LSTR DGUS_MSG_FILAMENT_RUNOUT = _UxGT("E%d Filaman Tükenme"); } namespace LanguageWide_tr { using namespace LanguageNarrow_tr; #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 + LSTR MSG_LIVE_MOVE = _UxGT("Canlı Hareket"); 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"); From 9f7d5bbc86032a646f14eb6ca246723118ae9fb0 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 19 Jan 2024 00:22:09 +0000 Subject: [PATCH 123/236] [cron] Bump distribution date (2024-01-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 a66d53a06528..539f1106290b 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 "2024-01-17" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 3b32efe2694d..3cc095cd80a9 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 "2024-01-17" + #define STRING_DISTRIBUTION_DATE "2024-01-19" #endif /** From 7d751a20b1fc6ef920cbc56a68450302ac1eb973 Mon Sep 17 00:00:00 2001 From: German Borisov Date: Fri, 19 Jan 2024 22:17:36 +0300 Subject: [PATCH 124/236] =?UTF-8?q?=E2=9C=A8=20Status=20Screen=20flow=20ad?= =?UTF-8?q?justment=20(#26627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 1 + Marlin/src/inc/Conditionals_LCD.h | 1 + Marlin/src/inc/SanityCheck.h | 4 ++++ Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 7 +++++- Marlin/src/lcd/marlinui.cpp | 28 ++++++++++++++++++++-- 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 1d7c1a7277f3..4a6882a209e1 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1474,6 +1474,7 @@ #if IS_ULTIPANEL #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen + //#define ULTIPANEL_FLOWPERCENT // Encoder sets the flow percentage on the Status Screen #endif #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 729f450147e3..8d468212ac87 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -972,6 +972,7 @@ #define DETECT_I2C_LCD_DEVICE 1 #endif +// Encoder behavior #ifndef STD_ENCODER_PULSES_PER_STEP #if ENABLED(TOUCH_SCREEN) #define STD_ENCODER_PULSES_PER_STEP 2 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index b54010f4de95..3ac16bd4ea48 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4147,6 +4147,10 @@ static_assert(WITHIN(MULTISTEPPING_LIMIT, 1, 128) && IS_POWER_OF_2(MULTISTEPPING #endif #endif +#if ALL(ULTIPANEL_FEEDMULTIPLY, ULTIPANEL_FLOWPERCENT) + #error "Only enable ULTIPANEL_FEEDMULTIPLY or ULTIPANEL_FLOWPERCENT, but not both." +#endif + // Misc. Cleanup #undef _TEST_PWM #undef _NUM_AXES_STR diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index e294d9c3df9b..636d10bbe999 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -888,7 +888,12 @@ void MarlinUI::draw_status_screen() { lcd_put_lchar(3, EXTRAS_2_BASELINE, LCD_STR_FEEDRATE[0]); set_font(FONT_STATUSMENU); - lcd_put_u8str(12, EXTRAS_2_BASELINE, i16tostr3rj(feedrate_percentage)); + + #if ENABLED(ULTIPANEL_FLOWPERCENT) + lcd_put_u8str(12, EXTRAS_2_BASELINE, i16tostr3rj(planner.flow_percentage[active_extruder])); + #else + lcd_put_u8str(12, EXTRAS_2_BASELINE, i16tostr3rj(feedrate_percentage)); + #endif lcd_put_u8str(F("%")); // diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index dfb2a8d47c06..97f15076fd55 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -700,7 +700,7 @@ void MarlinUI::init() { else new_frm = old_frm; } - else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100)) + else if ((old_frm < 100) == (new_frm > 100)) // Crossing 100? Stick at 100. new_frm = 100; LIMIT(new_frm, SPEED_EDIT_MIN, SPEED_EDIT_MAX); @@ -720,7 +720,31 @@ void MarlinUI::init() { #endif } - #endif // ULTIPANEL_FEEDMULTIPLY + #elif ENABLED(ULTIPANEL_FLOWPERCENT) + + const int16_t old_fp = planner.flow_percentage[active_extruder]; + int16_t new_fp = old_fp + int16_t(encoderPosition); + + // Dead zone at 100% flow percentage + if (old_fp == 100) { + if (int16_t(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) + new_fp -= ENCODER_FEEDRATE_DEADZONE; + else if (int16_t(encoderPosition) < -(ENCODER_FEEDRATE_DEADZONE)) + new_fp += ENCODER_FEEDRATE_DEADZONE; + else + new_fp = old_fp; + } + else if ((old_fp < 100) == (new_fp > 100)) // Crossing 100? Stick at 100. + new_fp = 100; + + LIMIT(new_fp, FLOW_EDIT_MIN, FLOW_EDIT_MAX); + + if (old_fp != new_fp) { + planner.set_flow(active_extruder, new_fp); + encoderPosition = 0; + } + + #endif // ULTIPANEL_FLOWPERCENT draw_status_screen(); } From fb49645b3233caa2701ebdab1e5322d73d3545a0 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 20 Jan 2024 08:49:35 +1300 Subject: [PATCH 125/236] =?UTF-8?q?=F0=9F=93=9D=20Fix=20Anet=20pins=20typo?= =?UTF-8?q?=20(#26660)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/sanguino/pins_ANET_10.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index 9a217d9b4e88..eeb2e92e731c 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -165,7 +165,7 @@ * (SDA) D17 | 1 2 | (A1) D30 3V3 | 1 2 | D4 (SS) J3_RX |1 2| J3_TX * (SCL) D16 | 3 4 | (A2) D29 GND | 3 4 | RESET (TXO) D9 |3 4| D8 (RX0) D8 * D11 | 5 6 (A3) D28 (MOSI) D5 | 5 6 D7 (SCK) USB_RX |5 6| USB_TX - * D10 | 7 8 | (A4) D27 D10 5V | 7 8 | D6 (MISO) ---- + * D10 | 7 8 | (A4) D27 5V | 7 8 | D6 (MISO) ---- * 5V | 9 10 | GND J3_RX | 9 10 | J3_TX * ------ ------ * LCD J3 USB_BLE From da96607b65ecc910178413d6979c128add9d098e Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Sat, 20 Jan 2024 00:38:25 +0200 Subject: [PATCH 126/236] =?UTF-8?q?=F0=9F=94=A7=20Adjust=20DEFAULT=5FEJERK?= =?UTF-8?q?=20settings=20(#26665)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 3 +-- Marlin/Configuration_adv.h | 4 +++- Marlin/src/gcode/host/M360.cpp | 6 +++++- Marlin/src/module/planner.cpp | 8 ++++++-- Marlin/src/module/settings.cpp | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6e4afa16c6a5..7e069e7d68af 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1291,6 +1291,7 @@ #define DEFAULT_XJERK 10.0 #define DEFAULT_YJERK 10.0 #define DEFAULT_ZJERK 0.3 + #define DEFAULT_EJERK 5.0 //#define DEFAULT_IJERK 0.3 //#define DEFAULT_JJERK 0.3 //#define DEFAULT_KJERK 0.3 @@ -1306,8 +1307,6 @@ #endif #endif -#define DEFAULT_EJERK 5.0 // May be used by Linear Advance - /** * Junction Deviation Factor * diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 4a6882a209e1..1126f82553fc 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2320,7 +2320,9 @@ #endif //#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L. //#define LA_DEBUG // Print debug information to serial during operation. Disable for production use. - //#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends. + #if ENABLED(CLASSIC_JERK) + //#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends. + #endif //#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz. #endif diff --git a/Marlin/src/gcode/host/M360.cpp b/Marlin/src/gcode/host/M360.cpp index 3986200e0809..8d6bb4771a0e 100644 --- a/Marlin/src/gcode/host/M360.cpp +++ b/Marlin/src/gcode/host/M360.cpp @@ -182,7 +182,11 @@ void GcodeSuite::M360() { config_line(F("NumExtruder"), EXTRUDERS); #if HAS_EXTRUDERS EXTRUDER_LOOP() { - config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK))); + #if HAS_LINEAR_E_JERK + config_line_e(e, JERK_STR, planner.max_e_jerk[E_INDEX_N(e)]); + #elif ENABLED(CLASSIC_JERK) + config_line_e(e, JERK_STR, planner.max_jerk.e); + #endif config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]); config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]); config_line_e(e, F("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e])); diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 6371a960a7d1..0ace6e32ced8 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -3386,8 +3386,12 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { #ifdef MAX_JERK_EDIT_VALUES MAX_JERK_EDIT_VALUES #else - { (DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2, - (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 } + LOGICAL_AXIS_ARRAY( + (DEFAULT_EJERK) * 2, + (DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2, (DEFAULT_ZJERK) * 2, + (DEFAULT_IJERK) * 2, (DEFAULT_JJERK) * 2, (DEFAULT_KJERK) * 2, + (DEFAULT_UJERK) * 2, (DEFAULT_VJERK) * 2, (DEFAULT_WJERK) * 2 + ) #endif ; limit_and_warn(inMaxJerkMMS, axis, F("Jerk"), max_jerk_edit); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index da62a4278199..6a20488f6dfb 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -856,7 +856,7 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(dummyf); #endif #else - const xyze_pos_t planner_max_jerk = LOGICAL_AXIS_ARRAY(float(DEFAULT_EJERK), 10, 10, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4); + const xyze_pos_t planner_max_jerk = LOGICAL_AXIS_ARRAY(5, 10, 10, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4); EEPROM_WRITE(planner_max_jerk); #endif From 388c7018c44036ee75af9dac39f2f0b386bf7089 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 20 Jan 2024 00:21:13 +0000 Subject: [PATCH 127/236] [cron] Bump distribution date (2024-01-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 539f1106290b..bdecf7b0866a 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 "2024-01-19" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 3cc095cd80a9..1e26c29e7c3d 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 "2024-01-19" + #define STRING_DISTRIBUTION_DATE "2024-01-20" #endif /** From d7e45367afaf6a6007b6a89ff7eeefe5fa0c59ff Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 20 Jan 2024 19:24:30 +1300 Subject: [PATCH 128/236] =?UTF-8?q?=F0=9F=94=A8=20Fix=20POLAR=20build=20(#?= =?UTF-8?q?26687)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/features.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/ini/features.ini b/ini/features.ini index 8e0cb964f18b..4baa2566f04d 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -365,6 +365,7 @@ NEED_LSF = build_src_filter=+ + NOZZLE_CLEAN_FEATURE = build_src_filter=+ + DELTA = build_src_filter=+ + +POLAR = build_src_filter=+ POLARGRAPH = build_src_filter=+ BEZIER_CURVE_SUPPORT = build_src_filter=+ + PRINTCOUNTER = build_src_filter=+ From eb7b207e4c63e17c2e63e89c30a1e1ea7c04cfa3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 21 Jan 2024 00:24:10 +0000 Subject: [PATCH 129/236] [cron] Bump distribution date (2024-01-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 bdecf7b0866a..66b57bf455e6 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 "2024-01-20" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 1e26c29e7c3d..3f0abecc28e5 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 "2024-01-20" + #define STRING_DISTRIBUTION_DATE "2024-01-21" #endif /** From 3adf73a2cd45556859a6499bf2ed27509e49f0ff Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 20 Jan 2024 21:47:26 -0800 Subject: [PATCH 130/236] =?UTF-8?q?=F0=9F=94=A5=20Remove=20ALLOW=5FLOW=5FE?= =?UTF-8?q?JERK=20(#26712)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 3 --- Marlin/src/inc/Changes.h | 2 ++ Marlin/src/inc/SanityCheck.h | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 1126f82553fc..1f22c6d7a501 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2320,9 +2320,6 @@ #endif //#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L. //#define LA_DEBUG // Print debug information to serial during operation. Disable for production use. - #if ENABLED(CLASSIC_JERK) - //#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends. - #endif //#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz. #endif diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 0fd91ee9ca13..47f23babb25a 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -82,6 +82,8 @@ #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(ALLOW_LOW_EJERK) + #error "ALLOW_LOW_EJERK is deprecated and should be removed." #elif defined(XY_TRAVEL_SPEED) #error "XY_TRAVEL_SPEED is now XY_PROBE_FEEDRATE." #elif defined(XY_PROBE_SPEED) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 3ac16bd4ea48..69da2f79d8cd 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -828,8 +828,6 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #if ENABLED(DIRECT_STEPPING) #error "DIRECT_STEPPING is incompatible with LIN_ADVANCE. (Extrusion is controlled externally by the Step Daemon.)" - #elif NONE(HAS_JUNCTION_DEVIATION, ALLOW_LOW_EJERK) && defined(DEFAULT_EJERK) - static_assert(DEFAULT_EJERK >= 10, "It is strongly recommended to set DEFAULT_EJERK >= 10 when using LIN_ADVANCE. Enable ALLOW_LOW_EJERK to bypass this alert (e.g., for direct drive)."); #endif #endif From 624226c91d23941ac8fe2bd8c3a20bb364e6393a Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon, 22 Jan 2024 00:09:36 +1300 Subject: [PATCH 131/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20STM32=20CPU=20seri?= =?UTF-8?q?al=20UUID=20(#26715)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/core/language.h | 4 -- Marlin/src/gcode/host/M115.cpp | 38 +++++++++++-------- Marlin/src/inc/Conditionals_adv.h | 5 --- Marlin/src/inc/Conditionals_post.h | 12 ++++++ Marlin/src/libs/hex_print.cpp | 30 +++++++-------- Marlin/src/libs/hex_print.h | 8 +++- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h | 4 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h | 5 +++ buildroot/tests/Opulo_Lumen_REV3 | 1 + 9 files changed, 64 insertions(+), 43 deletions(-) diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 645725237b44..82ed6cc549b2 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -89,10 +89,6 @@ #define MACHINE_NAME DEFAULT_MACHINE_NAME #endif -#ifndef MACHINE_UUID - #define MACHINE_UUID DEFAULT_MACHINE_UUID -#endif - #define MARLIN_WEBSITE_URL "marlinfw.org" //#if !defined(STRING_SPLASH_LINE3) && defined(WEBSITE_URL) diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index d1571d58ac9e..cd2bcb0f94f0 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -35,7 +35,7 @@ #include "../../feature/caselight.h" #endif -#if ENABLED(HAS_STM32_UID) && !defined(MACHINE_UUID) +#if !defined(MACHINE_UUID) && HAS_STM32_UID #include "../../libs/hex_print.h" #endif @@ -62,6 +62,7 @@ * at https://reprap.org/wiki/Firmware_Capabilities_Protocol */ void GcodeSuite::M115() { + SERIAL_ECHOPGM("FIRMWARE_NAME:Marlin" " " DETAILED_BUILD_VERSION " (" __DATE__ " " __TIME__ ")" " SOURCE_CODE_URL:" SOURCE_CODE_URL @@ -71,24 +72,31 @@ void GcodeSuite::M115() { #if NUM_AXES != XYZ " AXIS_COUNT:" STRINGIFY(NUM_AXES) #endif + #if defined(MACHINE_UUID) || HAS_STM32_UID + " UUID:" + #endif #ifdef MACHINE_UUID - " UUID:" MACHINE_UUID + MACHINE_UUID #endif ); - // STM32UID:111122223333 - #if ENABLED(HAS_STM32_UID) && !defined(MACHINE_UUID) - // STM32 based devices output the CPU device serial number - // Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations - // https://github.com/opulo-inc/lumenpnp - // Although this code should work on all STM32 based boards - SERIAL_ECHOPGM(" UUID:"); - uint32_t *uid_address = (uint32_t*)UID_BASE; - for (uint8_t i = 0; i < 3; ++i) { - const uint32_t UID = uint32_t(READ_REG(*(uid_address))); - uid_address += 4U; - for (int B = 24; B >= 0; B -= 8) print_hex_byte(UID >> B); - } + #if !defined(MACHINE_UUID) && HAS_STM32_UID + /** + * STM32-based devices have a 96-bit CPU device serial number. + * Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations. + * https://github.com/opulo-inc/lumenpnp + * This code should work on all STM32-based boards. + */ + #if ENABLED(STM32_UID_SHORT_FORM) + uint32_t * const UID = (uint32_t*)UID_BASE; + SERIAL_ECHO(hex_long(UID[0]), hex_long(UID[1]), hex_long(UID[2])); + #else + uint16_t * const UID = (uint16_t*)UID_BASE; + SERIAL_ECHO( + F("CEDE2A2F-"), hex_word(UID[0]), '-', hex_word(UID[1]), '-', hex_word(UID[2]), '-', + hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5]) + ); + #endif #endif SERIAL_EOL(); diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 20b357c9e31e..9f182a108d8f 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1243,11 +1243,6 @@ #define NO_EEPROM_SELECTED 1 #endif -// Flag whether hex_print.cpp is used -#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER, M20_TIMESTAMP_SUPPORT) - #define NEED_HEX_PRINT 1 -#endif - // Flags for Case Light having a color property or a single pin #if ENABLED(CASE_LIGHT_ENABLE) #if ANY(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 076b1301d5e3..a344d6183d8f 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3417,3 +3417,15 @@ FIL_RUNOUT5_PULLDOWN, FIL_RUNOUT6_PULLDOWN, FIL_RUNOUT7_PULLDOWN, FIL_RUNOUT8_PULLDOWN) #define USING_PULLDOWNS 1 #endif + +// Machine UUID can come from STM32 CPU Serial Number +#ifdef MACHINE_UUID + #undef HAS_STM32_UID +#elif !HAS_STM32_UID && defined(DEFAULT_MACHINE_UUID) + #define MACHINE_UUID DEFAULT_MACHINE_UUID +#endif + +// Flag whether hex_print.cpp is needed +#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER, M20_TIMESTAMP_SUPPORT, HAS_STM32_UID) + #define NEED_HEX_PRINT 1 +#endif diff --git a/Marlin/src/libs/hex_print.cpp b/Marlin/src/libs/hex_print.cpp index 1958084abb2d..b9edc38c7778 100644 --- a/Marlin/src/libs/hex_print.cpp +++ b/Marlin/src/libs/hex_print.cpp @@ -20,7 +20,7 @@ * */ -#include "../inc/MarlinConfigPre.h" +#include "../inc/MarlinConfig.h" #if NEED_HEX_PRINT @@ -41,28 +41,26 @@ char* hex_byte(const uint8_t b) { return &_hex[byte_start + 4]; } -inline void _hex_word(const uint16_t w) { +inline void __hex_word(const uint16_t w) { _hex[byte_start + 2] = hex_nybble(w >> 12); _hex[byte_start + 3] = hex_nybble(w >> 8); _hex[byte_start + 4] = hex_nybble(w >> 4); _hex[byte_start + 5] = hex_nybble(w); } -char* hex_word(const uint16_t w) { - _hex_word(w); +char* _hex_word(const uint16_t w) { + __hex_word(w); return &_hex[byte_start + 2]; } -#ifdef CPU_32_BIT - char* hex_long(const uintptr_t l) { - _hex[2] = hex_nybble(l >> 28); - _hex[3] = hex_nybble(l >> 24); - _hex[4] = hex_nybble(l >> 20); - _hex[5] = hex_nybble(l >> 16); - _hex_word((uint16_t)(l & 0xFFFF)); - return &_hex[2]; - } -#endif +char* _hex_long(const uintptr_t l) { + _hex[2] = hex_nybble(l >> 28); + _hex[3] = hex_nybble(l >> 24); + _hex[4] = hex_nybble(l >> 20); + _hex[5] = hex_nybble(l >> 16); + __hex_word((uint16_t)(l & 0xFFFF)); + return &_hex[2]; +} char* hex_address(const void * const w) { #ifdef CPU_32_BIT @@ -78,11 +76,11 @@ void print_hex_byte(const uint8_t b) { SERIAL_ECHO(hex_byte(b)); } void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); } void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); } -void print_hex_long(const uint32_t w, const char delimiter) { +void print_hex_long(const uint32_t w, const char delimiter/*='\0'*/) { SERIAL_ECHOPGM("0x"); for (int B = 24; B >= 8; B -= 8) { print_hex_byte(w >> B); - SERIAL_CHAR(delimiter); + if (delimiter) SERIAL_CHAR(delimiter); } print_hex_byte(w); } diff --git a/Marlin/src/libs/hex_print.h b/Marlin/src/libs/hex_print.h index 0baae15bd36f..2278ec2c248e 100644 --- a/Marlin/src/libs/hex_print.h +++ b/Marlin/src/libs/hex_print.h @@ -31,11 +31,15 @@ constexpr char hex_nybble(const uint8_t n) { return (n & 0xF) + ((n & 0xF) < 10 ? '0' : 'A' - 10); } char* hex_byte(const uint8_t b); -char* hex_word(const uint16_t w); +char* _hex_word(const uint16_t w); char* hex_address(const void * const w); +char* _hex_long(const uintptr_t l); + +template char* hex_word(T w) { return hex_word((uint16_t)w); } +template char* hex_long(T w) { return hex_long((uint32_t)w); } void print_hex_nybble(const uint8_t n); void print_hex_byte(const uint8_t b); void print_hex_word(const uint16_t w); void print_hex_address(const void * const w); -void print_hex_long(const uint32_t w, const char delimiter); +void print_hex_long(const uint32_t w, const char delimiter='\0'); diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index 5802c0724136..dc907cd5b750 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -44,8 +44,10 @@ // I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC) #define HAS_MCP3426_ADC + +// Opulo Lumen uses the CPU serial number #ifdef STM32F4 - #define HAS_STM32_UID + #define HAS_STM32_UID 1 #endif // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index 1697cf000e6e..3c59f521d5df 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -45,6 +45,11 @@ // I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC) #define HAS_MCP3426_ADC +// Opulo Lumen uses the CPU serial number +#ifdef STM32F4 + #define HAS_STM32_UID 1 +#endif + // // Servos // diff --git a/buildroot/tests/Opulo_Lumen_REV3 b/buildroot/tests/Opulo_Lumen_REV3 index ddd8e1f3c9aa..f12f69011e78 100755 --- a/buildroot/tests/Opulo_Lumen_REV3 +++ b/buildroot/tests/Opulo_Lumen_REV3 @@ -7,6 +7,7 @@ set -e use_example_configs Opulo/Lumen_REV3 +opt_disable TMC_DEBUG exec_test $1 $2 "Opulo Lumen REV3 Pick-and-Place" "$3" # cleanup From 80cd89d8f7f656be4e190c2c97064966905ce8a9 Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Sun, 21 Jan 2024 13:11:03 +0200 Subject: [PATCH 132/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20M592=20report=20(#?= =?UTF-8?q?26680)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/nonlinear/M592.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/feature/nonlinear/M592.cpp b/Marlin/src/gcode/feature/nonlinear/M592.cpp index dc8c1e1e588e..792bb9b91200 100644 --- a/Marlin/src/gcode/feature/nonlinear/M592.cpp +++ b/Marlin/src/gcode/feature/nonlinear/M592.cpp @@ -29,7 +29,7 @@ void GcodeSuite::M592_report(const bool forReplay/*=true*/) { report_heading(forReplay, F(STR_NONLINEAR_EXTRUSION)); - SERIAL_ECHOLNPGM(" M593 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C); + SERIAL_ECHOLNPGM(" M592 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C); } /** @@ -43,6 +43,8 @@ void GcodeSuite::M592_report(const bool forReplay/*=true*/) { * Only adjusts forward extrusions, since those are the ones affected by backpressure. */ void GcodeSuite::M592() { + if (!parser.seen_any()) return M592_report(); + if (parser.seenval('A')) stepper.ne.A = parser.value_float(); if (parser.seenval('B')) stepper.ne.B = parser.value_float(); if (parser.seenval('C')) stepper.ne.C = parser.value_float(); From 204de723f1c08f83e281f0629b60822b334097ed Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 21 Jan 2024 04:01:25 -0800 Subject: [PATCH 133/236] =?UTF-8?q?=E2=9C=A8=20BIQU=20MicroProbe=20(#26527?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 11 ++++ Marlin/src/core/utility.cpp | 2 + Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/inc/SanityCheck.h | 51 ++++++++++++++++++- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 7 +++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 7 +++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 7 +++ Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 7 +++ Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 7 +++ .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 7 +++ Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 7 +++ Marlin/src/pins/ramps/pins_K8400.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 7 +++ .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 7 +++ .../pins/stm32f1/pins_CREALITY_V24S1_301.h | 7 +++ Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h | 5 ++ Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 7 +++ Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 7 +++ Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 7 +++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 7 +++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 7 +++ .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 7 +++ .../src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 7 +++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 7 +++ .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 7 +++ .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 7 +++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 7 +++ Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 7 +++ Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 7 +++ .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 7 +++ .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 7 +++ .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 7 +++ .../pins/stm32f4/pins_CREALITY_CR4NTXXC10.h | 7 +++ .../src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h | 6 +-- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 7 +++ Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h | 15 ++++-- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 7 +++ .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 7 +++ Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 7 +++ .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 7 +++ .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 7 +++ .../stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h | 7 +++ .../pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 7 +++ 43 files changed, 327 insertions(+), 12 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7e069e7d68af..4fd27c956cc3 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1446,6 +1446,17 @@ //#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point #endif +/** + * BIQU MicroProbe + * + * A lightweight, solenoid-driven probe. + * For information about this sensor https://github.com/bigtreetech/MicroProbe + * + * Also requires: PROBE_ENABLE_DISABLE + */ +//#define BIQU_MICROPROBE_V1 // Triggers HIGH +//#define BIQU_MICROPROBE_V2 // Triggers LOW + // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) //#define SOLENOID_PROBE diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp index 8476591d4b0e..b555d9f2a69b 100644 --- a/Marlin/src/core/utility.cpp +++ b/Marlin/src/core/utility.cpp @@ -80,6 +80,8 @@ void safe_delay(millis_t ms) { TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY") TERN_(SOLENOID_PROBE, "SOLENOID_PROBE") TERN_(MAGLEV4, "MAGLEV4") + TERN_(BIQU_MICROPROBE_V1, "BIQU_MICROPROBE_V1") + TERN_(BIQU_MICROPROBE_V2, "BIQU_MICROPROBE_V2") IF_DISABLED(PROBE_SELECTED, "NONE") ); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 8d468212ac87..2c7420045531 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1169,7 +1169,7 @@ /** * Set flags for any form of bed probe */ -#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, HAS_Z_SERVO_PROBE, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE) +#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, HAS_Z_SERVO_PROBE, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2) #define HAS_STOWABLE_PROBE 1 #endif #if ANY(HAS_STOWABLE_PROBE, FIX_MOUNTED_PROBE, BD_SENSOR, NOZZLE_AS_PROBE) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 69da2f79d8cd..eaba158da898 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1206,8 +1206,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i */ #if 1 < 0 \ + (DISABLED(BLTOUCH) && HAS_Z_SERVO_PROBE) \ - + COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE) - #error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE or Z Servo." + + COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2) + #error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2, or Z Servo." #endif #if HAS_BED_PROBE @@ -1375,6 +1375,53 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #endif #endif + /** + * BIQU MicroProbe requirements + */ + #if ANY(BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2) + #if DISABLED(PROBE_ENABLE_DISABLE) + #error "BIQU MicroProbe requires PROBE_ENABLE_DISABLE." + #elif !PIN_EXISTS(PROBE_ENABLE) + #error "BIQU MicroProbe requires a PROBE_ENABLE_PIN." + #endif + + #if ENABLED(BIQU_MICROPROBE_V1) + #if ENABLED(INVERTED_PROBE_STATE) + #if Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW + #error "BIQU_MICROPROBE_V1 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE LOW." + #endif + #elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != HIGH + #error "BIQU_MICROPROBE_V1 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_HIT_STATE != LOW + #error "BIQU_MICROPROBE_V1 requires Z_MIN_ENDSTOP_HIT_STATE LOW." + #endif + #elif Z_MIN_ENDSTOP_HIT_STATE != HIGH + #error "BIQU_MICROPROBE_V1 requires Z_MIN_ENDSTOP_HIT_STATE HIGH." + #endif + #endif + #elif ENABLED(BIQU_MICROPROBE_V2) + #if ENABLED(INVERTED_PROBE_STATE) + #if Z_MIN_PROBE_ENDSTOP_HIT_STATE != HIGH + #error "BIQU_MICROPROBE_V2 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH." + #endif + #elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW + #error "BIQU_MICROPROBE_V2 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE LOW." + #endif + #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #if ENABLED(INVERTED_PROBE_STATE) + #if Z_MIN_ENDSTOP_HIT_STATE != HIGH + #error "BIQU_MICROPROBE_V2 requires Z_MIN_ENDSTOP_HIT_STATE HIGH." + #endif + #elif Z_MIN_ENDSTOP_HIT_STATE != LOW + #error "BIQU_MICROPROBE_V2 requires Z_MIN_ENDSTOP_HIT_STATE LOW." + #endif + #endif + #endif + #endif // BIQU_MICROPROBE_V1 || BIQU_MICROPROBE_V2 + /** * Require pin options and pins to be defined */ diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 69afcc1aeb73..5ad4e525c09d 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -53,6 +53,13 @@ #define Z_STOP_PIN 22 //#define FIL_RUNOUT_PIN 35 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Enable I2S stepper stream // 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 35d9697ba4cc..687ca340b3a8 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -96,6 +96,13 @@ #define Z_MIN_PROBE_PIN P1_24 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 829e0edd60ca..956f9a798103 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -134,6 +134,13 @@ #define Z_MIN_PROBE_PIN P0_10 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index a4150aa22f21..1e45286fbf85 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -63,6 +63,13 @@ #define Z_MIN_PROBE_PIN P4_28 // Connector J8 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index e507f7b7fa24..8e87ce4d886d 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -95,6 +95,13 @@ #define Z_MIN_PROBE_PIN P1_24 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 966ff5ef957f..6d2018ef352b 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -66,6 +66,13 @@ #define Z_MIN_PROBE_PIN P1_22 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 b431f3358268..4043f868cff3 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -103,6 +103,13 @@ #define Z_MIN_PROBE_PIN P1_24 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h index abcffe484d5e..048b9656c4af 100644 --- a/Marlin/src/pins/ramps/pins_K8400.h +++ b/Marlin/src/pins/ramps/pins_K8400.h @@ -58,7 +58,7 @@ // #define FAN0_PIN 8 -#if ANY(BLTOUCH, TOUCH_MI_PROBE) +#if ANY(BLTOUCH, TOUCH_MI_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2) #define INVERTED_PROBE_STATE #endif 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 b36ef2287aca..654fc04a86c2 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -55,6 +55,13 @@ // #define Z_MIN_PROBE_PIN PC14 // PROBE +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 4ab1e15cdd63..f8eb653339ed 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 @@ -55,6 +55,13 @@ // #define Z_MIN_PROBE_PIN PC14 // PROBE +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h index a99143bad976..584d7661f81a 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h @@ -60,6 +60,13 @@ #define Z_MIN_PROBE_PIN PC14 // BLTouch IN #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index 61207f90b03e..6f178c758105 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -63,11 +63,16 @@ #define Y_STOP_PIN PC5 #define Z_STOP_PIN PC15 +// +// Probe +// #if ENABLED(BLTOUCH) #define SERVO0_PIN PC14 // BLTouch OUT PIN #elif ENABLED(PROBE_ACTIVATION_SWITCH) #define PROBE_TARE_PIN PC14 #define PROBE_ACTIVATION_SWITCH_PIN PB2 +#elif ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN PC14 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 96b3007ca650..bd6ba086f774 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -92,6 +92,13 @@ #define Z_MIN_PROBE_PIN PB1 // BLTouch IN #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 2e0de876410b..21503bd1e0e1 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -76,6 +76,13 @@ #define Z_MIN_PROBE_PIN PA5 // BLTouch IN #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index 2660b6e50518..2116aad8e9ed 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -77,6 +77,13 @@ #define Z_MIN_PROBE_PIN PD12 // BLTouch IN #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index a1ca477857da..49c28c57bf1a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -76,6 +76,13 @@ #define Z_MIN_PIN PA4 #define Z_MAX_PIN PF7 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index b934e06b60d0..c6aeec979011 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -80,6 +80,13 @@ #define Z_MIN_PIN PA11 #define Z_MAX_PIN PC4 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 c3becd3fa1aa..0557992a83e6 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -64,6 +64,13 @@ #define Z_MIN_PROBE_PIN PB1 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index 03be44bba64a..1b3d80bef2b9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -54,6 +54,13 @@ #define Z_MIN_PIN PC6 #define Z_MAX_PIN PB1 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index a4c5ca767e3a..2d1bd7c8cafb 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -71,6 +71,13 @@ #define FIL_RUNOUT_PIN PA4 // MT_DET #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 c28c3d4b89fe..82eb079e1db7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -83,6 +83,13 @@ #define Z_MIN_PIN PA11 #define Z_MAX_PIN PC4 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 28c96e907018..c280915405f9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -69,6 +69,13 @@ #define Z_MIN_PIN PB11 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 47863d3ffa5e..35bf1824210e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -60,6 +60,13 @@ #define Z_MIN_PIN PA11 #define Z_MAX_PIN PC4 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 4350fad7f78f..4b05672fb05a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -59,6 +59,13 @@ // #define Z_MIN_PROBE_PIN PC5 // PROBE +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 2414c07ae363..5444842aa229 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -127,6 +127,13 @@ #define Z_MIN_PROBE_PIN PH11 // Z Probe must be PH11 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 855e94c72dc3..5a92d9729390 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -120,6 +120,13 @@ #define Z_MIN_PROBE_PIN PB7 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 64ab2dd6c9e8..5904186fd072 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 @@ -69,6 +69,13 @@ // #define Z_MIN_PROBE_PIN PA1 // PROBE +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 f1129194f798..e80344c2e25a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -113,6 +113,13 @@ #define Z_MIN_PROBE_PIN PA2 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h index d25cd6c17e42..e1cd5945a6e2 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -86,6 +86,13 @@ #define Z_MIN_PROBE_PIN PB1 // BLTouch IN #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h b/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h index 39073bffceca..4aced54b10db 100644 --- a/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h @@ -96,10 +96,8 @@ // // Probe enable // -#if ENABLED(PROBE_ENABLE_DISABLE) - #ifndef PROBE_ENABLE_PIN - #define PROBE_ENABLE_PIN SERVO0_PIN - #endif +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN #endif // diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 5b5c4fea8789..49650299276a 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -67,6 +67,13 @@ #define Z_MIN_PIN PB13 #define Z_MAX_PIN PB12 +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h index b85b2357d3af..15f5d366347d 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h @@ -37,6 +37,13 @@ #define SRAM_EEPROM_EMULATION +// +// Servos +// +#define SERVO0_PIN PB0 // XS2-5 +#define SERVO1_PIN PF7 // XS1-5 +#define SERVO2_PIN PF8 // XS1-6 + // // Limit Switches // @@ -48,11 +55,11 @@ #define Z_MAX_PIN PG3 // -// Servos +// Probe enable // -#define SERVO0_PIN PB0 // XS2-5 -#define SERVO1_PIN PF7 // XS1-5 -#define SERVO2_PIN PF8 // XS1-6 +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif // // Steppers 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 d096b3b3d873..b4e9cabd905c 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 @@ -64,6 +64,13 @@ #define Z_MIN_PIN Z_DIAG_PIN #define Z_MAX_PIN E0_DIAG_PIN +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 5135abf9f107..ecc5e60d3b35 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -74,6 +74,13 @@ #define FIL_RUNOUT_PIN PA4 // MT_DET #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 3ff29e6862d4..49291b234402 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -101,6 +101,13 @@ #endif #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // 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 a51676846271..c5e0623f1847 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 @@ -63,6 +63,13 @@ // #define Z_MIN_PROBE_PIN PC14 // PROBE +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 6c081f9b56ee..8d21b89acca4 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -120,6 +120,13 @@ #define Z_MIN_PROBE_PIN PB15 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h index 148b21de0b3c..820dc449c187 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h @@ -124,6 +124,13 @@ #endif #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor // 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 caa2272f4d86..5b54ebcf73bb 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 @@ -62,6 +62,13 @@ #define Z_MIN_PROBE_PIN PH2 // Probe #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Steppers // From 416f94f03a40e907c2c0bbe3e187c79d4d8754b3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 22 Jan 2024 00:23:03 +0000 Subject: [PATCH 134/236] [cron] Bump distribution date (2024-01-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 66b57bf455e6..00fc9978a6fa 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 "2024-01-21" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 3f0abecc28e5..a42464d24d7b 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 "2024-01-21" + #define STRING_DISTRIBUTION_DATE "2024-01-22" #endif /** From dd3b5a10a09e2a83918af1cf6f8782fd0c473f98 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 21 Jan 2024 22:00:37 -0600 Subject: [PATCH 135/236] Misc. aesthetic adjustments Co-Authored-By: Andrew <18502096+classicrocker883@users.noreply.github.com> --- Marlin/src/HAL/HC32/MarlinSerial.cpp | 2 +- .../src/feature/digipot/digipot_mcp4018.cpp | 2 +- .../src/feature/digipot/digipot_mcp4451.cpp | 4 +- Marlin/src/gcode/calibrate/M48.cpp | 9 +- Marlin/src/gcode/host/M114.cpp | 6 +- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 14 +- Marlin/src/lcd/e3v2/common/dwin_api.cpp | 2 +- Marlin/src/lcd/e3v2/common/dwin_color.h | 6 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 14 +- Marlin/src/lcd/e3v2/creality/dwin.h | 1 - Marlin/src/lcd/e3v2/jyersui/dwin.h | 3 +- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 2 +- Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 80 +- Marlin/src/lcd/e3v2/proui/dwin.h | 3 +- Marlin/src/lcd/e3v2/proui/dwin_defines.h | 10 +- Marlin/src/lcd/e3v2/proui/dwin_popup.h | 1 - Marlin/src/lcd/e3v2/proui/dwinui.cpp | 16 +- Marlin/src/lcd/e3v2/proui/dwinui.h | 11 +- Marlin/src/lcd/e3v2/proui/menus.cpp | 14 +- .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 4 +- Marlin/src/lcd/language/language_test.h | 2 +- Marlin/src/lcd/marlinui.h | 6 +- Marlin/src/lcd/menu/game/invaders.h | 4 +- Marlin/src/lcd/menu/menu.h | 1 + Marlin/src/module/motion.cpp | 1 - Marlin/src/module/probe.cpp | 26 +- Marlin/src/pins/gd32f1/pins_VOXELAB_AQUILA.h | 2 - Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp | 2 +- buildroot/share/vscode/avrdude.conf | 26212 ++++++++-------- buildroot/tests/STM32F103RE_creality | 6 +- buildroot/web-ui/data/www/index.html | 6 +- docs/Cutter.md | 88 +- 33 files changed, 13273 insertions(+), 13289 deletions(-) diff --git a/Marlin/src/HAL/HC32/MarlinSerial.cpp b/Marlin/src/HAL/HC32/MarlinSerial.cpp index 168533f66439..eb203f79d3ba 100644 --- a/Marlin/src/HAL/HC32/MarlinSerial.cpp +++ b/Marlin/src/HAL/HC32/MarlinSerial.cpp @@ -27,7 +27,7 @@ /** * Not every MarlinSerial instance should handle emergency parsing, as - * it would not make sense to parse GCode from TMC responses + * it would not make sense to parse G-Code from TMC responses */ constexpr bool serial_handles_emergency(int port) { return false diff --git a/Marlin/src/feature/digipot/digipot_mcp4018.cpp b/Marlin/src/feature/digipot/digipot_mcp4018.cpp index f776c5a33901..48d7ff492c40 100644 --- a/Marlin/src/feature/digipot/digipot_mcp4018.cpp +++ b/Marlin/src/feature/digipot/digipot_mcp4018.cpp @@ -37,7 +37,7 @@ #ifndef DIGIPOT_A4988_Vrefmax #define DIGIPOT_A4988_Vrefmax 1.666 #endif -#define DIGIPOT_MCP4018_MAX_VALUE 127 +#define DIGIPOT_MCP4018_MAX_VALUE 127 #define DIGIPOT_A4988_Itripmax(Vref) ((Vref) / (8.0 * DIGIPOT_A4988_Rsx)) diff --git a/Marlin/src/feature/digipot/digipot_mcp4451.cpp b/Marlin/src/feature/digipot/digipot_mcp4451.cpp index 7416fe9f8d5c..e35b42a28bd5 100644 --- a/Marlin/src/feature/digipot/digipot_mcp4451.cpp +++ b/Marlin/src/feature/digipot/digipot_mcp4451.cpp @@ -35,8 +35,8 @@ // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro #if MB(5DPRINT) - #define DIGIPOT_I2C_FACTOR 117.96f - #define DIGIPOT_I2C_MAX_CURRENT 1.736f + #define DIGIPOT_I2C_FACTOR 117.96f + #define DIGIPOT_I2C_MAX_CURRENT 1.736f #elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) #define DIGIPOT_I2C_FACTOR 113.5f #define DIGIPOT_I2C_MAX_CURRENT 2.0f diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 2d219a07c5fc..e3b81ce5b8c0 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -66,9 +66,6 @@ void GcodeSuite::M48() { return; } - if (verbose_level > 0) - SERIAL_ECHOLNPGM("M48 Z-Probe Repeatability Test"); - const int8_t n_samples = parser.byteval('P', 10); if (!WITHIN(n_samples, 4, 50)) { SERIAL_ECHOLNPGM("?Sample size not plausible (4-50)."); @@ -102,6 +99,9 @@ void GcodeSuite::M48() { const bool schizoid_flag = parser.boolval('S'); if (schizoid_flag && !seen_L) n_legs = 7; + if (verbose_level > 0) + SERIAL_ECHOLNPGM("M48 Z-Probe Repeatability Test"); + if (verbose_level > 2) SERIAL_ECHOLNPGM("Positioning the probe..."); @@ -261,8 +261,7 @@ void GcodeSuite::M48() { #if HAS_STATUS_MESSAGE // Display M48 results in the status bar - char sigma_str[8]; - ui.status_printf(0, F(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str)); + ui.set_status_and_level(MString<30>(GET_TEXT_F(MSG_M48_DEVIATION), F(": "), w_float_t(sigma, 2, 6))); #endif } diff --git a/Marlin/src/gcode/host/M114.cpp b/Marlin/src/gcode/host/M114.cpp index 979764f75e30..2a46de9c861a 100644 --- a/Marlin/src/gcode/host/M114.cpp +++ b/Marlin/src/gcode/host/M114.cpp @@ -29,19 +29,17 @@ #if ENABLED(M114_DETAIL) void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=LOGICAL_AXES, const uint8_t precision=3) { - char str[12]; for (uint8_t a = 0; a < n; ++a) { SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a])); if (pos[a] >= 0) SERIAL_CHAR(' '); - SERIAL_ECHO(dtostrf(pos[a], 1, precision, str)); + SERIAL_ECHO(p_float_t(pos[a], precision)); } SERIAL_EOL(); } inline void report_linear_axis_pos(const xyze_pos_t &pos) { report_all_axis_pos(pos, XYZ); } void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) { - char str[12]; - LOOP_NUM_AXES(a) SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]), dtostrf(pos[a], 1, precision, str)); + LOOP_NUM_AXES(a) SERIAL_ECHO(FPSTR(pgm_read_ptr(&SP_AXIS_LBL[a])), p_float_t(pos[a], precision)); SERIAL_EOL(); } diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 155ae581f06a..1126b4a4b62c 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -793,11 +793,11 @@ void MarlinUI::draw_status_message(const bool blink) { static lcd_uint_t pc = 0, pr = 2; inline void setPercentPos(const lcd_uint_t c, const lcd_uint_t r) { pc = c; pr = r; } void MarlinUI::drawPercent() { - const uint8_t progress = ui.get_progress_percent(); + const uint8_t progress = get_progress_percent(); if (progress) { lcd_moveto(pc, pr); lcd_put_u8str(F(TERN(IS_SD_PRINTING, "SD", "P:"))); - lcd_put_u8str(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(ui.get_progress_permyriad()), ui8tostr3rj(progress))); + lcd_put_u8str(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(get_progress_permyriad()), ui8tostr3rj(progress))); lcd_put_u8str(F("%")); } } @@ -806,9 +806,9 @@ void MarlinUI::draw_status_message(const bool blink) { #if ENABLED(SHOW_REMAINING_TIME) void MarlinUI::drawRemain() { if (printJobOngoing()) { - const duration_t remaint = ui.get_remaining_time(); + const duration_t remaint = get_remaining_time(); timepos = TPOFFSET - remaint.toDigital(buffer); - TERN_(NOT(LCD_INFO_SCREEN_STYLE), lcd_put_lchar(timepos - 1, 2, 0x20);) + IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20)); lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'R'); lcd_put_u8str(buffer); } @@ -817,10 +817,10 @@ void MarlinUI::draw_status_message(const bool blink) { #if ENABLED(SHOW_INTERACTION_TIME) void MarlinUI::drawInter() { - const duration_t interactt = ui.interaction_time; + const duration_t interactt = interaction_time; if (printingIsActive() && interactt.value) { timepos = TPOFFSET - interactt.toDigital(buffer); - TERN_(NOT(LCD_INFO_SCREEN_STYLE), lcd_put_lchar(timepos - 1, 2, 0x20);) + IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20)); lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'C'); lcd_put_u8str(buffer); } @@ -832,7 +832,7 @@ void MarlinUI::draw_status_message(const bool blink) { if (printJobOngoing()) { const duration_t elapsedt = print_job_timer.duration(); timepos = TPOFFSET - elapsedt.toDigital(buffer); - TERN_(NOT(LCD_INFO_SCREEN_STYLE), lcd_put_lchar(timepos - 1, 2, 0x20);) + IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20)); lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'E'); lcd_put_u8str(buffer); } diff --git a/Marlin/src/lcd/e3v2/common/dwin_api.cpp b/Marlin/src/lcd/e3v2/common/dwin_api.cpp index 4442b5847d58..342289e99329 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_api.cpp +++ b/Marlin/src/lcd/e3v2/common/dwin_api.cpp @@ -234,7 +234,7 @@ void dwinFrameAreaMove(uint8_t mode, uint8_t dir, uint16_t dis, // *string: The string // rlimit: To limit the drawn string length void dwinDrawString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) { - #if NONE(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, IS_DWIN_MARLINUI) + #if ENABLED(DWIN_CREALITY_LCD) dwinDrawRectangle(1, bColor, x, y, x + (fontWidth(size) * strlen_P(string)), y + fontHeight(size)); #endif constexpr uint8_t widthAdjust = 0; diff --git a/Marlin/src/lcd/e3v2/common/dwin_color.h b/Marlin/src/lcd/e3v2/common/dwin_color.h index 1e47d2e9045a..0185c3969894 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_color.h +++ b/Marlin/src/lcd/e3v2/common/dwin_color.h @@ -22,15 +22,15 @@ #pragma once // Extended and default UI Colors -#define RGB(R,G,B) (R << 11) | (G << 5) | (B) // R,B: 0..31; G: 0..63 +#define RGB(R,G,B) (R << 11) | (G << 5) | (B) // R: 0..31, G: 0..63, B: 0..31 #define GetRColor(color) ((color >> 11) & 0x1F) #define GetGColor(color) ((color >> 5) & 0x3F) #define GetBColor(color) ((color >> 0) & 0x1F) // RGB565 colors: https://rgbcolorpicker.com/565 #define COLOR_WHITE 0xFFFF -#define COLOR_YELLOW RGB(0x1F,0x3F,0x00) -#define COLOR_RED RGB(0x1F,0x00,0x00) +#define COLOR_YELLOW RGB(0x1F, 0x3F, 0x00) +#define COLOR_RED RGB(0x1F, 0x00, 0x00) #define COLOR_ERROR_RED 0xB000 // Error! #define COLOR_BG_RED 0xF00F // Red background color #define COLOR_BG_WINDOW 0x31E8 // Popup background color diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index ea6265b419a1..b2c08861d7d7 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1816,6 +1816,12 @@ void hmiSDCardInit() { card.cdroot(); } // Initialize or re-initialize the LCD void MarlinUI::init_lcd() { dwinStartup(); } +void MarlinUI::update() { + eachMomentUpdate(); // Status update + hmiSDCardUpdate(); // SD card update + dwinHandleScreen(); // Rotary encoder update +} + void MarlinUI::refresh() { /* Nothing to see here */ } #if HAS_LCD_BRIGHTNESS @@ -4080,14 +4086,6 @@ void dwinInitScreen() { hmiStartFrame(true); } -void dwinUpdate() { - eachMomentUpdate(); // Status update - hmiSDCardUpdate(); // SD card update - dwinHandleScreen(); // Rotary encoder update -} - -void MarlinUI::update() { dwinUpdate(); } - void eachMomentUpdate() { static millis_t next_var_update_ms = 0, next_rts_update_ms = 0; diff --git a/Marlin/src/lcd/e3v2/creality/dwin.h b/Marlin/src/lcd/e3v2/creality/dwin.h index 461c57f11cfb..fce52d8cf41b 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.h +++ b/Marlin/src/lcd/e3v2/creality/dwin.h @@ -244,7 +244,6 @@ void hmiStep(); // Transmission ratio void hmiInit(); void dwinInitScreen(); -void dwinUpdate(); void eachMomentUpdate(); void dwinHandleScreen(); void dwinStatusChanged(const char * const cstr=nullptr); diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.h b/Marlin/src/lcd/e3v2/jyersui/dwin.h index 97c5a85adaa6..48e413efbbb9 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.h +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.h @@ -154,9 +154,8 @@ enum colorID : uint8_t { }; #define Custom_Colors 10 -#define COLOR_AQUA RGB(0x00,0x3F,0x1F) #define COLOR_LIGHT_WHITE 0xBDD7 -#define COLOR_GREEN RGB(0x00,0x3F,0x00) +#define COLOR_GREEN RGB(0x00, 0x3F, 0x00) #define COLOR_LIGHT_GREEN 0x3460 #define COLOR_CYAN 0x07FF #define COLOR_LIGHT_CYAN 0x04F3 diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index f9318c75b9bb..6a4cb6afde5e 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -186,7 +186,7 @@ void MarlinUI::draw_status_message(const bool blink) { auto status_changed = []{ static MString<>::hash_t old_hash = 0x0000; - const MString<>::hash_t hash = ui.status_message.hash(); + const MString<>::hash_t hash = status_message.hash(); const bool hash_changed = hash != old_hash; old_hash = hash; return hash_changed || !did_first_redraw; diff --git a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp index 2e3f360ee726..5cecac1e930e 100644 --- a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp +++ b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp @@ -156,7 +156,7 @@ void BedLevelTools::manualMove(const uint8_t mesh_x, const uint8_t mesh_y, bool } } -// Move / Probe methods. As examples, not yet used. +// Move / Probe methods. void BedLevelTools::moveToXYZ() { goto_mesh_value = true; manualMove(mesh_x, mesh_y, false); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 721859f1be7a..888d1f74928e 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -513,14 +513,14 @@ void dwinDrawStatusMessage() { // Get a pointer to the next valid UTF8 character // and the string remaining length uint8_t rlen; - const char *stat = MarlinUI::status_and_len(rlen); + const char *stat = ui.status_and_len(rlen); dwinDrawRectangle(1, hmiData.colorStatusBg, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20); DWINUI::moveTo(0, STATUS_Y + 2); DWINUI::drawString(hmiData.colorStatusTxt, stat, LCD_WIDTH); // If the string doesn't completely fill the line... if (rlen < LCD_WIDTH) { - DWINUI::drawChar(hmiData.colorStatusTxt, '.'); // Always at 1+ spaces left, draw a dot + DWINUI::drawChar(hmiData.colorStatusTxt, '.'); // Always at 1+ spaces left, draw a dot uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters if (--chars) { // Draw a second dot if there's space DWINUI::drawChar(hmiData.colorStatusTxt, '.'); @@ -528,7 +528,7 @@ void dwinDrawStatusMessage() { DWINUI::drawString(hmiData.colorStatusTxt, ui.status_message, chars); // Print a second copy of the message } } - MarlinUI::advance_status_scroll(); + ui.advance_status_scroll(); } #else @@ -748,7 +748,7 @@ void _drawFeedrate() { DWINUI::drawString(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 116 + 4 * STAT_CHR_W + 2, 384, F(" %")); } else { - _value = CEIL(feedrate_mm_s * feedrate_percentage / 100); + _value = CEIL(MMS_SCALED(feedrate_mm_s)); dwinDrawBox(1, hmiData.colorBackground, 116 + 5 * STAT_CHR_W + 2, 384, 20, 20); } DWINUI::drawInt(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 3, 116 + 2 * STAT_CHR_W, 384, _value); @@ -880,24 +880,24 @@ inline uint16_t nr_sd_menu_items() { } void makeNameWithoutExt(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { - size_t pos = strlen(src); // Index of ending nul + size_t pos = strlen(src); // Index of ending nul // For files, remove the extension // which may be .gcode, .gco, or .g if (!card.flag.filenameIsDir) while (pos && src[pos] != '.') pos--; // Find last '.' (stop at 0) - if (!pos) pos = strlen(src); // pos = 0 ('.' not found) restore pos + if (!pos) pos = strlen(src); // pos = 0 ('.' not found) restore pos - size_t len = pos; // nul or '.' - if (len > maxlen) { // Keep the name short - pos = len = maxlen; // Move nul down - dst[--pos] = '.'; // Insert dots + size_t len = pos; // nul or '.' + if (len > maxlen) { // Keep the name short + pos = len = maxlen; // Move nul down + dst[--pos] = '.'; // Insert dots dst[--pos] = '.'; dst[--pos] = '.'; } - dst[len] = '\0'; // End it + dst[len] = '\0'; // End it // Copy down to 0 while (pos--) dst[pos] = src[pos]; @@ -972,7 +972,7 @@ void onClickSDItem() { } else if ((selected >= 1 + hasUpDir) && (shift_len > MENU_CHAR_LIMIT)) { uint8_t shift_new = _MIN(shift_amt + 1, shift_len - MENU_CHAR_LIMIT); // Try to shift by... - drawSDItemShifted(shift_new); // Draw the item + drawSDItemShifted(shift_new); // Draw the item if (shift_new == shift_amt) // Scroll reached the end shift_new = -1; // Reset shift_amt = shift_new; // Set new scroll @@ -1235,16 +1235,8 @@ void hmiWaitForUser() { } if (!wait_for_user) { switch (checkkey) { - case ID_PrintDone: - select_page.reset(); - gotoMainMenu(); - break; - #if HAS_BED_PROBE - case ID_Leveling: - #endif - default: - hmiReturnScreen(); - break; + case ID_PrintDone: select_page.reset(); gotoMainMenu(); break; + default: hmiReturnScreen(); break; } } } @@ -1330,7 +1322,7 @@ void eachMomentUpdate() { dwinPrintFinished(); } - if ((printingIsPaused() != hmiFlag.pause_flag) && !hmiFlag.home_flag) { + if ((hmiFlag.pause_flag != printingIsPaused()) && !hmiFlag.home_flag) { hmiFlag.pause_flag = printingIsPaused(); if (hmiFlag.pause_flag) dwinPrintPause(); @@ -1434,9 +1426,8 @@ void dwinHandleScreen() { case ID_PrintProcess: hmiPrinting(); break; case ID_Popup: hmiPopup(); break; #if HAS_LOCKSCREEN - case ID_Locked: hmiLockScreen(); break; + case ID_Locked: hmiLockScreen(); break; #endif - TERN_(HAS_ESDIAG, case ID_ESDiagProcess:) TERN_(PROUI_ITEM_PLOT, case ID_PlotProcess:) case ID_PrintDone: @@ -1629,11 +1620,11 @@ void dwinLevelingDone() { } void drawHPlot() { - TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START);) - TERN_(MPCTEMP, dwinDrawPlot(MPCTEMP_START);) + TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START)); + TERN_(MPCTEMP, dwinDrawPlot(MPCTEMP_START)); } void drawBPlot() { - TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START);) + TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START)); } #endif // PROUI_ITEM_PLOT @@ -1646,8 +1637,12 @@ void dwinLevelingDone() { if (seenC) hmiData.pidCycles = c; if (seenS) { switch (hid) { - OPTCODE(PIDTEMP, case 0 ... HOTENDS - 1: hmiData.hotendPidT = temp; break) - OPTCODE(PIDTEMPBED, case H_BED: hmiData.bedPidT = temp; break) + #if ENABLED(PIDTEMP) + case 0 ... HOTENDS - 1: hmiData.hotendPidT = temp; break; + #endif + #if ENABLED(PIDTEMPBED) + case H_BED: hmiData.bedPidT = temp; break; + #endif default: break; } } @@ -1778,7 +1773,7 @@ void dwinPrintAborted() { #if ENABLED(NOZZLE_PARK_FEATURE) F("G27") #else - TS(F("G0Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS)), F("\nG0F2000Y"), Y_MAX_POS); + TS(F("G0Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS)), F("\nG0F2000Y"), Y_MAX_POS) #endif ); } @@ -1890,9 +1885,9 @@ void dwinInitScreen() { } void MarlinUI::update() { - hmiSDCardUpdate(); // SD card update - eachMomentUpdate(); // Status update - dwinHandleScreen(); // Rotary encoder update + hmiSDCardUpdate(); // SD card update + eachMomentUpdate(); // Status update + dwinHandleScreen(); // Rotary encoder update } void MarlinUI::refresh() { /* Nothing to see here */ } @@ -2392,7 +2387,8 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres #if ENABLED(BED_TRAMMING_INCLUDE_CENTER) case 4: LCD_MESSAGE(MSG_TRAM_C); - x = X_CENTER; y = Y_CENTER; + x = X_CENTER; + y = Y_CENTER; break; #endif } @@ -2483,7 +2479,7 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres ui.reset_status(); #ifndef BED_TRAMMING_PROBE_TOLERANCE - #define BED_TRAMMING_PROBE_TOLERANCE 0.05 + #define BED_TRAMMING_PROBE_TOLERANCE 0.05f #endif if (ABS(meshViewer.max - meshViewer.min) < BED_TRAMMING_PROBE_TOLERANCE) { @@ -2492,7 +2488,7 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres } else { uint8_t p = 0; - float max = 0; + float max = 0.0f; FSTR_P plabel; bool s = true; for (uint8_t x = 0; x < 2; ++x) for (uint8_t y = 0; y < 2; ++y) { @@ -2766,9 +2762,9 @@ void onDrawGetColorItem(MenuItem* menuitem, int8_t line) { const uint8_t i = menuitem->icon; uint16_t color; switch (i) { - case 0: color = RGB(31, 0, 0); break; // Red - case 1: color = RGB(0, 63, 0); break; // Green - case 2: color = RGB(0, 0, 31); break; // Blue + case 0: color = RGB(31, 0, 0); break; // Red + case 1: color = RGB(0, 63, 0); break; // Green + case 2: color = RGB(0, 0, 31); break; // Blue default: color = 0; break; } dwinDrawRectangle(0, hmiData.colorHighlight, ICOX + 1, MBASE(line) - 1 + 1, ICOX + 18, MBASE(line) - 1 + 18); @@ -3800,9 +3796,9 @@ void drawMaxAccelMenu() { if (SET_MENU(getColorMenu, MSG_COLORS_GET, 5)) { BACK_ITEM(dwinApplyColor); MENU_ITEM(ICON_Cancel, MSG_BUTTON_CANCEL, onDrawMenuItem, drawSelectColorsMenu); - MENU_ITEM(0, MSG_COLORS_RED, onDrawGetColorItem, setRGBColor); + MENU_ITEM(0, MSG_COLORS_RED, onDrawGetColorItem, setRGBColor); MENU_ITEM(1, MSG_COLORS_GREEN, onDrawGetColorItem, setRGBColor); - MENU_ITEM(2, MSG_COLORS_BLUE, onDrawGetColorItem, setRGBColor); + MENU_ITEM(2, MSG_COLORS_BLUE, onDrawGetColorItem, setRGBColor); } updateMenu(getColorMenu); dwinDrawRectangle(1, *menuData.intPtr, 20, 315, DWIN_WIDTH - 20, 335); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index fe48822e4865..94b949b5e780 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -181,6 +181,8 @@ typedef struct { AxisEnum axis = X_AXIS; // Axis Select } hmi_value_t; +extern hmi_value_t hmiValue; + typedef struct { uint8_t language; bool printing_flag:1; // sd or host printing @@ -190,7 +192,6 @@ typedef struct { bool home_flag:1; // homing in course } hmi_flag_t; -extern hmi_value_t hmiValue; extern hmi_flag_t hmiFlag; extern uint8_t checkkey; diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index c03ac66af1ab..87cb50b8183a 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -54,15 +54,15 @@ #define HAS_ZOFFSET_ITEM 1 #endif -#define defColorBackground RGB( 1, 12, 8) +#define defColorBackground RGB(1, 12, 8) #define defColorCursor RGB(20, 49, 31) -#define defColorTitleBg RGB( 0, 23, 16) +#define defColorTitleBg RGB(0, 23, 16) #define defColorTitleTxt COLOR_WHITE #define defColorText COLOR_WHITE #define defColorSelected COLOR_SELECT -#define defColorSplitLine RGB( 0, 23, 16) +#define defColorSplitLine RGB(0, 23, 16) #define defColorHighlight COLOR_WHITE -#define defColorStatusBg RGB( 0, 23, 16) +#define defColorStatusBg RGB(0, 23, 16) #define defColorStatusTxt COLOR_YELLOW #define defColorPopupBg COLOR_BG_WINDOW #define defColorPopupTxt COLOR_POPUP_TEXT @@ -72,7 +72,7 @@ #define defColorBarfill COLOR_BARFILL #define defColorIndicator COLOR_WHITE #define defColorCoordinate COLOR_WHITE -#define defColorButton RGB( 0, 23, 16) +#define defColorButton RGB(0, 23, 16) #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) #define defColorLeds LEDColorWhite() #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin_popup.h b/Marlin/src/lcd/e3v2/proui/dwin_popup.h index d970cbfef475..fa55b286fb25 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_popup.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_popup.h @@ -76,4 +76,3 @@ void dwinPopupConfirm(const uint8_t icon, T amsg1, U amsg2) { dwinDrawPopup(icon, amsg1, amsg2, BTN_Confirm); // Button Confirm dwinUpdateLCD(); } - diff --git a/Marlin/src/lcd/e3v2/proui/dwinui.cpp b/Marlin/src/lcd/e3v2/proui/dwinui.cpp index 23cd1736fdf4..453e21a240f4 100644 --- a/Marlin/src/lcd/e3v2/proui/dwinui.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwinui.cpp @@ -79,7 +79,7 @@ uint8_t DWINUI::fontWidth(fontid_t fid) { uint8_t DWINUI::fontHeight(fontid_t fid) { switch (fid) { #if DISABLED(TJC_DISPLAY) - case font6x12 : return 12; + case font6x12 : return 12; case font20x40: return 40; case font24x48: return 48; case font28x56: return 56; @@ -199,7 +199,7 @@ void DWINUI::drawInt(uint8_t bShow, bool signedMode, fontid_t fid, uint16_t colo // value: float value void DWINUI::drawFloat(uint8_t bShow, bool signedMode, fontid_t fid, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { char nstr[10]; - dwinDrawString(bShow, fid, color, bColor, x, y, dtostrf(value, iNum + (signedMode ? 2:1) + fNum, fNum, nstr)); + dwinDrawString(bShow, fid, color, bColor, x, y, dtostrf(value, iNum + (signedMode ? 2 : 1) + fNum, fNum, nstr)); } // ------------------------- Icons -------------------------------// @@ -219,17 +219,17 @@ void DWINUI::ICON_Show(bool BG, uint8_t icon, uint16_t x, uint16_t y) { void DWINUI::drawButton(uint16_t color, uint16_t bcolor, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, const char * const caption) { dwinDrawRectangle(1, bcolor, x1, y1, x2, y2); - drawCenteredString(0, fontID, color, bcolor, x1, x2, (y2 + y1 - fontHeight())/2, caption); + drawCenteredString(0, fontID, color, bcolor, x1, x2, (y2 + y1 - fontHeight()) / 2, caption); } void DWINUI::drawButton(uint8_t id, uint16_t x, uint16_t y) { switch (id) { - case BTN_Cancel : drawButton(GET_TEXT_F(MSG_BUTTON_CANCEL), x, y); break; - case BTN_Confirm : drawButton(GET_TEXT_F(MSG_BUTTON_CONFIRM), x, y); break; case BTN_Continue: drawButton(GET_TEXT_F(MSG_BUTTON_CONTINUE), x, y); break; - case BTN_Print : drawButton(GET_TEXT_F(MSG_BUTTON_PRINT), x, y); break; - case BTN_Save : drawButton(GET_TEXT_F(MSG_BUTTON_SAVE), x, y); break; - case BTN_Purge : drawButton(GET_TEXT_F(MSG_BUTTON_PURGE), x, y); break; + case BTN_Cancel : drawButton(GET_TEXT_F(MSG_BUTTON_CANCEL), x, y); break; + case BTN_Confirm : drawButton(GET_TEXT_F(MSG_BUTTON_CONFIRM), x, y); break; + case BTN_Print : drawButton(GET_TEXT_F(MSG_BUTTON_PRINT), x, y); break; + case BTN_Save : drawButton(GET_TEXT_F(MSG_BUTTON_SAVE), x, y); break; + case BTN_Purge : drawButton(GET_TEXT_F(MSG_BUTTON_PURGE), x, y); break; default: break; } } diff --git a/Marlin/src/lcd/e3v2/proui/dwinui.h b/Marlin/src/lcd/e3v2/proui/dwinui.h index 97da3f05abab..b0ff00c527d9 100644 --- a/Marlin/src/lcd/e3v2/proui/dwinui.h +++ b/Marlin/src/lcd/e3v2/proui/dwinui.h @@ -153,9 +153,8 @@ // Extended and default UI Colors #define COLOR_BLACK 0 -#define COLOR_GREEN RGB(0,63,0) -#define COLOR_AQUA RGB(0,63,31) -#define COLOR_BLUE RGB(0,0,31) +#define COLOR_GREEN RGB(0, 63, 0) +#define COLOR_BLUE RGB(0, 0, 31) #define COLOR_LIGHT_WHITE 0xBDD7 #define COLOR_LIGHT_GREEN 0x3460 #define COLOR_CYAN 0x07FF @@ -172,9 +171,9 @@ #define COLOR_GREY 0x18E3 // UI element defines and constants -#define DWIN_FONT_MENU font8x16 -#define DWIN_FONT_STAT font10x20 -#define DWIN_FONT_HEAD font10x20 +#define DWIN_FONT_MENU font8x16 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 #define DWIN_FONT_ALERT font10x20 #define STATUS_Y 354 #define LCD_WIDTH (DWIN_WIDTH / 8) // only if the default fontID is font8x16 diff --git a/Marlin/src/lcd/e3v2/proui/menus.cpp b/Marlin/src/lcd/e3v2/proui/menus.cpp index 9f48ff03b748..88fbf6000125 100644 --- a/Marlin/src/lcd/e3v2/proui/menus.cpp +++ b/Marlin/src/lcd/e3v2/proui/menus.cpp @@ -263,7 +263,7 @@ void setPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*apply)( // Generic menu control using the encoder void hmiMenu() { - EncoderState encoder_diffState = get_encoder_state(); + const EncoderState encoder_diffState = get_encoder_state(); if (currentMenu) { if (encoder_diffState == ENCODER_DIFF_NO) return; if (encoder_diffState == ENCODER_DIFF_ENTER) @@ -280,10 +280,8 @@ void hmiMenu() { // 1 : live change // 2 : apply change int8_t hmiGet(bool draw) { - const int32_t lo = menuData.minValue; - const int32_t hi = menuData.maxValue; - const int32_t cval = menuData.value; - EncoderState encoder_diffState = TERN(SMOOTH_ENCODER_MENUITEMS, get_encoder_state(), encoderReceiveAnalyze()); + const int32_t lo = menuData.minValue, hi = menuData.maxValue, cval = menuData.value; + const EncoderState encoder_diffState = TERN(SMOOTH_ENCODER_MENUITEMS, get_encoder_state(), encoderReceiveAnalyze()); if (encoder_diffState != ENCODER_DIFF_NO) { if (applyEncoder(encoder_diffState, menuData.value)) { encoderRate.enabled = false; @@ -300,7 +298,7 @@ int8_t hmiGet(bool draw) { // Set and draw a value using the encoder void hmiSetDraw() { - int8_t val = hmiGet(true); + const int8_t val = hmiGet(true); switch (val) { case 0: return; case 1: if (menuData.liveUpdate) menuData.liveUpdate(); break; @@ -310,7 +308,7 @@ void hmiSetDraw() { // Set an value without drawing void hmiSetNoDraw() { - int8_t val = hmiGet(false); + const int8_t val = hmiGet(false); switch (val) { case 0: return; case 1: if (menuData.liveUpdate) menuData.liveUpdate(); break; @@ -320,7 +318,7 @@ void hmiSetNoDraw() { // Set an integer pointer variable using the encoder void hmiSetPInt() { - int8_t val = hmiGet(true); + const int8_t val = hmiGet(true); switch (val) { case 0: return; case 1: if (menuData.liveUpdate) menuData.liveUpdate(); break; 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 f8cba1567694..709b54a6d76a 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -897,7 +897,7 @@ void AnycubicTFT::doFilamentRunoutCheck() { #if ENABLED(FILAMENT_RUNOUT_SENSOR) // NOTE: getFilamentRunoutState() only returns the runout state if the job is printing // we want to actually check the status of the pin here, regardless of printstate - if (READ(FIL_RUNOUT1_PIN)) { + if (READ(FIL_RUNOUT1_PIN) == FIL_RUNOUT1_STATE) { if (mediaPrintingState == AMPRINTSTATE_PRINTING || mediaPrintingState == AMPRINTSTATE_PAUSED || mediaPrintingState == AMPRINTSTATE_PAUSE_REQUESTED) { // play tone to indicate filament is out injectCommands(F("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567")); @@ -940,7 +940,7 @@ void AnycubicTFT::pausePrint() { void AnycubicTFT::resumePrint() { #if HAS_MEDIA #if ENABLED(FILAMENT_RUNOUT_SENSOR) - if (READ(FIL_RUNOUT1_PIN)) { + if (READ(FIL_RUNOUT1_PIN) == FIL_RUNOUT1_STATE) { DEBUG_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... "); // trigger the user message box diff --git a/Marlin/src/lcd/language/language_test.h b/Marlin/src/lcd/language/language_test.h index 657e4e2e48a2..6e160a6b02f7 100644 --- a/Marlin/src/lcd/language/language_test.h +++ b/Marlin/src/lcd/language/language_test.h @@ -116,7 +116,7 @@ namespace Language_test { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; + constexpr uint8_t CHARSIZE = 1; #if ENABLED(DISPLAYTEST) LSTR WELCOME_MSG = _UxGT("Language TEST"); diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index c661e635cc83..d578826e4970 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -465,7 +465,7 @@ class MarlinUI { * @param fstr A constant F-string to set as the status. * @param level Alert level. Negative to ignore and reset the level. Non-zero never expires. */ - static void set_status_and_level(const char * const cstr, const int8_t level) { _set_status_and_level(cstr, level, false); } + static void set_status_and_level(const char * const cstr, const int8_t level=0) { _set_status_and_level(cstr, level, false); } /** * @brief Set Status with a P-string and alert level. @@ -473,7 +473,7 @@ class MarlinUI { * @param ustr A C- or P-string, according to pgm. * @param level Alert level. Negative to ignore and reset the level. Non-zero never expires. */ - static void set_status_and_level_P(PGM_P const pstr, const int8_t level) { _set_status_and_level(pstr, level, true); } + static void set_status_and_level_P(PGM_P const pstr, const int8_t level=0) { _set_status_and_level(pstr, level, true); } /** * @brief Set Status with a fixed string and alert level. @@ -481,7 +481,7 @@ class MarlinUI { * @param fstr A constant F-string to set as the status. * @param level Alert level. Negative to ignore and reset the level. Non-zero never expires. */ - static void set_status_and_level(FSTR_P const fstr, const int8_t level) { set_status_and_level_P(FTOP(fstr), level); } + static void set_status_and_level(FSTR_P const fstr, const int8_t level=0) { set_status_and_level_P(FTOP(fstr), level); } static void set_max_status(FSTR_P const fstr) { set_status_and_level(fstr, 127); } static void set_min_status(FSTR_P const fstr) { set_status_and_level(fstr, -1); } diff --git a/Marlin/src/lcd/menu/game/invaders.h b/Marlin/src/lcd/menu/game/invaders.h index c99e6c16ae76..a3ae6ffaedc2 100644 --- a/Marlin/src/lcd/menu/game/invaders.h +++ b/Marlin/src/lcd/menu/game/invaders.h @@ -53,8 +53,8 @@ typedef struct { uint8_t bugs[INVADER_ROWS], shooters[(INVADER_ROWS) * (INVADER_COLS)]; int8_t ufox, ufov; bool game_blink; - int8_t laser_col() { return ((laser.x - pos.x) / (INVADER_COL_W)); }; - int8_t laser_row() { return ((laser.y - pos.y + 2) / (INVADER_ROW_H)); }; + int8_t laser_col() { return ((laser.x - pos.x) / (INVADER_COL_W)); } + int8_t laser_row() { return ((laser.y - pos.y + 2) / (INVADER_ROW_H)); } } invaders_data_t; class InvadersGame : MarlinGame { public: static void enter_game(), game_screen(); }; diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index de9e4d5086a1..47ddc00bf4a8 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -146,6 +146,7 @@ typedef union { uint32_t uint32; celsius_t celsius; } chimera_t; + extern chimera_t editable; // Base class for Menu Edit Items diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 8908c2fa734b..5fe1b3b741c9 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -73,7 +73,6 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" - #if ENABLED(BD_SENSOR) #include "../feature/bedlevel/bdl/bdl.h" #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 0bd83bc3ac10..ee9e9b34acef 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -97,7 +97,7 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" #elif ENABLED(DWIN_LCD_PROUI) - #include "../lcd/e3v2/proui/dwin.h" + #include "../lcd/e3v2/proui/dwin_popup.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -356,28 +356,28 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { // 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); + FSTR_P const ds_fstr = 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_max_status(ds_str); + ui.set_max_status(ds_fstr); SERIAL_ECHOLN(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW)); OKAY_BUZZ(); #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(); - } + 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, dwinPopupConfirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_fstr)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_fstr)); + TERN_(DWIN_LCD_PROUI, dwinPopupConfirm(ICON_BLTouch, ds_fstr, FPSTR(CONTINUE_STR))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); diff --git a/Marlin/src/pins/gd32f1/pins_VOXELAB_AQUILA.h b/Marlin/src/pins/gd32f1/pins_VOXELAB_AQUILA.h index 2f3998b45fcf..c0d9c87baad8 100644 --- a/Marlin/src/pins/gd32f1/pins_VOXELAB_AQUILA.h +++ b/Marlin/src/pins/gd32f1/pins_VOXELAB_AQUILA.h @@ -32,8 +32,6 @@ #define DEFAULT_MACHINE_NAME "Aquila" #endif -#define INLINE_USART_IRQ - #define NO_MAPLE_WARNING // Disable warning when compiling with Maple env #include "../stm32f1/pins_CREALITY_V4.h" diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp index 889b8560aa01..016500d2d68c 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp @@ -201,7 +201,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque * Keep sending INs and writes data to memory area pointed by 'data' * rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error, fe = USB xfer timeout */ -uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) { +uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval/*=0*/) { EpInfo *pep = nullptr; uint16_t nak_limit = 0; diff --git a/buildroot/share/vscode/avrdude.conf b/buildroot/share/vscode/avrdude.conf index 991d255750f5..a1a3ef4ba4b8 100644 --- a/buildroot/share/vscode/avrdude.conf +++ b/buildroot/share/vscode/avrdude.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; - - 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 "flash" - size = 1024; - blocksize = 128; - readsize = 256; - delay = 3; - ; - - memory "signature" - size = 3; - ; - - memory "lock" - size = 1; - ; - - memory "calibration" - size = 1; - ; - - memory "fuse" - size = 1; - ; + 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; + + memory "eeprom" + size = 64; + blocksize = 64; + readsize = 256; + delay = 5; + ; + + memory "flash" + size = 1024; + blocksize = 128; + readsize = 256; + delay = 3; + ; + + memory "signature" + size = 3; + ; + + memory "lock" + size = 1; + ; + + memory "calibration" + 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"; - - 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; - - 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"; - - 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; - ; - - 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"; - - 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"; - - 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 "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; - ; - - 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"; - - 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; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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_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; + ; + + 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"; + + 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 "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; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - hvsp_controlstack = + 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"; + + 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; - 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"; - - 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", + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; + 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"; + + 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_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"; + + 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 "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"; - - 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; - - 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"; - - 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; - ; - - 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"; - - 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"; - - 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 "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; - ; - - 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"; - - 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; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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_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; + ; + + 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"; + + 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 "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; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - 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"; - - 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"; - - 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_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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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"; + + 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"; - - 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, 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"; - - 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"; - - 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_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", + 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"; + + 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; + + 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"; + + 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"; + + 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"; + + 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"; - - 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 = 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"; - - 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"; - - 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_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; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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"; + + 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"; - - 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 = 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"; - - 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; - ; - - 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"; - - 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"; - - 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 1 1 1 1 i i 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"; + + 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; + + 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"; + + 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"; + + 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_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; + 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 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"; - - 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; - - 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"; - - 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"; - - 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_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"; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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"; + + 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 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"; - - 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 = 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"; - - 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"; - - 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_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"; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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"; + + 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 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"; - - 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"; - - 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"; - - 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 = "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"; - ; + 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"; + + 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"; + + 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_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 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"; - - 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; - - pp_controlstack = + 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"; + + 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; - 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"; - - 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"; - - 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_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", + 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"; + + 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"; + + 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_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", "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"; - - 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 = 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"; - - 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"; - - 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_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", + 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"; + + 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; + + 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"; + + 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"; + + 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"; + + 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"; - - 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, 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; + 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"; + + 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; + + 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"; - - 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - ; + " 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 "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"; + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; - - 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; - - 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"; - - 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; - ; - - 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"; - - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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; + ; + + 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"; + + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + ; ; @@ -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"; - - 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; - - 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"; - - 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 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"; - - 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; - - pp_controlstack = + 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"; + + 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 = 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; - - 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; + 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; + + 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - - 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"; - ; + 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"; + + 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_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 = 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"; + + 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"; + + 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"; + + 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"; + ; ; @@ -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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; - - 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 "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"; - ; + 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"; + + 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_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 = 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"; + + 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"; + + 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"; + + 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; + + 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; + ; + + 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 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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; - - 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 "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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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; + + 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; + ; + + 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 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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; - - 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 "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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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; + + 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; + ; + + 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 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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; - - 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 "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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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; + + 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; + ; + + 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 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"; - - 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; - - 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; - - 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; + 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"; + + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; - - 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 "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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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; + + 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; + ; + + 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 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; - - 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"; - - 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; - - 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"; - - 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"; - - 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; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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; + + pgm_enable = "1 0 1 0 1 1 0 0 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"; + + 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"; + + 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"; + + 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; + + 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; + + 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"; + + 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"; - - 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; + 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"; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + " 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; + 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; + + 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; 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = yes; + 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; + + 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; 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"; - - 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", + 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"; + + 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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 = 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; + 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; + + 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"; - - 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - ; + " 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; + ; + + 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"; + + 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"; + + 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; + ; + + 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"; + ; + + 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"; + ; ; @@ -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"; - - 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; - - pp_controlstack = + 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"; + + 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 = 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; + 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; 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"; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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 "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"; - ; + " 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - 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; + 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"; + + 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; + + 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"; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + " 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - 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; + 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"; + + 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; + + 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"; - - 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"; - - 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"; - - 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; - ; - - 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"; - ; - - 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"; - ; - - 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 "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"; - ; + " 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - 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"; - - 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - - 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"; - - 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"; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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_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"; + + 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 "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; + ; + + 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; + ; + + 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; + ; + + 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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - 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", + 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"; + + 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; + + 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; + + 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"; + + 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - ; + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - 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", + 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"; + + 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; + + 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; + + 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"; + + 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; - ; - - 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_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_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"; - - 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 "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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - 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", + 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"; + + 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; + + 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; + + 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"; + + 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; - ; - - 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_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_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"; - - 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 "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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; @@ -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"; - - 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; - - pp_controlstack = + 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"; + + 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; - 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; + 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; 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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 "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"; - ; + 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"; + + 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"; + + 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; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; ; @@ -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"; - - 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; - - pp_controlstack = + 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"; + + 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; - 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; + 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"; + " 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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 "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"; - ; + 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"; + + 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"; + + 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 "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"; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - pp_controlstack = + 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"; + + 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; - 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"; - - 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", + 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"; + + 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", " 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 = 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"; - - 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"; - - 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; - - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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"; - - 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; - - pp_controlstack = + 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"; + + 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; - 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; + 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; 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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 "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"; - ; + 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"; + + 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"; + + 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 "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"; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pp_controlstack = + 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; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; - - memory "eeprom" - paged = no; - page_size = 4; - size = 1024; + 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; 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"; - - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; - - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; + " 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; + ; + + 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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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"; + 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"; # 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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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; + ; # 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 "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; - ; - - 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; - ; - - 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; - ; + 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"; + + 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"; + + 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"; + + 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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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" - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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"; - - 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"; - - 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"; - - 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"; - - 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 "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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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" - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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"; - - 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"; - - 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"; - - 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"; - - 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 "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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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" - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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" - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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 "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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; - - hvsp_controlstack = + 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"; + + 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; + + 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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 "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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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 "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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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, 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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 "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"; - ; + 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"; + + 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_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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + ; ; #------------------------------------------------------------ @@ -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 = "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, 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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"; - - 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 "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"; - ; + 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"; + + 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_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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + ; ; #------------------------------------------------------------ @@ -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 = "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, 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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 "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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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 "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; - ; - - 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; - ; - - 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; - ; - - 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 "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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - pgm_enable = "1 0 1 0 1 1 0 0 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"; - - 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; - - 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"; - - loadpage_lo = " 1 1 0 0 0 0 0 1", + 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"; + + 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; + + 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"; + + 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", " 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"; - - 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_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"; - - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + 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"; + + 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"; + + 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; + ; # 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 "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"; - - 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"; - - 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"; - - 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 "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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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 = "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; - - 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"; - - 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", + 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 = 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; + + 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"; + + 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", " 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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 "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; - - 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"; - - 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", + 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; + + 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"; + + 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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; - - 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"; - - 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", + 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; + + 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"; + + 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; - ; - - 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"; - - 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"; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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; - ; - - 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"; - ; + 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"; + + 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_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"; + + 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"; + + 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"; + + 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"; + + 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"; + + 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"; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - 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; - - 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"; - - 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"; - - 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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; - - 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; - ; - - 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; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + + 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 "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"; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - 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; - - 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"; - - 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"; - - 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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; - - 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; - ; - - 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; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + + 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 "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"; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - 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; - - 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"; - - 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"; - - 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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; - - 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; - ; - - 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; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + + 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 "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"; + ; ; #------------------------------------------------------------ @@ -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"; - - 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; - - 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; - - 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"; - - 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"; - - 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"; - - 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_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"; - - 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"; - - 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"; - - 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"; - - 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; - - 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; - ; - - 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; - - 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"; - ; + 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"; + + 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; + + 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"; + + 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"; + + 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; + ; + + 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"; + + 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"; + + 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; + ; + + 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; + ; + + 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; + ; + + 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; + ; + + 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"; + + 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 "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"; + ; ; #------------------------------------------------------------ @@ -13941,96 +13941,96 @@ part #------------------------------------------------------------ part - 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 "application" - size = 0x00010000; - offset = 0x0800000; - 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 "flash" - size = 0x00011000; - offset = 0x0800000; - 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 "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00010000; + offset = 0x0800000; + 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 "flash" + size = 0x00011000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00820000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00020000; + offset = 0x0800000; + 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 "flash" + size = 0x00022000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00820000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00020000; + offset = 0x0800000; + 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 "flash" + size = 0x00022000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00830000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00030000; + offset = 0x0800000; + 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 "flash" + size = 0x00032000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00840000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00040000; + offset = 0x0800000; + 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 "flash" + size = 0x00042000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00001000; - offset = 0x00810000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00010000; + offset = 0x0800000; + 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 "flash" + size = 0x00011000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00820000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00020000; + offset = 0x0800000; + 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 "flash" + size = 0x00022000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00830000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00030000; + offset = 0x0800000; + 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 "flash" + size = 0x00032000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00840000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00040000; + offset = 0x0800000; + 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 "flash" + size = 0x00042000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00840000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00040000; + offset = 0x0800000; + 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 "flash" + size = 0x00042000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0400; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00001000; - offset = 0x00804000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00004000; + offset = 0x0800000; + 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 "flash" + size = 0x00005000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0400; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00001000; - offset = 0x00808000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00008000; + offset = 0x0800000; + 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 "flash" + size = 0x00009000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00001000; - offset = 0x00810000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00010000; + offset = 0x0800000; + 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 "flash" + size = 0x00011000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - 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 "boot" - size = 0x00002000; - offset = 0x00820000; - 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 "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; - - memory "signature" - size = 3; - offset = 0x1000090; - ; - - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; - - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; - - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; - - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; - - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; - - memory "lock" - size = 1; - offset = 0x8f0027; - ; + 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 "application" + size = 0x00020000; + offset = 0x0800000; + 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 "flash" + size = 0x00022000; + offset = 0x0800000; + 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 "signature" + size = 3; + offset = 0x1000090; + ; + + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; + + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; + + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; + + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; + + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; + + 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; - - 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; - ; + 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; + ; ; #------------------------------------------------------------ @@ -15321,38 +15321,38 @@ part #------------------------------------------------------------ part - id = "t4"; - desc = "ATtiny4"; - signature = 0x1e 0x8f 0x0a; - has_tpi = yes; - - memory "flash" - size = 512; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; - - memory "signature" - size = 3; - offset = 0x3fc0; - ; - - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; - - memory "calibration" - size = 1; - offset = 0x3f80; - ; - - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + id = "t4"; + desc = "ATtiny4"; + signature = 0x1e 0x8f 0x0a; + has_tpi = yes; + + memory "flash" + size = 512; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; + + memory "signature" + size = 3; + offset = 0x3fc0; + ; + + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; + + memory "calibration" + size = 1; + offset = 0x3f80; + ; + + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15361,38 +15361,38 @@ part #------------------------------------------------------------ part - id = "t5"; - desc = "ATtiny5"; - signature = 0x1e 0x8f 0x09; - has_tpi = yes; - - memory "flash" - size = 512; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; - - memory "signature" - size = 3; - offset = 0x3fc0; - ; - - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; - - memory "calibration" - size = 1; - offset = 0x3f80; - ; - - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + id = "t5"; + desc = "ATtiny5"; + signature = 0x1e 0x8f 0x09; + has_tpi = yes; + + memory "flash" + size = 512; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; + + memory "signature" + size = 3; + offset = 0x3fc0; + ; + + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; + + memory "calibration" + size = 1; + offset = 0x3f80; + ; + + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15401,38 +15401,38 @@ part #------------------------------------------------------------ part - id = "t8"; - desc = "ATtiny9"; - signature = 0x1e 0x90 0x08; - has_tpi = yes; - - memory "flash" - size = 1024; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; - - memory "signature" - size = 3; - offset = 0x3fc0; - ; - - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; - - memory "calibration" - size = 1; - offset = 0x3f80; - ; - - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + id = "t8"; + desc = "ATtiny9"; + signature = 0x1e 0x90 0x08; + has_tpi = yes; + + memory "flash" + size = 1024; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; + + memory "signature" + size = 3; + offset = 0x3fc0; + ; + + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; + + memory "calibration" + size = 1; + offset = 0x3f80; + ; + + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15441,38 +15441,38 @@ part #------------------------------------------------------------ part - id = "t10"; - desc = "ATtiny10"; - signature = 0x1e 0x90 0x03; - has_tpi = yes; - - memory "flash" - size = 1024; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; - - memory "signature" - size = 3; - offset = 0x3fc0; - ; - - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; - - memory "calibration" - size = 1; - offset = 0x3f80; - ; - - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + id = "t10"; + desc = "ATtiny10"; + signature = 0x1e 0x90 0x03; + has_tpi = yes; + + memory "flash" + size = 1024; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; + + memory "signature" + size = 3; + offset = 0x3fc0; + ; + + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; + + memory "calibration" + size = 1; + offset = 0x3f80; + ; + + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index ad80605e61fa..1fea3c963f02 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -11,17 +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 - 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 - JyersUI (ABL Bilinear/Manual)" "$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" +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 EVENT_GCODE_SD_ABORT diff --git a/buildroot/web-ui/data/www/index.html b/buildroot/web-ui/data/www/index.html index 1a8db1cafb04..1628840634f3 100644 --- a/buildroot/web-ui/data/www/index.html +++ b/buildroot/web-ui/data/www/index.html @@ -384,7 +384,7 @@
-
GCode Lines
+
G-Code Lines
-
@@ -466,11 +466,11 @@
- GCode checksum value: + G-Code checksum value:  
- +
diff --git a/docs/Cutter.md b/docs/Cutter.md index c78b0551a0ac..623beb21f4d3 100644 --- a/docs/Cutter.md +++ b/docs/Cutter.md @@ -4,7 +4,7 @@ With Marlin version 2.0.9.x or higher, Laser improvements were introduced that e ### Architecture -Laser selectable feature capability is defined through 4 global mode flags within gcode ,laser/spindle, planner and stepper routines. The default mode maintains the standard laser function. G-Codes are received, processed and parsed to determine what mode to set through M3, M4 and M5 commands. When the inline mode parameter set is detected, laser power processing will be driven through the planner and stepper routines. Handling of the initial power values and settings are performed by G-Code parsing and the laser/spindle routines. +Laser selectable feature capability is defined through 4 global mode flags within G-code ,laser/spindle, planner and stepper routines. The default mode maintains the standard laser function. G-Codes are received, processed and parsed to determine what mode to set through M3, M4 and M5 commands. When the inline mode parameter set is detected, laser power processing will be driven through the planner and stepper routines. Handling of the initial power values and settings are performed by G-Code parsing and the laser/spindle routines. Inline power feeds from the block->inline_power variable into the planner's laser.power when in continuous power mode. Further power adjustment will be applied if the laser power trap feature is active otherwise laser.power is used as set in the stepper for the entire block. When laser power trap is active the power levels are step incremented during acceleration and step decremented during deceleration. @@ -20,52 +20,52 @@ The following flow charts depict the flow control logic for spindle and laser op #### Spindle Mode Logic: - ┌──────────┐ ┌───────────┐ ┌───────────┐ - │M3 S-Value│ │Dir !same ?│ │Stepper │ - │Spindle │ │stop & wait│ │processes │ - ┌──┤Clockwise ├──┤ & start ├──┤moves │ - ┌─────┐ │ │ │ │spindle │ │ │ - │GCode│ │ └──────────┘ └───────────┘ └───────────┘ - │Send ├──┤ ┌──────────┐ ┌───────────┐ ┌───────────┐ - └─────┘ │ │M4 S-Value│ │Dir !same ?│ │Stepper │ - ├──┤Spindle ├──┤stop & wait├──┤processes │ - │ │Counter │ │& start │ │moves │ - │ │Clockwise │ │spindle │ │ │ - │ └──────────┘ └───────────┘ └───────────┘ - │ ┌──────────┐ ┌────────┐ - │ │M5 │ │Wait for│ - │ │Spindle ├──┤move & │ - └──┤Stop │ │disable │ - └──────────┘ └────────┘ - ┌──────────┐ ┌──────────┐ - Sensors─────┤Fault ├──┤Disable │ - └──────────┘ │power │ - └──────────┘ + ┌──────────┐ ┌───────────┐ ┌───────────┐ + │M3 S-Value│ │Dir !same ?│ │Stepper │ + │Spindle │ │stop & wait│ │processes │ + ┌──┤Clockwise ├──┤ & start ├──┤moves │ + ┌──────┐ │ │ │ │spindle │ │ │ + │G-Code│ │ └──────────┘ └───────────┘ └───────────┘ + │Send ├──┤ ┌──────────┐ ┌───────────┐ ┌───────────┐ + └──────┘ │ │M4 S-Value│ │Dir !same ?│ │Stepper │ + ├──┤Spindle ├──┤stop & wait├──┤processes │ + │ │Counter │ │& start │ │moves │ + │ │Clockwise │ │spindle │ │ │ + │ └──────────┘ └───────────┘ └───────────┘ + │ ┌──────────┐ ┌────────┐ + │ │M5 │ │Wait for│ + │ │Spindle ├──┤move & │ + └──┤Stop │ │disable │ + └──────────┘ └────────┘ + ┌──────────┐ ┌──────────┐ + Sensors─────┤Fault ├──┤Disable │ + └──────────┘ │power │ + └──────────┘ #### Laser Mode Logic: - ┌──────────┐ ┌─────────────┐ ┌───────────┐ - │M3,M4,M5 I│ │Set power │ │Stepper │ - ┌──┤Standard ├──┤Immediately &├──┤processes │ - │ │Default │ │wait for move│ │moves │ - │ │ │ │completion │ │ │ - │ └──────────┘ └─────────────┘ └───────────┘ - │ ┌──────────┐ ┌───────────┐ ┌───────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐ - ┌─────┐ │ │M3 I │ │G0,G1,G2,G4│ │Planner │ │Planner │ │Planner fan │ │Planner │ │Stepper │ - │GCode│ │ │Continuous│ │M3 receive │ │sets block │ │sync power ?│ │sync power ?│ │trap power ?│ │uses block │ - │Send ├──┼──┤Inline ├──┤power from ├──┤power using├──┤process M3 ├──┤process fan ├──┤adjusts for ├──┤values to │ - └─────┘ │ │ │ │S-Value │ │Gx S-Value │ │power inline│ │power inline│ │accel/decel │ │apply power│ - │ └──────────┘ └───────────┘ └───────────┘ └────────────┘ └────────────┘ └────────────┘ └───────────┘ - │ ┌──────────┐ ┌───────────┐ ┌────────────────┐ ┌───────────┐ - │ │M4 I │ │Gx F-Value │ │Planner │ │Stepper │ - │ │Dynamic │ │set power │ │Calc & set block│ │uses block │ - └──┤Inline ├──┤or use ├──┤block power ├──┤values to │ - │ │ │default │ │using F-Value │ │apply power│ - └──────────┘ └───────────┘ └────────────────┘ └───────────┘ - ┌──────────┐ ┌──────────┐ - Sensors─────┤Fault ├──┤Disable │ - └──────────┘ │Power │ - └──────────┘ + ┌──────────┐ ┌─────────────┐ ┌───────────┐ + │M3,M4,M5 I│ │Set power │ │Stepper │ + ┌──┤Standard ├──┤Immediately &├──┤processes │ + │ │Default │ │wait for move│ │moves │ + │ │ │ │completion │ │ │ + │ └──────────┘ └─────────────┘ └───────────┘ + │ ┌──────────┐ ┌───────────┐ ┌───────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐ + ┌──────┐ │ │M3 I │ │G0,G1,G2,G4│ │Planner │ │Planner │ │Planner fan │ │Planner │ │Stepper │ + │G-Code│ │ │Continuous│ │M3 receive │ │sets block │ │sync power ?│ │sync power ?│ │trap power ?│ │uses block │ + │Send ├──┼──┤Inline ├──┤power from ├──┤power using├──┤process M3 ├──┤process fan ├──┤adjusts for ├──┤values to │ + └──────┘ │ │ │ │S-Value │ │Gx S-Value │ │power inline│ │power inline│ │accel/decel │ │apply power│ + │ └──────────┘ └───────────┘ └───────────┘ └────────────┘ └────────────┘ └────────────┘ └───────────┘ + │ ┌──────────┐ ┌───────────┐ ┌────────────────┐ ┌───────────┐ + │ │M4 I │ │Gx F-Value │ │Planner │ │Stepper │ + │ │Dynamic │ │set power │ │Calc & set block│ │uses block │ + └──┤Inline ├──┤or use ├──┤block power ├──┤values to │ + │ │ │default │ │using F-Value │ │apply power│ + └──────────┘ └───────────┘ └────────────────┘ └───────────┘ + ┌──────────┐ ┌──────────┐ + Sensors─────┤Fault ├──┤Disable │ + └──────────┘ │Power │ + └──────────┘ From 22fc07d72ba08df8db9545da4286ccd2558ecf30 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 2 Jun 2023 15:03:02 -0500 Subject: [PATCH 136/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Ext?= =?UTF-8?q?UI::onPlayTone=20optional=20duration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp | 2 +- Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp | 2 +- Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp | 2 +- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 2 +- Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp | 2 +- Marlin/src/lcd/extui/dgus_e3s1pro/DGUSDisplay.h | 2 +- Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.cpp | 2 +- Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.h | 2 +- Marlin/src/lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp | 2 +- Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h | 2 +- Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp | 2 +- Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h | 2 +- Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp | 2 +- Marlin/src/lcd/extui/example/example.cpp | 2 +- Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 2 +- Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp | 2 +- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 2 +- Marlin/src/lcd/extui/nextion/nextion_extui.cpp | 2 +- Marlin/src/lcd/extui/ui_api.h | 3 ++- 19 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp index 4ed0461afe0e..c29f165d2423 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp @@ -49,7 +49,7 @@ namespace ExtUI { void onMediaError() { chiron.mediaEvent(AC_media_error); } void onMediaRemoved() { chiron.mediaEvent(AC_media_removed); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { #if ENABLED(SPEAKER) ::tone(BEEPER_PIN, frequency, duration); #endif diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp index 2bd2a458b879..0006091cda2b 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp @@ -41,7 +41,7 @@ namespace ExtUI { void onMediaInserted() { anycubicTFT.onSDCardStateChange(true); } void onMediaError() { anycubicTFT.onSDCardError(); } void onMediaRemoved() { anycubicTFT.onSDCardStateChange(false); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { TERN_(SPEAKER, ::tone(BEEPER_PIN, frequency, duration)); } void onPrintTimerStarted() { anycubicTFT.onPrintTimerStarted(); } diff --git a/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp b/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp index 470fe10c43a3..d4351a4dab6f 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp @@ -49,7 +49,7 @@ namespace ExtUI { void onMediaError() { dgus.mediaEvent(AC_media_error); } void onMediaRemoved() { dgus.mediaEvent(AC_media_removed); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { #if ENABLED(SPEAKER) ::tone(BEEPER_PIN, frequency, duration); #endif diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 30d1c710b213..b956d62b36fb 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -52,7 +52,7 @@ namespace ExtUI { void onMediaError() { TERN_(HAS_MEDIA, screen.sdCardError()); } void onMediaRemoved() { TERN_(HAS_MEDIA, screen.sdCardRemoved()); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp index 5878d145ea76..d78364cb3bc1 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -33,7 +33,7 @@ #include "../../../../module/planner.h" #include "../../ui_api.h" -#include "../../../marlinui.h" +#include "../../../marlinui.h" // For material presets #if HAS_STEALTHCHOP #include "../../../../module/stepper/trinamic.h" diff --git a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSDisplay.h index 8d8a3cf01393..f635c3191b7d 100644 --- a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSDisplay.h +++ b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSDisplay.h @@ -71,7 +71,7 @@ class DGUSDisplay { write(addr, static_cast(&data), sizeof(T)); } - // Until now I did not need to actively read from the display. That's why there is no ReadVariable + // Until now I did not need to actively read from the display. That's why there is no readVariable // (I extensively use the auto upload of the display) // Read GUI and OS version from screen diff --git a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.cpp index 94c881f3842f..58313e433343 100644 --- a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.cpp @@ -281,7 +281,7 @@ void DGUSScreenHandler::configurationStoreRead(bool success) { } } -void DGUSScreenHandler::playTone(const uint16_t frequency, const uint16_t duration) { +void DGUSScreenHandler::playTone(const uint16_t frequency, const uint16_t duration/*=0*/) { if (WITHIN(frequency, 1, 255)) { if (WITHIN(duration, 1, 255)) dgus.playSound((uint8_t)frequency, (uint8_t)duration); diff --git a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.h index 9220f09aa3f7..a5f053043c7a 100644 --- a/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus_e3s1pro/DGUSScreenHandler.h @@ -99,7 +99,7 @@ class DGUSScreenHandler { static void configurationStoreWritten(bool success); static void configurationStoreRead(bool success); - static void playTone(const uint16_t frequency, const uint16_t duration); + static void playTone(const uint16_t frequency, const uint16_t duration=0); static void angryBeeps(const uint8_t beepCount); static void levelingStart(); diff --git a/Marlin/src/lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp b/Marlin/src/lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp index 4916c0b59e38..fbd8c994c7f8 100644 --- a/Marlin/src/lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp +++ b/Marlin/src/lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp @@ -59,7 +59,7 @@ namespace ExtUI { void onMediaError() { TERN_(HAS_MEDIA, screen.sdCardError()); } void onMediaRemoved() { TERN_(HAS_MEDIA, screen.sdCardRemoved()); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { screen.playTone(frequency, duration); } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h index 7c27162ce657..63830ddee585 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h @@ -74,7 +74,7 @@ class DGUSDisplay { write(addr, static_cast(&data), sizeof(T)); } - // Until now I did not need to actively read from the display. That's why there is no ReadVariable + // Until now I did not need to actively read from the display. That's why there is no readVariable // (I extensively use the auto upload of the display) // Read GUI and OS version from screen diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index 703c56d1e116..87a0f6ce1228 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -224,7 +224,7 @@ void DGUSScreenHandler::configurationStoreRead(bool success) { } } -void DGUSScreenHandler::playTone(const uint16_t frequency, const uint16_t duration) { +void DGUSScreenHandler::playTone(const uint16_t frequency, const uint16_t duration/*=0*/) { if (WITHIN(frequency, 1, 255)) { if (WITHIN(duration, 1, 255)) dgus.playSound((uint8_t)frequency, (uint8_t)duration); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h index e5942ad44d5b..2cffd55e2319 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h @@ -45,7 +45,7 @@ class DGUSScreenHandler { static void configurationStoreWritten(bool success); static void configurationStoreRead(bool success); - static void playTone(const uint16_t frequency, const uint16_t duration); + static void playTone(const uint16_t frequency, const uint16_t duration=0); static void meshUpdate(const int8_t xpos, const int8_t ypos); static void printTimerStarted(); static void printTimerPaused(); 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 68e405776e9d..3e4911f765ca 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp @@ -54,7 +54,7 @@ namespace ExtUI { void onMediaError() { TERN_(HAS_MEDIA, screen.sdCardError()); } void onMediaRemoved() { TERN_(HAS_MEDIA, screen.sdCardRemoved()); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { screen.playTone(frequency, duration); } diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index e78e4b967987..46faa49868f5 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -50,7 +50,7 @@ namespace ExtUI { void onMediaInserted() {} void onMediaError() {} void onMediaRemoved() {} - void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} 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 dc49a77ff8a3..d89e90ece1ea 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 @@ -108,7 +108,7 @@ namespace ExtUI { } void onSettingsLoaded(const bool) {} - void onPlayTone(const uint16_t frequency, const uint16_t duration) { sound.play_tone(frequency, duration); } + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { sound.play_tone(frequency, duration); } void onUserConfirmRequired(const char * const msg) { if (msg) diff --git a/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp index 490e427b855c..1c64df500f58 100644 --- a/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp @@ -98,7 +98,7 @@ void onMediaRemoved() { } } -void onPlayTone(const uint16_t frequency, const uint16_t duration) { +void onPlayTone(const uint16_t, const uint16_t/*=0*/) { rts.sendData(StartSoundSet, SoundAddr); } diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index f82f1f06a7de..4865f42354e0 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -137,7 +137,7 @@ namespace ExtUI { void onMediaInserted() {} void onMediaError() {} void onMediaRemoved() {} - void onPlayTone(const uint16_t, const uint16_t) {} + void onPlayTone(const uint16_t, const uint16_t/*=0*/) {} void onFilamentRunout(const extruder_t extruder) {} void onUserConfirmRequired(const char * const) {} void onHomingStart() {} diff --git a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp index b1e1997a3ac6..e33268f3a375 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp @@ -41,7 +41,7 @@ namespace ExtUI { void onMediaInserted() {} void onMediaError() {} void onMediaRemoved() {} - void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 28c34bd08abb..50ecd13d7553 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -43,6 +43,7 @@ ****************************************************************************/ #include "../../inc/MarlinConfig.h" + #include "../marlinui.h" #include "../../gcode/gcode.h" @@ -460,7 +461,7 @@ namespace ExtUI { void onMediaInserted(); void onMediaError(); void onMediaRemoved(); - void onPlayTone(const uint16_t frequency, const uint16_t duration); + void onPlayTone(const uint16_t frequency, const uint16_t duration=0); void onPrinterKilled(FSTR_P const error, FSTR_P const component); void onSurviveInKilled(); void onPrintTimerStarted(); From 604d3e8fadc1fd3603409f0d22d8a49de6f46cc2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 22 Jan 2024 16:38:08 -0600 Subject: [PATCH 137/236] =?UTF-8?q?=F0=9F=8E=A8=20Move=20EXIT=5FM303?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/temperature.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ad1daae76245..4ff62d017262 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -910,11 +910,6 @@ volatile bool Temperature::raw_temps_ready = false; if (set_result) GHV(_set_chamber_pid(tune_pid), _set_bed_pid(tune_pid), _set_hotend_pid(heater_id, tune_pid)); - TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(oldcolor)); - - TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); - TERN_(PROUI_PID_TUNE, dwinPidTuning(AUTOTUNE_DONE)); - goto EXIT_M303; } } @@ -922,12 +917,10 @@ volatile bool Temperature::raw_temps_ready = false; disable_all_heaters(); - TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(oldcolor)); - - TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); - TERN_(PROUI_PID_TUNE, dwinPidTuning(AUTOTUNE_DONE)); - EXIT_M303: + TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(oldcolor)); + TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); + TERN_(PROUI_PID_TUNE, dwinPidTuning(AUTOTUNE_DONE)); TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true); return; } From aa7d5714867df05348ca63ad113ea9cf7ccc3271 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 22 Jan 2024 17:32:01 -0600 Subject: [PATCH 138/236] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20LCD=20pins=20migra?= =?UTF-8?q?tion=20precursor=20(#26719)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preliminary changes for #25650 --- Marlin/src/HAL/DUE/HAL_SPI.cpp | 2 +- Marlin/src/HAL/DUE/inc/SanityCheck.h | 4 +- Marlin/src/HAL/DUE/spi_pins.h | 2 +- Marlin/src/HAL/LINUX/spi_pins.h | 3 - Marlin/src/HAL/LPC1768/spi_pins.h | 4 +- Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 3 - Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/inc/Conditionals_post.h | 12 - Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 3 - Marlin/src/lcd/dogm/marlinui_DOGM.h | 7 +- Marlin/src/module/settings.cpp | 2 +- Marlin/src/pins/esp32/pins_ENWI_ESPNP.h | 4 +- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 4 +- Marlin/src/pins/esp32/pins_PANDA_common.h | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 144 +++-- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 5 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 4 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 2 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 132 ++-- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 59 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 126 ++-- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 4 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 114 ++-- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 3 + Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 48 +- Marlin/src/pins/mega/pins_PICA.h | 67 ++- Marlin/src/pins/pins.h | 5 + Marlin/src/pins/pins_lcd.h | 45 ++ Marlin/src/pins/pins_postprocess.h | 9 + Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 62 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 102 ++-- Marlin/src/pins/ramps/pins_RAMPS.h | 292 ++++----- Marlin/src/pins/ramps/pins_RAMPS_PLUS.h | 52 +- Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 44 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 84 ++- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 12 +- Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 5 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 24 +- Marlin/src/pins/samd/pins_RAMPS_144.h | 568 ++++++++++++------ Marlin/src/pins/sanguino/pins_ANET_10.h | 32 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 165 +++-- Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h | 7 +- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 8 +- Marlin/src/pins/sanguino/pins_MELZI_V2.h | 2 + .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 126 ++-- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 8 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 4 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 16 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h | 4 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 10 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 43 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 12 + Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 40 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 13 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 6 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 146 +++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 156 +++-- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 64 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 5 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 4 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 4 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 1 - Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 1 - .../src/pins/stm32f4/pins_MKS_MONSTER8_V2.h | 4 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 4 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h | 4 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h | 4 +- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 50 +- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 4 +- Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h | 4 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 20 +- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 4 +- .../pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 2 +- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 8 +- 84 files changed, 1886 insertions(+), 1197 deletions(-) create mode 100644 Marlin/src/pins/pins_lcd.h diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index 63ebf164f2b1..c2fabb0d49b1 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -42,7 +42,7 @@ // Public functions // ------------------------ -#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI) +#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI) // ------------------------ // Software SPI diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index a8f5de8298d1..1eaa2fbd8c73 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -72,10 +72,10 @@ #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)) + #if DISABLED(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." #endif - #elif ENABLED(DUE_SOFTWARE_SPI) + #elif ENABLED(SOFTWARE_SPI) #error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix." #endif #endif diff --git a/Marlin/src/HAL/DUE/spi_pins.h b/Marlin/src/HAL/DUE/spi_pins.h index cec22c2c374a..41ac7a8b5826 100644 --- a/Marlin/src/HAL/DUE/spi_pins.h +++ b/Marlin/src/HAL/DUE/spi_pins.h @@ -48,7 +48,7 @@ #define SD_MOSI_PIN 75 #else // defaults - #define DUE_SOFTWARE_SPI + #define SOFTWARE_SPI #ifndef SD_SCK_PIN #define SD_SCK_PIN 52 #endif diff --git a/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/src/HAL/LINUX/spi_pins.h index 7bd2498be748..607b96428152 100644 --- a/Marlin/src/HAL/LINUX/spi_pins.h +++ b/Marlin/src/HAL/LINUX/spi_pins.h @@ -21,9 +21,6 @@ */ #pragma once -#include "../../core/macros.h" -#include "../../inc/MarlinConfigPre.h" - #if ALL(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. diff --git a/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/src/HAL/LPC1768/spi_pins.h index babe8a11d719..295d6462fd91 100644 --- a/Marlin/src/HAL/LPC1768/spi_pins.h +++ b/Marlin/src/HAL/LPC1768/spi_pins.h @@ -21,9 +21,7 @@ */ #pragma once -#include "../../core/macros.h" - -#if ALL(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) +#if ALL(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/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h index 9b1bae9a5836..d9911bf56ce4 100644 --- a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -21,9 +21,6 @@ */ #pragma once -#include "../../core/macros.h" -#include "../../inc/MarlinConfigPre.h" - #if ALL(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. diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 91496b1c5c50..53a74871efbb 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1063,7 +1063,7 @@ inline void tmc_standby_setup() { * - Init the buzzer, possibly a custom timer * - Init more optional hardware: * • Color LED illumination - * • Neopixel illumination + * • NeoPixel illumination * • Controller Fan * • Creality DWIN LCD (show boot image) * • Tare the Probe if possible diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 2c7420045531..64056d40f90d 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -575,7 +575,7 @@ #define MKS_MINI_12864 #endif -// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1 +// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 are nearly identical to FYSETC_MINI_12864_2_1 #if ANY(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) #define FYSETC_MINI_12864_2_1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a344d6183d8f..49562cb856f2 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3215,18 +3215,6 @@ #undef SOUND_ON_DEFAULT #endif -/** - * Make sure DOGLCD_SCK and DOGLCD_MOSI are defined. - */ -#if HAS_MARLINUI_U8GLIB - #ifndef DOGLCD_SCK - #define DOGLCD_SCK SD_SCK_PIN - #endif - #ifndef DOGLCD_MOSI - #define DOGLCD_MOSI SD_MOSI_PIN - #endif -#endif - /** * Z_CLEARANCE_FOR_HOMING / Z_CLEARANCE_BETWEEN_PROBES */ diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 1b53bb4bbe66..08e197ebb503 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -311,9 +311,6 @@ void MarlinUI::init_lcd() { #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER) SET_OUTPUT(LCD_PINS_DC); - #ifndef LCD_RESET_PIN - #define LCD_RESET_PIN LCD_PINS_RS - #endif #endif #if PIN_EXISTS(LCD_RESET) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index d23df6e2a370..59df915f496e 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -40,13 +40,16 @@ #ifdef __SAMD21__ #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #else + // Hardware SPI on DUE #define U8G_CLASS U8GLIB_ST7920_128X64_4X #endif #define U8G_PARAM LCD_PINS_RS #elif (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) + // Hardware SPI shared with SD Card #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #define U8G_PARAM LCD_PINS_RS #else + // Software SPI #define U8G_CLASS U8GLIB_ST7920_128X64_4X #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS #endif @@ -97,7 +100,7 @@ #define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF) #define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI) - #if (SMART_RAMPS && defined(__SAM3X8E__)) || DOGLCD_SCK != SD_SCK_PIN || DOGLCD_MOSI != SD_MOSI_PIN + #if (SMART_RAMPS && defined(__SAM3X8E__)) || (defined(DOGLCD_SCK) && (DOGLCD_SCK != -1 && DOGLCD_SCK != SD_SCK_PIN)) || (defined(DOGLCD_MOSI) && (DOGLCD_MOSI != -1 && DOGLCD_MOSI != SD_MOSI_PIN)) #define FORCE_SOFT_SPI // SW-SPI #endif @@ -230,7 +233,7 @@ #if ENABLED(FORCE_SOFT_SPI) #define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // SW-SPI #else - #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI + #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI #endif #endif diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 6a20488f6dfb..34f840e8e3b4 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -702,7 +702,7 @@ void MarlinSettings::postprocess() { if (oldpos != current_position) report_current_position(); - // Moved as last update due to interference with Neopixel init + // Moved as last update due to interference with NeoPixel init TERN_(HAS_LCD_CONTRAST, ui.refresh_contrast()); TERN_(HAS_LCD_BRIGHTNESS, ui.refresh_brightness()); TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); diff --git a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h index 65f734c7605d..578ccfa849f5 100644 --- a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h +++ b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h @@ -112,8 +112,8 @@ // #define FAN_SOFT_PWM_REQUIRED // check if needed -// Neopixel Rings -#define NEOPIXEL_PIN 14 +// NeoPixel Rings +#define BOARD_NEOPIXEL_PIN 14 #define NEOPIXEL2_PIN 27 // SPI diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 5ad4e525c09d..9164d60ab4f0 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -128,7 +128,7 @@ * ------ ------ * (BEEPER) 149 | 1 2 | 13 (BTN_ENC) (SPI MISO) 19 | 1 2 | 18 (SPI SCK) * (LCD_EN) 21 | 3 4 | 4 (LCD_RS) (BTN_EN1) 14 | 3 4 | 5 (SPI CS) - * (LCD_D4) 0 5 6 | 16 (LCD_D5) (BTN_EN2) 12 5 6 | 23 (SPI MOSI) + * (LCD_D4) 0 | 5 6 16 (LCD_D5) (BTN_EN2) 12 | 5 6 23 (SPI MOSI) * (LCD_D6) 15 | 7 8 | 17 (LCD_D7) (SPI_DET) 34 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 3.3V * ------ ------ @@ -159,6 +159,8 @@ //#define SD_MOSI_PIN EXP2_06_PIN // uses esp32 default 23 //#define SD_MISO_PIN EXP2_01_PIN // uses esp32 default 19 //#define SD_SCK_PIN EXP2_02_PIN // uses esp32 default 18 + +// TODO: Migrate external SD Card to pins/lcd #define SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN // IO34 default is SD_DET signal (Jump to SDDET) #define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h index b24babd96b53..2cc954940e47 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_common.h +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -86,7 +86,7 @@ * (EN1) 33 | 3 4 | (5 SDSS?) (EN) 26 | 3 4 | 27 (RS) * (EN2) 32 5 6 | (23 MOSI?) (D4) 14 | 5 6 -- * (SDDET 2?) | 7 8 | (RESET) -- | 7 8 | -- - * -- | 9 10 | -- (GND) | 9 10 | (5V) + * -- | 9 10 | -- GND | 9 10 | 5V * ------ ------ * EXP2 EXP1 */ diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 272c7d2ed2e1..ea6e4a4bee68 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -193,7 +193,7 @@ // #define SDSS 53 #define LED_PIN 13 -#define NEOPIXEL_PIN 71 +#define BOARD_NEOPIXEL_PIN 71 #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 5 // Analog Input on AUX2 @@ -371,6 +371,34 @@ #endif #endif +/** Faux Expansion Headers + * ------ ------ + * (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 17 | 3 4 | 16 (LCD_RS) (EN1) 31 | 3 4 | 53 (SDSS) + * (LCD_D4) 23 5 6 | 25 (LCD_D5) (EN2) 33 5 6 | 51 (MOSI) + * (LCD_D6) 27 | 7 8 | 29 (LCD_D7) (SD_DET) 49 | 7 8 | 41 (KILL) + * -- | 9 10 | -- -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // LCD_EN +#define EXP1_04_PIN 16 // LCD_RS +#define EXP1_05_PIN 23 // LCD_D4 +#define EXP1_06_PIN 25 // LCD_D5 +#define EXP1_07_PIN 27 // LCD_D6 +#define EXP1_08_PIN 29 // LCD_D7 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 31 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 33 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 41 // KILL + ////////////////////////// // LCDs and Controllers // ////////////////////////// @@ -385,10 +413,11 @@ #define TFT_MOSI_PIN SD_MOSI_PIN #define LCD_USE_DMA_SPI + #define BEEPER_PIN 42 + + #define BTN_ENC 59 #define BTN_EN1 40 #define BTN_EN2 63 - #define BTN_ENC 59 - #define BEEPER_PIN 42 #define TOUCH_CS_PIN 33 @@ -473,9 +502,9 @@ // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_EN 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif ALL(IS_NEWPANEL, PANEL_ONE) @@ -490,12 +519,12 @@ #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS 27 - #define LCD_PINS_EN 29 - #define LCD_PINS_D4 25 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #endif #elif ENABLED(ZONESTAR_LCD) @@ -510,38 +539,28 @@ #else #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) - #define LCD_PINS_DC 25 // Set as output on init - #define LCD_PINS_RS 27 // Pull low for 1s to init + #define LCD_PINS_DC EXP1_06_PIN // Set as output on init + #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init // DOGM SPI LCD Support - #define DOGLCD_CS 16 - #define DOGLCD_MOSI 17 - #define DOGLCD_SCK 23 + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define DOGLCD_SCK EXP1_05_PIN #define DOGLCD_A0 LCD_PINS_DC #else - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 + #define LCD_PINS_RS EXP1_04_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 #endif - #define LCD_PINS_D7 29 + #define LCD_PINS_D7 EXP1_08_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_05_PIN #endif #endif - - #if !IS_NEWPANEL - // Buttons attached to a shift register - // Not wired yet - //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN 42 - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_EN_PIN 17 - #endif - #endif // @@ -551,19 +570,19 @@ #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 17 - #define BTN_EN2 23 + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN #else - #define BTN_EN1 31 - #define BTN_EN2 33 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #endif - #define BTN_ENC 35 - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define BTN_ENC EXP1_02_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN #if ENABLED(BQ_LCD_SMART_CONTROLLER) #define LCD_BACKLIGHT_PIN 39 @@ -613,34 +632,34 @@ #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define DOGLCD_CS 29 - #define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN - #define BEEPER_PIN 23 - #define LCD_BACKLIGHT_PIN 33 + #define BEEPER_PIN EXP1_05_PIN + #define LCD_BACKLIGHT_PIN EXP2_05_PIN - #define BTN_EN1 35 - #define BTN_EN2 37 - #define BTN_ENC 31 + #define BTN_EN1 EXP1_02_PIN + #define BTN_EN2 EXP1_01_PIN + #define BTN_ENC EXP2_03_PIN #define LCD_SDSS SDSS - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN #elif ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 27 - #define DOGLCD_CS 25 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN // not connected to a pin #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 - #define BTN_EN1 31 - #define BTN_EN2 33 - #define BTN_ENC 35 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN #define KILL_PIN 64 //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -673,7 +692,6 @@ #else - // Beeper on AUX-4 #define BEEPER_PIN 33 // Buttons are directly attached to AUX-2 @@ -689,15 +707,15 @@ #define BTN_EN2 63 // AUX2 PIN 4 #define BTN_ENC 49 // AUX3 PIN 7 #else - #define BTN_EN1 37 - #define BTN_EN2 35 - #define BTN_ENC 31 - #define SD_DETECT_PIN 41 + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_02_PIN + #define BTN_ENC EXP2_03_PIN + #define SD_DETECT_PIN EXP2_08_PIN #endif #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN #endif #endif 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 687ca340b3a8..63496c407daa 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -292,9 +292,10 @@ * ------ ------ * LCD LCD */ + #define BTN_ENC EXP1_03_PIN #define BTN_EN1 EXP1_05_PIN #define BTN_EN2 EXP1_07_PIN - #define BTN_ENC EXP1_03_PIN + #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN @@ -457,8 +458,6 @@ #define DOGLCD_SCK EXP2_02_PIN #define DOGLCD_MOSI EXP2_06_PIN - #define LCD_BACKLIGHT_PIN -1 - #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 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 956f9a798103..ea340a9f9f36 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -598,8 +598,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN P1_24 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN P1_24 #endif /** diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index ee3934a4ef2d..94ce0b097b7b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -112,7 +112,7 @@ // LCD / Controller // #if !defined(BEEPER_PIN) && HAS_WIRED_LCD && DISABLED(LCD_USE_I2C_BUZZER) - #define BEEPER_PIN P1_30 // (37) not 5V tolerant + #define BEEPER_PIN P1_30 // (EXP1-1) Not 5V-tolerant #endif // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 1e45286fbf85..335d6b9d23e7 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -117,31 +117,25 @@ // Note: These pins are all digitally shared with the EXP1/EXP2 Connector. // Using them with an LCD connected or configured will lead to hangs & crashes. // - -// 5V -// NC -// GND -#define PIN_P0_17 P0_17 -#define PIN_P0_16 P0_16 -#define PIN_P0_15 P0_15 +//#define PIN_P0_17 P0_17 // 5V +//#define PIN_P0_16 P0_16 // NC +//#define PIN_P0_15 P0_15 // GND // // Connector J8 // - -// GND -#define PIN_P1_22 P1_22 -#define PIN_P1_23 P1_23 // PWM Capable -#define PIN_P2_12 P2_12 // Interrupt Capable -#define PIN_P2_11 P2_11 // Interrupt Capable +#define PIN_P1_22 P1_22 // GND +#define PIN_P1_23 P1_23 // PWM-capable +#define PIN_P2_12 P2_12 // Interrupt-capable +#define PIN_P2_11 P2_11 // Interrupt-capable // // Průša i3 MMU1 (Multi Material Multiplexer) Support // #if HAS_PRUSA_MMU1 - #define E_MUX0_PIN P1_23 // J8-3 - #define E_MUX1_PIN P2_12 // J8-4 - #define E_MUX2_PIN P2_11 // J8-5 + #define E_MUX0_PIN PIN_P1_23 // J8-3 + #define E_MUX1_PIN PIN_P2_12 // J8-4 + #define E_MUX2_PIN PIN_P2_11 // J8-5 #endif // @@ -177,21 +171,19 @@ #if SD_CONNECTION_IS(CUSTOM_CABLE) /** - * A custom cable is needed. See the README file in the - * Marlin\src\config\examples\Mks\Sbase directory - * P0.27 is on EXP2 and the on-board SD card's socket. That means it can't be - * used as the SD_DETECT for the LCD's SD card. + * A custom cable is needed. + * See https://github.com/MarlinFirmware/Configurations/blob/release-2.1/config/examples/Mks/Sbase/README.md + * P0.27 is on EXP2 and the on-board SD card socket so it can't be used as SD_DETECT for the LCD SD card. * - * The best solution is to use the custom cable to connect the LCD's SD_DETECT - * to a pin NOT on EXP2. + * The best solution is to use the custom cable to connect the LCD SD_DETECT to a pin NOT on EXP2. * - * If you can't find a pin to use for the LCD's SD_DETECT then comment out - * SD_DETECT_PIN entirely and remove that wire from the the custom cable. + * If you can't find a pin to use for the LCD SD_DETECT then comment out SD_DETECT_PIN and remove that wire + * from the the custom cable. */ - #define SD_DETECT_PIN P2_11 // J8-5 (moved from EXP2 P0.27) - #define SD_SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.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_DETECT_PIN PIN_P2_11 // J8-5 (moved from EXP2 P0.27) + #define SD_SCK_PIN PIN_P1_22 // J8-2 (moved from EXP2 P0.7) + #define SD_MISO_PIN PIN_P1_23 // J8-3 (moved from EXP2 P0.8) + #define SD_MOSI_PIN PIN_P2_12 // J8-4 (moved from EXP2 P0.9) #define SD_SS_PIN P0_28 #define SOFTWARE_SPI // With a custom cable we need software SPI because the // selected pins are not on a hardware SPI controller @@ -212,17 +204,28 @@ #endif /** - * Smart LCD adapter - * - * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as - * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use - * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable - * is needed to pick up 5V for the EXP1 connection. - * - * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines - * on the LCD display during accesses of the SD card. The menus/code has been arranged so - * that the garbage/lines are erased immediately after the SD card accesses are completed. + * ------ ------ + * 1.31 | 1 2 | 1.30 0.08 | 1 2 | 0.07 + * 0.18 | 3 4 | 0.16 3.25 | 3 4 | 0.28 + * 0.15 | 5 6 -- 3.26 | 5 6 0.09 + * -- | 7 8 | -- 0.27 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_01_PIN P1_31 +#define EXP1_02_PIN P1_30 +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_16 +#define EXP1_05_PIN P0_15 + +#define EXP2_01_PIN P0_08 +#define EXP2_02_PIN P0_07 +#define EXP2_03_PIN P3_25 +#define EXP2_04_PIN P0_28 +#define EXP2_05_PIN P3_26 +#define EXP2_06_PIN P0_09 +#define EXP2_07_PIN P0_27 // // LCD / Controller @@ -230,23 +233,22 @@ #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_25 // EXP2.3 + #define TFTGLCD_CS EXP2_03_PIN #endif - #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN P0_28 // EXP2.4 + #define SD_DETECT_PIN EXP2_04_PIN #endif #elif HAS_WIRED_LCD - #define BEEPER_PIN P1_31 // EXP1.1 - #define BTN_ENC P1_30 // EXP1.2 - #define BTN_EN1 P3_26 // EXP2.5 - #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_EN P0_18 // EXP1.3 - #define LCD_PINS_D4 P0_15 // EXP1.5 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_SDSS EXP2_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #if ANY(VIKI2, miniVIKI) #define DOGLCD_SCK SD_SCK_PIN #define DOGLCD_MOSI SD_MOSI_PIN @@ -264,9 +266,9 @@ * 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 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_CS EXP1_03_PIN // LCD_EN + #define DOGLCD_A0 EXP1_04_PIN // LCD_A0 + #define DOGLCD_SCK PIN_P2_11 // J8-5 (SCK on FYSETC schematic) #define DOGLCD_MOSI P4_28 // J8-6 (MOSI on FYSETC schematic) //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems @@ -274,16 +276,16 @@ #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on FYSETC schematic) + #define RGB_LED_R_PIN PIN_P2_12 // J8-4 (LCD_D6 on FYSETC schematic) #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_23 // J8-3 (LCD_D5 on FYSETC schematic) + #define RGB_LED_G_PIN PIN_P1_23 // J8-3 (LCD_D5 on FYSETC schematic) #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_22 // J8-2 (LCD_D7 on FYSETC schematic) + #define RGB_LED_B_PIN PIN_P1_22 // J8-2 (LCD_D7 on FYSETC schematic) #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P2_12 + #define NEOPIXEL_PIN PIN_P2_12 #endif #elif ENABLED(MINIPANEL) @@ -300,10 +302,10 @@ #if HAS_DRIVER(TMC2130) // J8 - #define X_CS_PIN P1_22 - #define Y_CS_PIN P1_23 - #define Z_CS_PIN P2_12 - #define E0_CS_PIN P2_11 + #define X_CS_PIN PIN_P1_22 + #define Y_CS_PIN PIN_P1_23 + #define Z_CS_PIN PIN_P2_12 + #define E0_CS_PIN PIN_P2_11 #define E1_CS_PIN P4_28 // Hardware SPI is on EXP2. See if you can make it work: @@ -330,13 +332,13 @@ * Worst case you may have to give up the LCD * RX pins need to be interrupt capable */ - #define X_SERIAL_TX_PIN P1_22 // J8-2 - #define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable + #define X_SERIAL_TX_PIN PIN_P1_22 // J8-2 + #define X_SERIAL_RX_PIN PIN_P2_12 // J8-4 Interrupt Capable - #define Y_SERIAL_TX_PIN P1_23 // J8-3 - #define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable + #define Y_SERIAL_TX_PIN PIN_P1_23 // J8-3 + #define Y_SERIAL_RX_PIN PIN_P2_11 // J8-5 Interrupt Capable - #define Z_SERIAL_TX_PIN P2_12 // J8-4 + #define Z_SERIAL_TX_PIN PIN_P2_12 // J8-4 #define Z_SERIAL_RX_PIN P0_25 // TH3 #define E0_SERIAL_TX_PIN P4_28 // J8-6 diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index f3b134cd36f4..84c2eca91984 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -167,7 +167,7 @@ #define TEMP_2_PIN P0_26_A3 // A3 - (63) - J5-3 & AUX-2 #define TEMP_3_PIN P1_30_A4 // A4 - (37) - BUZZER_PIN //#define TEMP_4_PIN P1_31_A5 // A5 - (49) - SD_DETECT_PIN -//#define ?? P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1 +//#define PIN_P0_03 P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1 #define FILWIDTH_PIN P0_02_A7 // A7 - ( 1) - TXD0 - J4-5 & AUX-1 // @@ -293,14 +293,13 @@ #if ENABLED(CR10_STOCKDISPLAY) // Re-Arm can support Creality stock display without SD card reader and single cable on EXP3. - // Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one + // Re-Arm J3 pins 1 (P1.31) & 2 (P3.26) are not used. Stock cable will need to have one // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3. - // Requires REVERSE_ENCODER_DIRECTION in Configuration.h #define BEEPER_PIN P2_11 // J3-3 & AUX-4 - #define BTN_EN1 P0_16 // J3-7 & AUX-4 - #define BTN_EN2 P1_23 // J3-5 & AUX-4 + #define BTN_EN1 P1_23 // J3-5 & AUX-4 + #define BTN_EN2 P0_16 // J3-7 & AUX-4 #define BTN_ENC P3_25 // J3-4 & AUX-4 #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) @@ -325,8 +324,8 @@ #elif HAS_WIRED_LCD #if ENABLED(FYSETC_MINI_12864) - #define BEEPER_PIN P1_01 - #define BTN_ENC P1_04 + #define BEEPER_PIN P1_01 // (79) J12-12 + #define BTN_ENC P1_04 // (77) J12-10 #else #define BEEPER_PIN P1_30 // (37) not 5V tolerant #define BTN_ENC P2_11 // (35) J3-3 & AUX-4 @@ -367,14 +366,14 @@ #else #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_SCK P0_15 - #define DOGLCD_MOSI P0_18 + #define DOGLCD_SCK P0_15 // (52) (SCK) J3-9 & AUX-3 + #define DOGLCD_MOSI P0_18 // (51) (MOSI) J3-10 & AUX-3 // EXP1 on LCD adapter is not usable - using Ethernet connector instead - #define DOGLCD_CS P1_09 - #define DOGLCD_A0 P1_14 - //#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 DOGLCD_CS P1_09 // (74) J12-7 + #define DOGLCD_A0 P1_14 // (73) J12-6 + //#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. #define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally. @@ -396,24 +395,22 @@ #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 #endif - #define LCD_BACKLIGHT_PIN P0_16 //(16) J3-7 & AUX-4 - only used on DOGLCD controllers + #define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers #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 #define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER #define LCD_PINS_D7 P1_10 // (75) ENET_RXD1 - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #endif #endif #if ENABLED(MINIPANEL) //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #endif + #endif #endif // HAS_WIRED_LCD @@ -421,17 +418,17 @@ // Ethernet pins // #if !IS_ULTIPANEL - #define ENET_MDIO P1_17 // (71) J12-4 - #define ENET_RX_ER P1_14 // (73) J12-6 - #define ENET_RXD1 P1_10 // (75) J12-8 + #define ENET_MDIO P1_17 // (71) J12-4 + #define ENET_RX_ER P1_14 // (73) J12-6 + #define ENET_RXD1 P1_10 // (75) J12-8 #endif -#define ENET_MOC P1_16 // (70) J12-3 -#define REF_CLK P1_15 // (72) J12-5 -#define ENET_RXD0 P1_09 // (74) J12-7 -#define ENET_CRS P1_08 // (76) J12-9 -#define ENET_TX_EN P1_04 // (77) J12-10 -#define ENET_TXD0 P1_00 // (78) J12-11 -#define ENET_TXD1 P1_01 // (79) J12-12 +#define ENET_MOC P1_16 // (70) J12-3 +#define REF_CLK P1_15 // (72) J12-5 +#define ENET_RXD0 P1_09 // (74) J12-7 +#define ENET_CRS P1_08 // (76) J12-9 +#define ENET_TX_EN P1_04 // (77) J12-10 +#define ENET_TXD0 P1_00 // (78) J12-11 +#define ENET_TXD1 P1_01 // (79) J12-12 // // SD Support @@ -441,10 +438,10 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3 - #define SD_MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3 - #define SD_MOSI_PIN P0_18 // (51) system defined J3-10 & AUX-3 - #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin + #define SD_SCK_PIN P0_15 // (52) System-defined J3-9 & AUX-3 + #define SD_MISO_PIN P0_17 // (50) System-defined J3-10 & AUX-3 + #define SD_MOSI_PIN P0_18 // (51) System-defined J3-10 & AUX-3 + #define SD_SS_PIN P1_23 // (53) System-defined J3-5 & AUX-3 (aka SDSS, CS) #elif SD_CONNECTION_IS(ONBOARD) #undef SD_DETECT_PIN #define SD_SCK_PIN P0_07 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 92e97ca8753d..f1753d0e2b95 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -33,7 +33,7 @@ #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Azteeg X5 MINI" #endif -#define BOARD_WEBSITE_URL "tiny.cc/x5_mini" +#define BOARD_WEBSITE_URL "panucatt.com" // // LED @@ -56,11 +56,11 @@ #define Z_STOP_PIN P1_28 #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN P2_04 + #define FIL_RUNOUT_PIN _EXP1_09 #endif #ifndef FILWIDTH_PIN - #define FILWIDTH_PIN P0_25_A2 // Analog Input (P0_25) + #define FILWIDTH_PIN _EXP1_04 // Analog Input (P0_25) #endif // @@ -109,6 +109,47 @@ #endif #define FAN1_PIN P1_25 +// +// Headers V1.1 - V3.0 +// +//#define _EXP1_01 -1 // GND +#define _EXP1_02 P1_03 +//#define _EXP1_03 -1 // 3.3V +#define _EXP1_04 P0_25_A2 +#define _EXP1_05 P0_27 // SDA0 +#define _EXP1_06 P4_29 +#define _EXP1_07 P0_28 // SCL0 +#define _EXP1_08 P2_08 +#define _EXP1_09 P2_04 +#define _EXP1_10 P1_22 + +#define _EXP2_01 P1_31 +#define _EXP2_02 P3_26 +#define _EXP2_03 P2_11 +#define _EXP2_04 P3_25 +#define _EXP2_05 P1_23 +#define _EXP2_06 P0_17 +#define _EXP2_07 P0_16 +#define _EXP2_08 P2_06 +#define _EXP2_09 P0_15 +#define _EXP2_10 P0_18 + +// +// Only V2.0 +// +//#define _J7_01 -1 // 3.3V +//#define _J7_02 -1 // GND +#define _J7_03 P1_16 +#define _J7_04 P1_17 +#define _J7_05 P1_15 +#define _J7_06 P0_14 +#define _J7_07 P1_09 +#define _J7_08 P1_10 +#define _J7_09 P1_08 +#define _J7_10 P1_04 +#define _J7_11 P1_00 +#define _J7_12 P1_01 + // // Display // @@ -121,61 +162,60 @@ // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3. // Requires REVERSE_ENCODER_DIRECTION in Configuration.h - #define BEEPER_PIN P2_11 // J3-3 & AUX-4 + #define BEEPER_PIN _EXP2_03 - #define BTN_EN1 P0_16 // J3-7 & AUX-4 - #define BTN_EN2 P1_23 // J3-5 & AUX-4 - #define BTN_ENC P3_25 // J3-4 & AUX-4 + #define BTN_EN1 _EXP2_07 + #define BTN_EN2 _EXP2_05 + #define BTN_ENC _EXP2_04 - #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) - #define LCD_PINS_EN P0_18 // J3-10 & AUX-3 (SID, MOSI) - #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK) + #define LCD_PINS_RS _EXP2_09 + #define LCD_PINS_EN _EXP2_10 + #define LCD_PINS_D4 _EXP2_08 #else - #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 - #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 - #define BTN_ENC P2_11 // (35) J3-3 & AUX-4 + #define BTN_EN1 _EXP2_02 + #define BTN_EN2 _EXP2_04 + #define BTN_ENC _EXP2_03 - #define SD_DETECT_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 - #define KILL_PIN P1_22 // (41) J5-4 & AUX-4 - #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_EN P0_18 // (51) (MOSI) J3-10 & AUX-3 - #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3 + #define SD_DETECT_PIN _EXP2_01 + #define KILL_PIN _EXP1_10 + #define LCD_PINS_RS _EXP2_07 + #define LCD_SDSS _EXP2_07 + #define LCD_BACKLIGHT_PIN _EXP2_07 + #define LCD_PINS_EN _EXP2_10 + #define LCD_PINS_D4 _EXP2_09 - #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 + #define DOGLCD_A0 _EXP2_08 #if IS_RRW_KEYPAD - #define SHIFT_OUT_PIN P0_18 // (51) (MOSI) J3-10 & AUX-3 - #define SHIFT_CLK_PIN P0_15 // (52) (SCK) J3-9 & AUX-3 - #define SHIFT_LD_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 + #define SHIFT_OUT_PIN _EXP2_10 + #define SHIFT_CLK_PIN _EXP2_09 + #define SHIFT_LD_PIN _EXP2_01 #elif !IS_NEWPANEL - //#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4 - //#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4 - //#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4 - //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4 + //#define SHIFT_OUT_PIN _EXP2_03 + //#define SHIFT_CLK_PIN _EXP2_02 + //#define SHIFT_LD_PIN _EXP2_04 + //#define SHIFT_EN_PIN _EXP1_10 #endif #if ANY(VIKI2, miniVIKI) - #define BEEPER_PIN P1_30 // (37) may change if cable changes - #define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2 + #define BEEPER_PIN P1_30 + #define DOGLCD_CS P0_26 #define DOGLCD_SCK SD_SCK_PIN #define DOGLCD_MOSI SD_MOSI_PIN - #define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes - #define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes + #define STAT_LED_BLUE_PIN P0_26 + #define STAT_LED_RED_PIN P1_21 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #else #if IS_ULTIPANEL - #define LCD_PINS_D5 P1_17 // (71) ENET_MDIO - #define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER - #define LCD_PINS_D7 P1_10 // (75) ENET_RXD1 + #define LCD_PINS_D5 P1_17 + #define LCD_PINS_D6 P1_14 + #define LCD_PINS_D7 P1_10 #endif - #define BEEPER_PIN P1_30 // (37) not 5V tolerant - #define DOGLCD_CS P0_16 // (16) + #define BEEPER_PIN P1_30 + #define DOGLCD_CS _EXP2_07 #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -183,7 +223,7 @@ #endif - #if ENABLED(MINIPANEL) + #if ANY(VIKI2, miniVIKI, MINIPANEL) //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #endif @@ -199,10 +239,10 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN P0_15 - #define SD_MISO_PIN P0_17 - #define SD_MOSI_PIN P0_18 - #define SD_SS_PIN P1_23 + #define SD_SCK_PIN _EXP2_09 + #define SD_MISO_PIN _EXP2_06 + #define SD_MOSI_PIN _EXP2_10 + #define SD_SS_PIN _EXP2_05 #elif SD_CONNECTION_IS(ONBOARD) #undef SD_DETECT_PIN #define SD_SCK_PIN P0_07 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 6d2018ef352b..f329636f2b30 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -87,8 +87,8 @@ #endif // LED driving pin -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN P1_24 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN P1_24 #endif // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 362aafe12e75..a6acde35ffe3 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -158,6 +158,37 @@ #define SPINDLE_DIR_PIN P2_06 // FET 4 #endif +/** ------ ------ + * (BEEPER) 1.31 | 1 2 | 1.30 (BTN_ENC) (MISO) 0.8 | 1 2 | 0.7 (SD_SCK) + * (EN) 0.18 | 3 4 | 0.16 (RS) (EN1) 3.26 | 3 4 | 0.28 (SD_CS2) + * (D4) 0.15 5 6 | -- (EN2) 3.25 5 6 | 0.9 (SD_MOSI) + * -- | 7 8 | 0.27 (D7) (SD_DET) 0.27 | 7 8 | 2.11 + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN P1_31 +#define EXP1_02_PIN P1_30 +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_16 +#define EXP1_05_PIN P0_15 +#define EXP1_06_PIN -1 +#define EXP1_07_PIN -1 +#define EXP1_08_PIN P0_27 // (also on EXP2-7) +#define EXP1_09_PIN -1 +#define EXP1_10_PIN -1 + +#define EXP2_01_PIN P0_08 +#define EXP2_02_PIN P0_07 +#define EXP2_03_PIN P3_26 +#define EXP2_04_PIN P0_28 +#define EXP2_05_PIN P3_25 +#define EXP2_06_PIN P0_09 +#define EXP2_07_PIN P0_27 // (also on EXP1-8) +#define EXP2_08_PIN P2_11 +#define EXP2_09_PIN -1 +#define EXP2_10_PIN -1 + // // LCD / Controller // @@ -171,54 +202,54 @@ #if ENABLED(FYSETC_MINI_12864) - #define FORCE_SOFT_SPI // REQUIRED - results in LCD soft SPI mode 3 + #define FORCE_SOFT_SPI // REQUIRED. Results in LCD Software SPI mode 3 - #define BEEPER_PIN P1_31 // EXP1-1 - #define BTN_ENC P1_30 // EXP1-2 - #define DOGLCD_CS P0_18 // EXP1-3 - #define DOGLCD_A0 P0_16 // EXP1-4 - #define LCD_RESET_PIN P0_15 // EXP1-5 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define LCD_RESET_PIN EXP1_05_PIN // A custom cable is REQUIRED for EXP2 cable because the SCK & MOSI on the card's EXP2 are dedicated // to the onboard SD card. All required EXP2 signals come from the Ethernet connector. Pin 1 of this // connector is the one nearest the motor power connector. - #define DOGLCD_SCK P1_17 // EXP2-2 => Ethernet pin 5 (bottom, 3 from left) - #define BTN_EN2 P1_09 // EXP2-3 => Ethernet pin 9 (bottom, 5 from left) - #define BTN_EN1 P1_04 // EXP2-5 => Ethernet pin 11 (bottom, 6 from left) - #define DOGLCD_MOSI P1_01 // EXP2-6 => Ethernet pin 13 (bottom, 7 from left) + #define DOGLCD_SCK P1_17 // LCD2-2 => Ethernet pin 5 (bottom, 3 from left) + #define BTN_EN2 P1_09 // LCD2-3 => Ethernet pin 9 (bottom, 5 from left) + #define BTN_EN1 P1_04 // LCD2-5 => Ethernet pin 11 (bottom, 6 from left) + #define DOGLCD_MOSI P1_01 // LCD2-6 => Ethernet pin 13 (bottom, 7 from left) // A custom EXP1 cable is required colored LEDs. Pins 1-5, 9, 10 of the cable go to pins 1-5, 9, 10 // on the board's EXP1 connector. Pins 6, 7, and 8 of the EXP1 cable go to the Ethernet connector. // Rev 1.2 displays do NOT require the RGB LEDs. 2.0 and 2.1 displays do require RGB. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #define RGB_LED_R_PIN P1_16 // LCD1-6 => Ethernet pin 6 (top row, 3 from left) #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_10 // EXP1-7 => Ethernet pin 10 (top row, 5 from left) + #define RGB_LED_G_PIN P1_10 // LCD1-7 => Ethernet pin 10 (top row, 5 from left) #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_00 // EXP1-8 => Ethernet pin 12 (top row, 6 from left) + #define RGB_LED_B_PIN P1_00 // LCD1-8 => Ethernet pin 12 (top row, 6 from left) #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #define NEOPIXEL_PIN P1_16 // LCD1-6 => Ethernet pin 6 (top row, 3 from left) #endif #elif HAS_WIRED_LCD - #define BEEPER_PIN P1_31 // EXP1-1 - //#define SD_DETECT_PIN P0_27 // EXP2-7 + #define BEEPER_PIN EXP1_01_PIN + //#define SD_DETECT_PIN EXP2_07_PIN - #define BTN_EN1 P3_26 // EXP2-5 - #define BTN_EN2 P3_25 // EXP2-3 - #define BTN_ENC P1_30 // EXP1-2 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_RS P0_16 // EXP1-4 - #define LCD_SDSS P0_28 // EXP2-4 - #define LCD_PINS_EN P0_18 // EXP1-3 - #define LCD_PINS_D4 P0_15 // EXP1-5 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_SDSS EXP2_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define KILL_PIN P2_11 // EXP2-10 + #define KILL_PIN EXP2_08_PIN #endif // HAS_WIRED_LCD @@ -230,11 +261,11 @@ #endif #if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) - #define SD_SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3 - #define SD_MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3 - #define SD_MOSI_PIN P0_09 // (51) system defined J3-10 & AUX-3 + #define SD_SCK_PIN EXP2_02_PIN // (52) System-defined J3-9 & AUX-3 + #define SD_MISO_PIN EXP2_01_PIN // (50) System-defined J3-10 & AUX-3 + #define SD_MOSI_PIN EXP2_06_PIN // (51) System-defined J3-10 & AUX-3 #if SD_CONNECTION_IS(LCD) - #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin + #define SD_SS_PIN P1_23 // (53) System-defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin #else #undef SD_DETECT_PIN #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card @@ -257,30 +288,3 @@ //#define ENET_TX_EN P1_04 // Ethernet pin 11 (bottom, 6 from left) //#define ENET_TXD0 P1_00 // Ethernet pin 12 (top row, 6 from left) //#define ENET_TXD1 P1_01 // Ethernet pin 13 (bottom, 7 from left) - -/** - * EXP1 pins - * 1 - P1_31 - * 2 - P1_30 - * 3 - P0_18 - * 4 - P0_16 - * 5 - P0_15 - * 6 - N/C - * 7 - N/C - * 8 - P0_27 (also on EXP2-7) - * 9 - GND - * 10 - +5V - * - * - * EXP2 pins - * 1 - P0_08 - * 2 - P0_07 - * 3 - P3_26 - * 4 - P0_28 - * 5 - P3_25 - * 6 - P0_09 - * 7 - P0_27 (also on EXP1_8) - * 8 - P2_11 - * 9 - GND - * 10 - N/C - */ 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 4043f868cff3..613ba19e15ae 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -436,6 +436,9 @@ #endif // HAS_WIRED_LCD +// +// SD Card +// #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 049917b6b689..3868f11c11b0 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -129,31 +129,59 @@ // // Misc. Functions // -#define SDSS 53 +#define SDSS MINI_06 #define LED_PIN 13 #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN 2 #endif +/** + * MegaController LCD/SD Connector + * + * SDD MOSI SDSS -- RESET -- LCDSS A0 KILL ENC + * 49 51 53 | 45 47 12 10 + * PL0 PB2 PB0 | PL4 PL2 PB6 PB4 + * ---------------------------------------------------------- + * | 2 4 6 8 10 12 14 16 18 20 | + * | 1 3 5 7 9 11 13 15 17 19 | + * ---------------------------------------------------------- + * | PB3 PB1 | | PL5 PL3 PL1 PB5 + * | 50 52 | | 44 46 48 11 + * 5V MISO SCK GND 3V3 -- BL BEEP EN1 EN2 + */ +#define MINI_02 49 // SD_DETECT +#define MINI_03 50 // MISO +#define MINI_04 51 // MOSI +#define MINI_05 52 // SCK +#define MINI_06 53 // SDSS +#define MINI_13 44 // BACKLIGHT +#define MINI_14 45 // LCDSS +#define MINI_15 46 // BEEP +#define MINI_16 47 // A0 +#define MINI_17 48 // EN1 +#define MINI_18 12 // KILL +#define MINI_19 11 // EN2 +#define MINI_20 10 // ENC + // // LCD / Controller // #if ENABLED(MINIPANEL) - #define BEEPER_PIN 46 + #define BEEPER_PIN MINI_15 - #define DOGLCD_A0 47 - #define DOGLCD_CS 45 - #define LCD_BACKLIGHT_PIN 44 // backlight LED on PA3 + #define DOGLCD_A0 MINI_16 + #define DOGLCD_CS MINI_14 + #define LCD_BACKLIGHT_PIN MINI_13 // backlight LED on PA3 - #define KILL_PIN 12 + #define KILL_PIN MINI_18 - #define BTN_EN1 48 - #define BTN_EN2 11 - #define BTN_ENC 10 + #define BTN_ENC MINI_20 + #define BTN_EN1 MINI_17 + #define BTN_EN2 MINI_19 - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN MINI_02 //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 5e9d607a7864..0a6478439c58 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -43,15 +43,6 @@ #define BOARD_INFO_NAME "PICA" #endif -/* -// Note that these are the "pins" that correspond to the analog inputs on the arduino mega. -// These are not the same as the physical pin numbers - AD0 = 54; AD1 = 55; AD2 = 56; AD3 = 57; - AD4 = 58; AD5 = 59; AD6 = 60; AD7 = 61; - AD8 = 62; AD9 = 63; AD10 = 64; AD11 = 65; - AD12 = 66; AD13 = 67; AD14 = 68; AD15 = 69; -*/ - // // Servos // @@ -136,25 +127,53 @@ // // SD Support // -#define SD_DETECT_PIN 49 -#define SDSS 53 +#define SD_DETECT_PIN EXP2_07_PIN +#define SDSS EXP2_04_PIN + +/** PICA Expansion Headers + * ------ ------ + * (BEEP) 29 | 1 2 | 31 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 30 | 3 4 | 33 (LCD_RS) (EN1) 47 | 3 4 | 53 (SDSS) + * (LCD_D4) 35 5 6 | 32 (LCD_D5) (EN2) 48 5 6 | 51 (MOSI) + * (LCD_D6) 37 | 7 8 | 36 (LCD_D7) (SDDET) 49 | 7 8 | 41 (KILL) + * GND | 9 10 | 5V -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 29 // BEEPER +#define EXP1_02_PIN 31 // ENC +#define EXP1_03_PIN 30 // LCD_EN +#define EXP1_04_PIN 33 // LCD_RS +#define EXP1_05_PIN 35 // LCD_D4 +#define EXP1_06_PIN 32 // LCD_D5 +#define EXP1_07_PIN 37 // LCD_D6 +#define EXP1_08_PIN 36 // LCD_D7 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 47 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 48 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SDDET +#define EXP2_08_PIN 41 // KILL // // LCD / Controller // -#define BEEPER_PIN 29 +#define BEEPER_PIN EXP1_01_PIN #if HAS_WIRED_LCD - #define LCD_PINS_RS 33 - #define LCD_PINS_EN 30 - #define LCD_PINS_D4 35 - #define LCD_PINS_D5 32 - #define LCD_PINS_D6 37 - #define LCD_PINS_D7 36 - - #define BTN_EN1 47 - #define BTN_EN2 48 - #define BTN_ENC 31 - - #define LCD_SDSS 53 + #define LCD_PINS_RS EXP1_04_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 + #define LCD_PINS_D7 EXP1_08_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN + + #define LCD_SDSS EXP2_04_PIN #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index d162881993ef..71d663d1eaf3 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -1053,6 +1053,11 @@ #endif +// +// LCD / Controller Pins based on board expansion headers with adapters +// +#include "pins_lcd.h" + // // Post-process pins according to configured settings // diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h new file mode 100644 index 000000000000..e5cc88059754 --- /dev/null +++ b/Marlin/src/pins/pins_lcd.h @@ -0,0 +1,45 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * pins_lcd.h - Define LCD pins based on the EXP connector / adapter + */ + +/** + * Certain displays use LCD_PINS_RS as LCD_RESET_PIN + */ +#if !defined(LCD_RESET_PIN) && ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER) + #define LCD_RESET_PIN LCD_PINS_RS +#endif + +/** + * Make sure DOGLCD_SCK and DOGLCD_MOSI are defined. + */ +#if HAS_MARLINUI_U8GLIB + #ifndef DOGLCD_SCK + #define DOGLCD_SCK SD_SCK_PIN + #endif + #ifndef DOGLCD_MOSI + #define DOGLCD_MOSI SD_MOSI_PIN + #endif +#endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index e97b6ceaa440..abe193d9794a 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1723,3 +1723,12 @@ #undef DIAG_REMAPPED #undef _E_DIAG_EXISTS #undef E_DIAG_EXISTS + +// Get a NeoPixel pin from the LCD or board, if provided +#ifndef NEOPIXEL_PIN + #ifdef LCD_NEOPIXEL_PIN + #define NEOPIXEL_PIN LCD_NEOPIXEL_PIN + #elif defined(BOARD_NEOPIXEL_PIN) + #define NEOPIXEL_PIN BOARD_NEOPIXEL_PIN + #endif +#endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index b4f09b7136b1..6d37fcf7df77 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -169,6 +169,36 @@ #define E_MUX2_PIN 78 // 84 in MK2 Firmware, with BEEPER as 78 #endif +// +// EXP Headers +// +#define EXP1_01_PIN 84 // PH2 +#define EXP1_02_PIN 9 // PH6 +#define EXP1_03_PIN 18 // TX1 +#define EXP1_04_PIN 82 // PD5 +#define EXP1_05_PIN 19 // RX1 +#define EXP1_06_PIN 70 // PG4 +#define EXP1_07_PIN 85 // PH7 +#define EXP1_08_PIN 71 // PG3 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 72 // PJ2 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 14 // TX3 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 15 // RX3 +#define EXP2_08_PIN -1 // RESET + +#define EXP3_01_PIN 62 // PK0 (A8) +#define EXP3_02_PIN 76 // PJ5 +#define EXP3_03_PIN 20 // SDA +#define EXP3_04_PIN -1 // GND +#define EXP3_05_PIN 21 // SCL +#define EXP3_06_PIN 16 // RX2 +#define EXP3_07_PIN -1 // GND +#define EXP3_08_PIN 17 // TX2 + // // LCD / Controller // @@ -179,26 +209,26 @@ #if ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS 85 - #define LCD_PINS_EN 71 - #define LCD_PINS_D4 70 - #define BTN_EN1 18 - #define BTN_EN2 19 + #define LCD_PINS_RS EXP1_07_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 82 - #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 - #define LCD_PINS_D7 71 - #define BTN_EN1 14 - #define BTN_EN2 72 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN // On 0.6b, use 61 + #define LCD_PINS_D4 EXP1_05_PIN // On 0.6b, use 59 + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN #endif - #define BTN_ENC 9 // AUX-2 - #define BEEPER_PIN 84 // AUX-4 + #define BTN_ENC EXP1_02_PIN // AUX-2 + #define BEEPER_PIN EXP1_01_PIN // AUX-4 - #define SD_DETECT_PIN 15 + #define SD_DETECT_PIN EXP2_07_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 824dbd9f2df8..08c40822fc76 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -192,7 +192,7 @@ // // Misc. Functions // -#define SDSS 53 +#define SDSS EXP2_04_PIN #define LED_PIN 13 #define KILL_PIN 41 @@ -201,80 +201,98 @@ #endif /** - * ----- ----- - * 5V/D41 | · · | GND 5V | · · | GND - * RESET | · · | D49 (SD_DETECT) (LCD_D7) D29 | · · | D27 (LCD_D6) - * (MOSI) D51 | · · D33 (BTN_EN2) (LCD_D5) D25 | · · D23 (LCD_D4) - * (SD_SS) D53 | · · | D31 (BTN_EN1) (LCD_RS) D16 | · · | D17 (LCD_EN) - * (SCK) D52 | · · | D50 (MISO) (BTN_ENC) D35 | · · | D37 (BEEPER) - * ----- ----- - * EXP2 EXP1 + * ------ ------ + * (BEEPER) D37 | 1 2 | D35 (BTN_ENC) (MISO) D50 | 1 2 | D52 (SCK) + * (LCD_EN) D17 | 3 4 | D16 (LCD_RS) (BTN_EN1) D31 | 3 4 | D53 (SD_SS) + * (LCD_D4) D23 5 6 | D25 (LCD_D5) (BTN_EN2) D33 5 6 | D51 (MOSI) + * (LCD_D6) D27 | 7 8 | D29 (LCD_D7) (SD_DETECT) D49 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | 5V / D41 + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // LCD_EN +#define EXP1_04_PIN 16 // LCD_RS +#define EXP1_05_PIN 23 // LCD_D4 +#define EXP1_06_PIN 25 // LCD_D5 +#define EXP1_07_PIN 27 // LCD_D6 +#define EXP1_08_PIN 29 // LCD_D7 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 31 // EN1 +#define EXP2_04_PIN 53 // SD_SS +#define EXP2_05_PIN 33 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DETECT +#define EXP2_08_PIN -1 // RESET + // // LCDs and Controllers // -#define SD_DETECT_PIN 49 +#define SD_DETECT_PIN EXP2_07_PIN #if ENABLED(FYSETC_242_OLED_12864) - #define BTN_EN1 37 - #define BTN_EN2 29 - #define BTN_ENC 35 - #define BEEPER_PIN 31 - - #define LCD_PINS_DC 25 - #define LCD_PINS_RS 33 - #define DOGLCD_CS 16 - #define DOGLCD_MOSI 23 - #define DOGLCD_SCK 17 + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_08_PIN + #define BTN_ENC EXP1_02_PIN + #define BEEPER_PIN EXP2_03_PIN + + #define LCD_PINS_DC EXP1_06_PIN + #define LCD_PINS_RS EXP2_05_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_05_PIN + #define DOGLCD_SCK EXP1_03_PIN #define DOGLCD_A0 LCD_PINS_DC #undef KILL_PIN - #define NEOPIXEL_PIN 27 + #define BOARD_NEOPIXEL_PIN EXP1_07_PIN #else - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #if ENABLED(FYSETC_MINI_12864) // // See https://wiki.fysetc.com/Mini12864_Panel/ // - #define DOGLCD_A0 16 - #define DOGLCD_CS 17 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN #if ENABLED(FYSETC_GENERIC_12864_1_1) - #define LCD_BACKLIGHT_PIN 27 + #define LCD_BACKLIGHT_PIN EXP1_07_PIN #endif - #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + // Seems to work best if left open. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN 25 + #define RGB_LED_R_PIN EXP1_06_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN 27 + #define RGB_LED_G_PIN EXP1_07_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN 29 + #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN 25 + #define NEOPIXEL_PIN EXP1_06_PIN #endif #elif HAS_MARLINUI_U8GLIB || HAS_MARLINUI_HD44780 - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 - #define LCD_PINS_D7 29 + #define LCD_PINS_RS EXP1_04_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 + #define LCD_PINS_D7 EXP1_08_PIN #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS 25 - #define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN #endif #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) @@ -284,9 +302,9 @@ #endif #if IS_NEWPANEL - #define BTN_EN1 31 - #define BTN_EN2 33 - #define BTN_ENC 35 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 08c059477b05..a90366e11ce0 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -142,18 +142,18 @@ // // Steppers // -#define X_STEP_PIN 54 -#define X_DIR_PIN 55 +#define X_STEP_PIN 54 // (A0) +#define X_DIR_PIN 55 // (A1) #define X_ENABLE_PIN 38 #ifndef X_CS_PIN - #define X_CS_PIN 53 + #define X_CS_PIN AUX3_06 #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 -#define Y_ENABLE_PIN 56 +#define Y_ENABLE_PIN 56 // (A2) #ifndef Y_CS_PIN - #define Y_CS_PIN 49 + #define Y_CS_PIN AUX3_02 #endif #ifndef Z_STEP_PIN @@ -166,7 +166,7 @@ #define Z_ENABLE_PIN 62 #endif #ifndef Z_CS_PIN - #define Z_CS_PIN 40 + #define Z_CS_PIN AUX2_06 #endif #ifndef E0_STEP_PIN @@ -179,7 +179,7 @@ #define E0_ENABLE_PIN 24 #endif #ifndef E0_CS_PIN - #define E0_CS_PIN 42 + #define E0_CS_PIN AUX2_08 #endif #ifndef E1_STEP_PIN @@ -192,7 +192,7 @@ #define E1_ENABLE_PIN 30 #endif #ifndef E1_CS_PIN - #define E1_CS_PIN 44 + #define E1_CS_PIN AUX2_07 #endif // @@ -212,7 +212,7 @@ // SPI for MAX Thermocouple // #ifndef TEMP_0_CS_PIN - #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN AUX2_09 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) #endif // @@ -273,12 +273,12 @@ // Misc. Functions // #ifndef SDSS - #define SDSS AUX3_06_PIN + #define SDSS AUX3_06 #endif #define LED_PIN 13 #ifndef FILWIDTH_PIN - #define FILWIDTH_PIN 5 // Analog Input on AUX2 + #define FILWIDTH_PIN 5 // (A5) Analog Input AUX2_03 #endif // RAMPS 1.4 DIO 4 on the servos connector @@ -294,7 +294,7 @@ #if NUM_SERVOS <= 1 // Prefer the servo connector #define CASE_LIGHT_PIN 6 // Hardware PWM #elif HAS_FREE_AUX2_PINS - #define CASE_LIGHT_PIN 44 // Hardware PWM + #define CASE_LIGHT_PIN AUX2_07 // Hardware PWM #endif #endif @@ -303,15 +303,15 @@ // #if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN) #if NUM_SERVOS < 2 // Use servo connector if possible - #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #ifndef SPINDLE_LASER_PWM_PIN #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM #endif + #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #define SPINDLE_DIR_PIN 5 #elif HAS_FREE_AUX2_PINS - #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM - #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! - #define SPINDLE_DIR_PIN 65 + #define SPINDLE_LASER_PWM_PIN AUX2_07 // Hardware PWM + #define SPINDLE_LASER_ENA_PIN AUX2_06 // Pullup or pulldown! + #define SPINDLE_DIR_PIN AUX2_10 #else #error "No auto-assignable Spindle/Laser pins available." #endif @@ -322,13 +322,13 @@ // #if HAS_TMC_SPI #ifndef TMC_SPI_MOSI - #define TMC_SPI_MOSI 66 + #define TMC_SPI_MOSI AUX2_09 #endif #ifndef TMC_SPI_MISO - #define TMC_SPI_MISO 44 + #define TMC_SPI_MISO AUX2_07 #endif #ifndef TMC_SPI_SCK - #define TMC_SPI_SCK 64 + #define TMC_SPI_SCK AUX2_05 #endif #endif @@ -356,10 +356,10 @@ //#define E4_HARDWARE_SERIAL Serial1 #ifndef X_SERIAL_TX_PIN - #define X_SERIAL_TX_PIN 40 + #define X_SERIAL_TX_PIN AUX2_06 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN 63 + #define X_SERIAL_RX_PIN AUX2_04 #endif #ifndef X2_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN -1 @@ -369,10 +369,10 @@ #endif #ifndef Y_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN 59 + #define Y_SERIAL_TX_PIN AUX2_03 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN 64 + #define Y_SERIAL_RX_PIN AUX2_05 #endif #ifndef Y2_SERIAL_TX_PIN #define Y2_SERIAL_TX_PIN -1 @@ -382,10 +382,10 @@ #endif #ifndef Z_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN 42 + #define Z_SERIAL_TX_PIN AUX2_08 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN 65 + #define Z_SERIAL_RX_PIN AUX2_10 #endif #ifndef Z2_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN -1 @@ -395,10 +395,10 @@ #endif #ifndef E0_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN 44 + #define E0_SERIAL_TX_PIN AUX2_07 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN 66 + #define E0_SERIAL_RX_PIN AUX2_09 #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN -1 @@ -449,13 +449,13 @@ // #if HAS_PRUSA_MMU1 #ifndef E_MUX0_PIN - #define E_MUX0_PIN 40 // Z_CS_PIN + #define E_MUX0_PIN AUX2_06 // Z_CS_PIN #endif #ifndef E_MUX1_PIN - #define E_MUX1_PIN 42 // E0_CS_PIN + #define E_MUX1_PIN AUX2_08 // E0_CS_PIN #endif #ifndef E_MUX2_PIN - #define E_MUX2_PIN 44 // E1_CS_PIN + #define E_MUX2_PIN AUX2_07 // E1_CS_PIN #endif #endif @@ -465,10 +465,10 @@ // 1 3 5 7 // 5V GND A3 A4 // -#define AUX1_05_PIN 57 // (A3) -#define AUX1_06_PIN 2 -#define AUX1_07_PIN 58 // (A4) -#define AUX1_08_PIN 1 +#define AUX1_05 57 // (A3) +#define AUX1_06 2 +#define AUX1_07 58 // (A4) +#define AUX1_08 1 // // AUX2 GND A9 D40 D42 A11 @@ -476,14 +476,14 @@ // 1 3 5 7 9 // VCC A5 A10 D44 A12 // -#define AUX2_03_PIN 59 // (A5) -#define AUX2_04_PIN 63 // (A9) -#define AUX2_05_PIN 64 // (A10) -#define AUX2_06_PIN 40 -#define AUX2_07_PIN 44 -#define AUX2_08_PIN 42 -#define AUX2_09_PIN 66 // (A12) -#define AUX2_10_PIN 65 // (A11) +#define AUX2_03 59 // (A5) +#define AUX2_04 63 // (A9) +#define AUX2_05 64 // (A10) +#define AUX2_06 40 +#define AUX2_07 44 +#define AUX2_08 42 +#define AUX2_09 66 // (A12) +#define AUX2_10 65 // (A11) // // AUX3 GND D52 D50 5V @@ -491,31 +491,31 @@ // 8 6 4 2 // NC D53 D51 D49 // -#define AUX3_02_PIN 49 -#define AUX3_03_PIN 50 -#define AUX3_04_PIN 51 -#define AUX3_05_PIN 52 -#define AUX3_06_PIN 53 +#define AUX3_02 49 +#define AUX3_03 50 +#define AUX3_04 51 +#define AUX3_05 52 +#define AUX3_06 53 // // AUX4 5V GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16 // -#define AUX4_03_PIN 32 -#define AUX4_04_PIN 47 -#define AUX4_05_PIN 45 -#define AUX4_06_PIN 43 -#define AUX4_07_PIN 41 -#define AUX4_08_PIN 39 -#define AUX4_09_PIN 37 -#define AUX4_10_PIN 35 -#define AUX4_11_PIN 33 -#define AUX4_12_PIN 31 -#define AUX4_13_PIN 29 -#define AUX4_14_PIN 27 -#define AUX4_15_PIN 25 -#define AUX4_16_PIN 23 -#define AUX4_17_PIN 17 -#define AUX4_18_PIN 16 +#define AUX4_03 32 +#define AUX4_04 47 +#define AUX4_05 45 +#define AUX4_06 43 +#define AUX4_07 41 +#define AUX4_08 39 +#define AUX4_09 37 +#define AUX4_10 35 +#define AUX4_11 33 +#define AUX4_12 31 +#define AUX4_13 29 +#define AUX4_14 27 +#define AUX4_15 25 +#define AUX4_16 23 +#define AUX4_17 17 +#define AUX4_18 16 /** * LCD adapters come in different variants. The socket keys can be @@ -523,60 +523,60 @@ */ #ifndef EXP1_08_PIN - #define EXP1_03_PIN AUX4_17_PIN - #define EXP1_04_PIN AUX4_18_PIN - #define EXP1_05_PIN AUX4_16_PIN - #define EXP1_06_PIN AUX4_15_PIN - #define EXP1_07_PIN AUX4_14_PIN - #define EXP1_08_PIN AUX4_13_PIN + #define EXP1_03_PIN AUX4_17 // 17 + #define EXP1_04_PIN AUX4_18 // 16 + #define EXP1_05_PIN AUX4_16 // 23 + #define EXP1_06_PIN AUX4_15 // 25 + #define EXP1_07_PIN AUX4_14 // 27 + #define EXP1_08_PIN AUX4_13 // 29 - #define EXP2_01_PIN AUX3_03_PIN - #define EXP2_02_PIN AUX3_05_PIN - #define EXP2_04_PIN AUX3_06_PIN - #define EXP2_06_PIN AUX3_04_PIN - #define EXP2_07_PIN AUX3_02_PIN + #define EXP2_01_PIN AUX3_03 // 50 (MISO) + #define EXP2_02_PIN AUX3_05 // 52 + #define EXP2_04_PIN AUX3_06 // 53 + #define EXP2_06_PIN AUX3_04 // 51 + #define EXP2_07_PIN AUX3_02 // 49 #if ENABLED(G3D_PANEL) /** Gadgets3D Smart Adapter - * ------ ------ - * 4-11 | 1 2 | 4-12 (MISO) 3-03 | 1 2 | 3-05 (SCK) - * 4-17 | 3 4 | 4-18 4-10 | 3 4 | 3-06 - * 4-16 5 6 | 4-15 4-09 5 6 | 3-04 (MOSI) - * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 - * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- - * ------ ------ - * EXP1 EXP2 + * ------ ------ + * 33 4-11 | 1 2 | 4-12 31 (MISO) 50 3-03 | 1 2 | 3-05 52 (SCK) + * 17 4-17 | 3 4 | 4-18 16 35 4-10 | 3 4 | 3-06 53 + * 23 4-16 5 6 | 4-15 25 37 4-09 5 6 | 3-04 51 (MOSI) + * 27 4-14 | 7 8 | 4-13 29 49 3-02 | 7 8 | 4-07 41 + * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 */ - #define EXP1_01_PIN AUX4_11_PIN - #define EXP1_02_PIN AUX4_12_PIN + #define EXP1_01_PIN AUX4_11 // 33 + #define EXP1_02_PIN AUX4_12 // 31 - #define EXP2_03_PIN AUX4_10_PIN - #define EXP2_05_PIN AUX4_09_PIN - #define EXP2_08_PIN AUX4_07_PIN + #define EXP2_03_PIN AUX4_10 // 35 + #define EXP2_05_PIN AUX4_09 // 37 + #define EXP2_08_PIN AUX4_07 // 41 #else /** Smart Adapter (c) RRD * ------ ------ - * 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 (SCK) - * 4-17 | 3 4 | 4-18 4-12 | 3 4 | 3-06 - * 4-16 5 6 | 4-15 4-11 5 6 | 3-04 (MOSI) - * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * 37 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 52 (SCK) + * 17 4-17 | 3 4 | 4-18 31 4-12 | 3 4 | 3-06 53 + * 23 4-16 5 6 | 4-15 33 4-11 5 6 | 3-04 51 (MOSI) + * 27 4-14 | 7 8 | 4-13 49 3-02 | 7 8 | 4-07 41 * (GND) 3-07 | 9 10 | 3-01 (5V) (GND) 3-07 | 9 10 | -- * ------ ------ * EXP1 EXP2 */ - #define EXP1_01_PIN AUX4_09_PIN - #define EXP1_02_PIN AUX4_10_PIN + #define EXP1_01_PIN AUX4_09 // 37 + #define EXP1_02_PIN AUX4_10 // 35 #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) - #define EXP2_03_PIN AUX4_11_PIN - #define EXP2_05_PIN AUX4_12_PIN + #define EXP2_03_PIN AUX4_11 // 33 + #define EXP2_05_PIN AUX4_12 // 31 #define EXP2_08_PIN -1 // RESET #else - #define EXP2_03_PIN AUX4_12_PIN - #define EXP2_05_PIN AUX4_11_PIN - #define EXP2_08_PIN AUX4_07_PIN + #define EXP2_03_PIN AUX4_12 // 31 + #define EXP2_05_PIN AUX4_11 // 33 + #define EXP2_08_PIN AUX4_07 // 41 #endif #endif @@ -587,7 +587,11 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) +#ifdef LCD_PINS_DEFINED + + // LCD pins already defined by including header + +#elif HAS_WIRED_LCD //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -602,12 +606,12 @@ #elif ALL(IS_NEWPANEL, PANEL_ONE) - #define LCD_PINS_RS AUX2_06_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 - #define LCD_PINS_D7 AUX2_05_PIN + #define LCD_PINS_RS AUX2_06 + #define LCD_PINS_EN AUX2_08 + #define LCD_PINS_D4 AUX2_10 + #define LCD_PINS_D5 AUX2_09 + #define LCD_PINS_D6 AUX2_07 + #define LCD_PINS_D7 AUX2_05 #elif ENABLED(TFTGLCD_PANEL_SPI) @@ -631,12 +635,12 @@ #error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif - #define LCD_PINS_RS AUX2_05_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 - #define LCD_PINS_D7 AUX2_10_PIN + #define LCD_PINS_RS AUX2_05 + #define LCD_PINS_EN AUX2_07 + #define LCD_PINS_D4 AUX2_04 + #define LCD_PINS_D5 AUX2_06 + #define LCD_PINS_D6 AUX2_08 + #define LCD_PINS_D7 AUX2_10 #elif ENABLED(AZSMZ_12864) @@ -672,8 +676,8 @@ // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN AUX2_08_PIN - //#define SHIFT_OUT_PIN AUX2_06_PIN + //#define SHIFT_LD_PIN AUX2_08 + //#define SHIFT_OUT_PIN AUX2_06 //#define SHIFT_EN_PIN EXP1_03_PIN #endif @@ -707,30 +711,30 @@ #endif #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_BACKLIGHT_PIN AUX4_08_PIN + #define LCD_BACKLIGHT_PIN AUX4_08 #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define BTN_EN1 AUX2_05_PIN - #define BTN_EN2 AUX2_03_PIN - #define BTN_ENC AUX2_04_PIN + #define BTN_EN1 AUX2_05 + #define BTN_EN2 AUX2_03 + #define BTN_ENC AUX2_04 #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN AUX2_08_PIN + #define SD_DETECT_PIN AUX2_08 #endif #elif ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 AUX4_04_PIN - #define BTN_EN2 AUX4_06_PIN - #define BTN_ENC AUX4_03_PIN + #define BTN_EN1 AUX4_04 + #define BTN_EN2 AUX4_06 + #define BTN_ENC AUX4_03 #define LCD_SDSS SDSS #define KILL_PIN EXP2_08_PIN #elif ENABLED(LCD_I2C_VIKI) - #define BTN_EN1 AUX2_06_PIN // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. - #define BTN_EN2 AUX2_08_PIN + #define BTN_EN1 AUX2_06 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. + #define BTN_EN2 AUX2_08 #define BTN_ENC -1 #define LCD_SDSS SDSS @@ -740,19 +744,19 @@ #elif ANY(VIKI2, miniVIKI) - #define DOGLCD_CS AUX4_05_PIN - #define DOGLCD_A0 AUX2_07_PIN + #define DOGLCD_CS AUX4_05 + #define DOGLCD_A0 AUX2_07 #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #ifndef BEEPER_PIN #define BEEPER_PIN EXP2_05_PIN #endif - #define STAT_LED_RED_PIN AUX4_03_PIN + #define STAT_LED_RED_PIN AUX4_03 #define STAT_LED_BLUE_PIN EXP1_02_PIN #define BTN_EN1 22 #define BTN_EN2 7 - #define BTN_ENC AUX4_08_PIN + #define BTN_ENC AUX4_08 #ifndef SD_DETECT_PIN #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board @@ -837,19 +841,19 @@ #ifndef BEEPER_PIN #define BEEPER_PIN AUX2_08_PIN #endif - #define LCD_BACKLIGHT_PIN AUX2_10_PIN + #define LCD_BACKLIGHT_PIN AUX2_10 - #define DOGLCD_A0 AUX2_07_PIN - #define DOGLCD_CS AUX2_09_PIN + #define DOGLCD_A0 AUX2_07 + #define DOGLCD_CS AUX2_09 - #define BTN_EN1 AUX2_06_PIN - #define BTN_EN2 AUX2_04_PIN - #define BTN_ENC AUX2_03_PIN + #define BTN_EN1 AUX2_06 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX2_03 #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN AUX3_02_PIN + #define SD_DETECT_PIN AUX3_02 #endif - #define KILL_PIN AUX2_05_PIN + #define KILL_PIN AUX2_05 #elif ENABLED(ZONESTAR_LCD) @@ -883,9 +887,9 @@ #endif #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 + #define BTN_EN1 AUX2_03 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX3_02 #else #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_02_PIN @@ -902,17 +906,17 @@ #endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED #if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS - #define SHIFT_OUT_PIN AUX2_06_PIN - #define SHIFT_CLK_PIN AUX2_07_PIN - #define SHIFT_LD_PIN AUX2_08_PIN + #define SHIFT_OUT_PIN AUX2_06 + #define SHIFT_CLK_PIN AUX2_07 + #define SHIFT_LD_PIN AUX2_08 #ifndef BTN_EN1 - #define BTN_EN1 AUX2_05_PIN + #define BTN_EN1 AUX2_05 #endif #ifndef BTN_EN2 - #define BTN_EN2 AUX2_03_PIN + #define BTN_EN2 AUX2_03 #endif #ifndef BTN_ENC - #define BTN_ENC AUX2_04_PIN + #define BTN_ENC AUX2_04 #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index f93c6919d960..a7f5a790094c 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -22,7 +22,7 @@ #pragma once /** - * Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments + * Arduino Mega with RAMPS v1.4Plus, aka 3DYMY version * ATmega2560, ATmega1280 * * Applies to the following boards: @@ -64,32 +64,32 @@ #define E1_ENABLE_PIN 24 #define E1_CS_PIN -1 -/** 3DYMY Expansion Headers - * ------ ------ - * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 52 (SCK) - * 31 | 3 4 | 41 29 | 3 4 | 53 - * 33 5 6 | 23 25 5 6 | 51 (MOSI) - * 42 | 7 8 | 44 49 | 7 8 | 27 - * GND | 9 10 | 5V GND | 9 10 | -- - * ------ ------ - * EXP1 EXP2 +/** 3DYMY Expansion Headers + * ------ ------ + * (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 31 | 3 4 | 41 (LCD_RS) (EN1) 29 | 3 4 | 53 (SDSS) + * (LCD_D4) 33 5 6 | 23 (LCD_D5) (EN2) 25 5 6 | 51 (MOSI) + * (LCD_D6) 42 | 7 8 | 44 (LCD_D7) (SD_DET) 49 | 7 8 | 27 (KILL) + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 */ -#define EXP1_01_PIN 37 -#define EXP1_02_PIN 35 -#define EXP1_03_PIN 31 -#define EXP1_04_PIN 41 -#define EXP1_05_PIN 33 -#define EXP1_06_PIN 23 -#define EXP1_07_PIN 42 -#define EXP1_08_PIN 44 +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 31 // LCD_EN +#define EXP1_04_PIN 41 // LCD_RS +#define EXP1_05_PIN 33 // LCD_D4 +#define EXP1_06_PIN 23 // LCD_D5 +#define EXP1_07_PIN 42 // LCD_D6 +#define EXP1_08_PIN 44 // LCD_D7 -#define EXP2_01_PIN 50 -#define EXP2_02_PIN 52 -#define EXP2_03_PIN 29 -#define EXP2_04_PIN 53 -#define EXP2_05_PIN 25 -#define EXP2_06_PIN 51 -#define EXP2_07_PIN 49 -#define EXP2_08_PIN 27 +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 29 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 25 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 27 // KILL #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index 7306272127e1..d3c921a5f654 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -75,33 +75,33 @@ * 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 +/** Expansion Headers + * ------ ------ + * (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 17 | 3 4 | 16 (LCD_RS) (EN1) 31 | 3 4 | 53 (SDSS) + * (LCD_D4) 23 5 6 | 25 (LCD_D5) (EN2) 33 5 6 | 51 (MOSI) + * (LCD_D6) 27 | 7 8 | 29 (LCD_D7) (SD_DET) 49 | 7 8 | 41 (KILL) + * 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 EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // LCD_EN +#define EXP1_04_PIN 16 // LCD_RS +#define EXP1_05_PIN 23 // LCD_D4 +#define EXP1_06_PIN 25 // LCD_D5 +#define EXP1_07_PIN 27 // LCD_D6 +#define EXP1_08_PIN 29 // LCD_D7 #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_03_PIN 31 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 33 // EN2 #define EXP2_06_PIN 51 // MOSI -#define EXP2_07_PIN 49 -#define EXP2_08_PIN 41 +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 41 // KILL // // AnyCubic pin mappings diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 1edeb6b8fedf..64f595f31232 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -21,7 +21,11 @@ */ #pragma once -// ATmega2560 +/** + * TT OSCAR by YM Tech.LTD + * + * ATmega2560 + */ #include "env_validate.h" @@ -73,12 +77,12 @@ #define Z_STEP_PIN 46 #define Z_DIR_PIN 48 #define Z_ENABLE_PIN 62 -#define Z_CS_PIN 53 +#define Z_CS_PIN 53 // EXP2-4 #define E0_STEP_PIN 26 #define E0_DIR_PIN 28 #define E0_ENABLE_PIN 24 -#define E0_CS_PIN 49 +#define E0_CS_PIN 49 // EXP2-7 #define E1_STEP_PIN 36 #define E1_DIR_PIN 34 @@ -209,11 +213,11 @@ // // Misc. Functions // -#define SDSS 53 +#define SDSS 53 // EXP2-4 #define LED_PIN 13 //#ifndef FILWIDTH_PIN -// #define FILWIDTH_PIN 5 // Analog Input +// #define FILWIDTH_PIN 5 // Analog Input //#endif // DIO 4 (Servos plug) for the runout sensor. @@ -257,13 +261,49 @@ #define E_MUX0_PIN 58 // Y_CS_PIN #endif #ifndef E_MUX1_PIN - #define E_MUX1_PIN 53 // Z_CS_PIN + #define E_MUX1_PIN 53 // EXP2-4 #endif #ifndef E_MUX2_PIN - #define E_MUX2_PIN 49 // En_CS_PIN + #define E_MUX2_PIN 49 // EXP2-7 #endif #endif +/** TT OSCAR Expansion Headers + * ------ + * -- | 1 2 | -- + * -- 3 4 | -- + * -- 5 6 | -- + * 49 | 7 8 | -- + * ------ + * AUX1 + * + * ------ ------ + * 37 | 1 2 | 35 (MISO) 44 | 1 2 | 52 (SCK) + * 17 | 3 4 | 41? 35 | 3 4 | 53 + * 23 5 6 | 25 31 5 6 | 51 (MOSI) + * 27 | 7 8 | 29 49 | 7 8 | 41 + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // ENC1 +#define EXP1_04_PIN 41 // RESET +#define EXP1_05_PIN 23 // ENC2 +#define EXP1_06_PIN 25 // D4 +#define EXP1_07_PIN 27 // RS +#define EXP1_08_PIN 29 // EN + +#define EXP2_01_PIN 44 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 35 // EN2 / EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 31 // EN1 / EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 41 // KILL / RESET + ////////////////////////// // LCDs and Controllers // ////////////////////////// @@ -275,9 +315,9 @@ // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_EN 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif ALL(IS_NEWPANEL, PANEL_ONE) @@ -369,7 +409,7 @@ #endif #define BTN_ENC 35 - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) @@ -388,7 +428,7 @@ #define BTN_EN1 47 #define BTN_EN2 43 #define BTN_ENC 32 - #define LCD_SDSS 53 + #define LCD_SDSS EXP2_04_PIN //#define KILL_PIN 41 #elif ENABLED(LCD_I2C_VIKI) @@ -397,8 +437,8 @@ #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13. #define BTN_ENC -1 - #define LCD_SDSS 53 - #define SD_DETECT_PIN 49 + #define LCD_SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN #elif ANY(VIKI2, miniVIKI) @@ -413,7 +453,7 @@ #define BTN_EN2 7 #define BTN_ENC 39 - #define SDSS 53 + #define SDSS EXP2_04_PIN #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board //#define KILL_PIN 31 @@ -431,8 +471,8 @@ #define BTN_EN2 37 #define BTN_ENC 31 - #define LCD_SDSS 53 - #define SD_DETECT_PIN 49 + #define LCD_SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 #elif ENABLED(MKS_MINI_12864) @@ -447,8 +487,8 @@ #define BTN_EN1 31 #define BTN_EN2 33 #define BTN_ENC 35 - //#define SDSS 53 - #define SD_DETECT_PIN 49 + //#define SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 64 //#define LCD_CONTRAST_INIT 190 @@ -467,8 +507,8 @@ #define BTN_EN2 63 #define BTN_ENC 59 - #define SDSS 53 - #define SD_DETECT_PIN 49 + #define SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 64 //#define LCD_CONTRAST_INIT 190 @@ -498,7 +538,7 @@ #endif #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 #endif diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 08585c2c275e..beea40ab20f0 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_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 LCD_PINS_RS 16 // ST7920 CS (LCD-4) + #define LCD_PINS_EN 23 // ST7920 DAT LCD-R/W (LCD-5) + #define LCD_PINS_D4 17 // ST7920 CLK LCD-ENA (LCD-6) #define BTN_EN2 25 #define BTN_EN1 27 #define BTN_ENC 29 @@ -347,9 +347,9 @@ #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define LCDSCREEN_NAME "Reprap LCD12864" // Use EXP1 & EXP2 connector - #define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS - #define LCD_PINS_EN 17 // ST7920_DAT_PIN LCD_PIN_ENA - #define LCD_PINS_D4 23 // ST7920_CLK_PIN LCD_PIN_R/W + #define LCD_PINS_RS 16 // ST7920 CS + #define LCD_PINS_EN 17 // ST7920 DAT + #define LCD_PINS_D4 23 // ST7920 CLK LCD-R/W #define BTN_EN1 31 #define BTN_EN2 33 #define BTN_ENC 35 diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index 8fd1843ab59e..b85150f1ca29 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -62,7 +62,7 @@ // LED defines // //#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) -//#define NEOPIXEL_PIN 20 // LED driving pin on motherboard +//#define BOARD_NEOPIXEL_PIN 20 // LED driving pin on motherboard //#define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip //#define SDA0 20 // PB12 NeoPixel pin I2C data //#define SCL0 21 // PB13 I2C clock diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index f5587a6cbaa1..1ae96ebe6d86 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -134,7 +134,9 @@ #define SDSS 4 #define LED_PIN 13 -/** ------ ------ +/** + * RAMPS-FD LCD adapter + * ------ ------ * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 76 (SCK) * 29 | 3 4 | 27 (EN2) 31 | 3 4 | 4 (SD_SS) * 25 5 6 | 23 (EN1) 33 5 6 | 75 (MOSI) @@ -165,7 +167,6 @@ // LCD / Controller // #if HAS_WIRED_LCD - // ramps-fd lcd adaptor #define BEEPER_PIN EXP1_01_PIN diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 64fad0e08123..b28971c19211 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -195,22 +195,22 @@ * ------ ------ * EXP1 EXP2 */ -#define EXP1_01_PIN 62 -#define EXP1_02_PIN 40 -#define EXP1_03_PIN 64 -#define EXP1_04_PIN 63 -#define EXP1_05_PIN 48 -#define EXP1_06_PIN 50 -#define EXP1_07_PIN 52 -#define EXP1_08_PIN 53 +#define EXP1_01_PIN 62 // BEEPER +#define EXP1_02_PIN 40 // ENC +#define EXP1_03_PIN 64 // LCD_EN +#define EXP1_04_PIN 63 // LCD_RS +#define EXP1_05_PIN 48 // LCD_D4 / RESET +#define EXP1_06_PIN 50 // LCD_D5 +#define EXP1_07_PIN 52 // LCD_D6 +#define EXP1_08_PIN 53 // LCD_D7 / ENABLE #define EXP2_01_PIN 74 // MISO #define EXP2_02_PIN 76 // SCK -#define EXP2_03_PIN 44 -#define EXP2_04_PIN 10 -#define EXP2_05_PIN 42 +#define EXP2_03_PIN 44 // EN1 +#define EXP2_04_PIN 10 // SDSS +#define EXP2_05_PIN 42 // EN2 #define EXP2_06_PIN 75 // MOSI -#define EXP2_07_PIN 51 +#define EXP2_07_PIN 51 // SD DET #define EXP2_08_PIN -1 // RESET // diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 3e5d563929ed..da3af2a0ab3e 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -48,6 +48,21 @@ #define I2C_EEPROM // EEPROM on I2C-0 #define MARLIN_EEPROM_SIZE 0x8000 // 32K (24lc256) +// +// Foam Cutter requirements +// + +#if ENABLED(FOAMCUTTER_XYUV) + #define MOSFET_C_PIN -1 + #if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN) && NUM_SERVOS < 2 + #define SPINDLE_LASER_PWM_PIN 8 // Hardware PWM + #endif + #define Z_MIN_PIN -1 + #define Z_MAX_PIN -1 + #define I_STOP_PIN 18 + #define J_STOP_PIN 19 +#endif + // // Limit Switches // @@ -260,79 +275,233 @@ #define SDSS 53 #endif +// +// Průša i3 MK2 Multiplexer Support +// +#if HAS_PRUSA_MMU1 + #ifndef E_MUX0_PIN + #define E_MUX0_PIN AUX2_06 // Z_CS_PIN + #endif + #ifndef E_MUX1_PIN + #define E_MUX1_PIN AUX2_08 // E0_CS_PIN + #endif + #ifndef E_MUX2_PIN + #define E_MUX2_PIN AUX2_07 // E1_CS_PIN + #endif +#endif + +// +// AUX1 VCC GND D2 D1 +// 2 4 6 8 +// 1 3 5 7 +// VCC GND A3 A4 +// +#define AUX1_05 57 // (A3) +#define AUX1_06 2 +#define AUX1_07 58 // (A4) +#define AUX1_08 1 + +// +// AUX2 GND A9 D40 D42 A11 +// 2 4 6 8 10 +// 1 3 5 7 9 +// VCC A5 A10 D44 A12 +// +#define AUX2_03 59 // (A5) +#define AUX2_04 63 // (A9) +#define AUX2_05 64 // (A10) +#define AUX2_06 40 +#define AUX2_07 44 +#define AUX2_08 42 +#define AUX2_09 66 // (A12) +#define AUX2_10 65 // (A11) + +// +// AUX3 +// SCK MISO +// RST GND D52 D50 VCC +// 9 7 5 3 1 +// 10 8 6 4 2 +// NC 5V D53 D51 D49 +// MOSI +// +#define AUX3_02 49 +#define AUX3_03 50 +#define AUX3_04 51 +#define AUX3_05 52 +#define AUX3_06 53 + +// +// AUX4 VCC GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16 +// +#define AUX4_03 32 +#define AUX4_04 47 +#define AUX4_05 45 +#define AUX4_06 43 +#define AUX4_07 41 +#define AUX4_08 39 +#define AUX4_09 37 +#define AUX4_10 35 +#define AUX4_11 33 +#define AUX4_12 31 +#define AUX4_13 29 +#define AUX4_14 27 +#define AUX4_15 25 +#define AUX4_16 23 +#define AUX4_17 17 +#define AUX4_18 16 + +/** + * LCD adapters come in different variants. The socket keys can be + * on either side, and may be backwards on some boards / displays. + */ +#ifndef EXP1_08_PIN + + #define EXP1_03_PIN AUX4_17 + #define EXP1_04_PIN AUX4_18 + #define EXP1_05_PIN AUX4_16 + #define EXP1_06_PIN AUX4_15 + #define EXP1_07_PIN AUX4_14 + #define EXP1_08_PIN AUX4_13 + + #define EXP2_01_PIN AUX3_03 + #define EXP2_02_PIN AUX3_05 + #define EXP2_04_PIN AUX3_06 + #define EXP2_06_PIN AUX3_04 + #define EXP2_07_PIN AUX3_02 + + #if ENABLED(G3D_PANEL) + /** Gadgets3D Smart Adapter + * ------ ------ + * 4-11 | 1 2 | 4-12 (MISO) 3-03 | 1 2 | 3-05 (SCK) + * 4-17 | 3 4 | 4-18 4-10 | 3 4 | 3-06 + * 4-16 5 6 | 4-15 4-09 5 6 | 3-04 (MOSI) + * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + #define EXP1_01_PIN AUX4_11 + #define EXP1_02_PIN AUX4_12 + + #define EXP2_03_PIN AUX4_10 + #define EXP2_05_PIN AUX4_09 + #define EXP2_08_PIN AUX4_07 + + #else + + /** Smart Adapter (c) RRD + * ------ ------ + * 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 (SCK) + * 4-17 | 3 4 | 4-18 4-12 | 3 4 | 3-06 + * 4-16 5 6 | 4-15 4-11 5 6 | 3-04 (MOSI) + * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * (GND) 3-07 | 9 10 | 3-01 (5V) (GND) 3-07 | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + #define EXP1_01_PIN AUX4_09 + #define EXP1_02_PIN AUX4_10 + + #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + #define EXP2_03_PIN AUX4_11 + #define EXP2_05_PIN AUX4_12 + #define EXP2_08_PIN -1 // RESET + #else + #define EXP2_03_PIN AUX4_12 + #define EXP2_05_PIN AUX4_11 + #define EXP2_08_PIN AUX4_07 + #endif + + #endif + +#endif + ////////////////////////// // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD +#ifdef LCD_PINS_DEFINED + + // LCD pins already defined by including header + +#elif HAS_WIRED_LCD + + //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 // // LCD Display output pins // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - // TO TEST - //#define LCD_PINS_RS 49 // CS chip select /SS chip slave select - //#define LCD_PINS_EN 51 // SID (MOSI) - //#define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif ALL(IS_NEWPANEL, PANEL_ONE) - // TO TEST - //#define LCD_PINS_RS 40 - //#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 - //#define LCD_PINS_D7 56 // Mega/Due:64 - AGCM4:56 + #define LCD_PINS_RS AUX2_06 + #define LCD_PINS_EN AUX2_08 + #define LCD_PINS_D4 AUX2_10 + #define LCD_PINS_D5 AUX2_09 + #define LCD_PINS_D6 AUX2_07 + #define LCD_PINS_D7 AUX2_05 + + #elif ENABLED(TFTGLCD_PANEL_SPI) + + #define TFTGLCD_CS EXP2_05_PIN #else #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - //#define LCD_PINS_RS 27 - //#define LCD_PINS_EN 29 - //#define LCD_PINS_D4 25 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if !IS_NEWPANEL - // TO TEST - //#define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #endif #elif ENABLED(ZONESTAR_LCD) - // TO TEST - //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#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 - //#define LCD_PINS_D7 57 // Mega/Due:65 - AGCM4:57 + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + #define LCD_PINS_RS AUX2_05 + #define LCD_PINS_EN AUX2_07 + #define LCD_PINS_D4 AUX2_04 + #define LCD_PINS_D5 AUX2_06 + #define LCD_PINS_D6 AUX2_08 + #define LCD_PINS_D7 AUX2_10 + + #elif ENABLED(AZSMZ_12864) + + // TODO #else #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) - // TO TEST - //#define LCD_PINS_DC 25 // Set as output on init - //#define LCD_PINS_RS 27 // Pull low for 1s to init + #define LCD_PINS_DC EXP1_06_PIN // Set as output on init + #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init // DOGM SPI LCD Support - //#define DOGLCD_CS 16 - //#define DOGLCD_MOSI 17 - //#define DOGLCD_SCK 23 - //#define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define DOGLCD_SCK EXP1_05_PIN #else - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 + #define LCD_PINS_RS EXP1_04_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 #endif - #define LCD_PINS_D7 29 + #define LCD_PINS_D7 EXP1_08_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_05_PIN #endif #endif @@ -341,13 +510,17 @@ // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN 42 - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_EN_PIN 17 + //#define SHIFT_LD_PIN AUX2_08 + //#define SHIFT_OUT_PIN AUX2_06 + //#define SHIFT_EN_PIN EXP1_03_PIN #endif #endif + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + // // LCD Display input pins // @@ -355,215 +528,270 @@ #if IS_RRD_SC - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - //#define BTN_EN1 17 - //#define BTN_EN2 23 + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN #else - #define BTN_EN1 31 - #define BTN_EN2 33 - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #endif - #define BTN_ENC 35 + #define BTN_ENC EXP1_02_PIN #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #ifndef KILL_PIN + #define KILL_PIN EXP2_08_PIN #endif - #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) - //#define LCD_BACKLIGHT_PIN 39 // TO TEST + #define LCD_BACKLIGHT_PIN AUX4_08 // Probably a slightly different adapter from RRD SC #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - // TO TEST - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 - //#define SD_DETECT_PIN 42 + #define BTN_EN1 AUX2_05 + #define BTN_EN2 AUX2_03 + #define BTN_ENC AUX2_04 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN AUX2_08 + #endif #elif ENABLED(LCD_I2C_PANELOLU2) - // TO TEST - //#define BTN_EN1 47 - //#define BTN_EN2 43 - //#define BTN_ENC 32 - //#define LCD_SDSS SDSS - //#define KILL_PIN 41 + #define BTN_EN1 AUX4_04 + #define BTN_EN2 AUX4_06 + #define BTN_ENC AUX4_03 + #define LCD_SDSS SDSS + #define KILL_PIN AUX4_07 #elif ENABLED(LCD_I2C_VIKI) - // TO TEST - //#define BTN_EN1 40 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42. - //#define BTN_EN2 42 - //#define BTN_ENC -1 + #define BTN_EN1 AUX2_06 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. + #define BTN_EN2 AUX2_08 + #define BTN_ENC -1 - //#define LCD_SDSS SDSS - //#define SD_DETECT_PIN 49 + #define LCD_SDSS SDSS + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif #elif ANY(VIKI2, miniVIKI) - // TO TEST - //#define DOGLCD_CS 45 - //#define DOGLCD_A0 44 - - //#define BEEPER_PIN 33 - //#define STAT_LED_RED_PIN 32 - //#define STAT_LED_BLUE_PIN 35 + #define DOGLCD_CS AUX4_05 + #define DOGLCD_A0 AUX2_07 + #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - //#define BTN_EN1 22 - //#define BTN_EN2 7 - //#define BTN_ENC 39 + #define BEEPER_PIN EXP2_05_PIN + #define STAT_LED_RED_PIN AUX4_03 + #define STAT_LED_BLUE_PIN EXP1_02_PIN - //#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board - //#define KILL_PIN 31 + #define BTN_EN1 22 + #define BTN_EN2 7 + #define BTN_ENC AUX4_08 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board + #endif + #define KILL_PIN EXP2_03_PIN #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - // TO TEST - //#define DOGLCD_CS 29 - //#define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN - //#define BEEPER_PIN 23 - //#define LCD_BACKLIGHT_PIN 33 + #define BEEPER_PIN EXP1_05_PIN + #define LCD_BACKLIGHT_PIN EXP2_05_PIN - //#define BTN_EN1 35 - //#define BTN_EN2 37 - //#define BTN_ENC 31 + #define BTN_EN1 EXP1_02_PIN + #define BTN_EN2 EXP1_01_PIN + #define BTN_ENC EXP2_03_PIN - //#define LCD_SDSS SDSS - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 41 + #define LCD_SDSS SDSS + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #define KILL_PIN EXP2_08_PIN #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) - // TO TEST - //#define BEEPER_PIN 37 - //#define BTN_ENC 35 - //#define SD_DETECT_PIN 49 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif - //#ifndef KILL_PIN - // #define KILL_PIN 41 - //#endif + #ifndef KILL_PIN + #define KILL_PIN EXP2_08_PIN + #endif #if ENABLED(MKS_MINI_12864) - // TO TEST - //#define DOGLCD_A0 27 - //#define DOGLCD_CS 25 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN // not connected to a pin - //#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57) + #define LCD_BACKLIGHT_PIN -1 // 65 (MKS mini12864 can't adjust backlight by software!) - //#define BTN_EN1 31 - //#define BTN_EN2 33 - - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #elif ENABLED(FYSETC_MINI_12864) - // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 + // From https://wiki.fysetc.com/Mini12864_Panel/ - // TO TEST - //#define DOGLCD_A0 16 - //#define DOGLCD_CS 17 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN - //#define BTN_EN1 33 - //#define BTN_EN2 31 + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN //#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_RESET_PIN 23 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - // TO TEST - //#define RGB_LED_R_PIN 25 + #define RGB_LED_R_PIN EXP1_06_PIN #endif #ifndef RGB_LED_G_PIN - // TO TEST - //#define RGB_LED_G_PIN 27 + #define RGB_LED_G_PIN EXP1_07_PIN #endif #ifndef RGB_LED_B_PIN - // TO TEST - //#define RGB_LED_B_PIN 29 + #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - // TO TEST - //#define NEOPIXEL_PIN 25 + #define NEOPIXEL_PIN EXP1_06_PIN #endif #endif #elif ENABLED(MINIPANEL) - // TO TEST - //#define BEEPER_PIN 42 - // not connected to a pin - //#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57) - - //#define DOGLCD_A0 44 - //#define DOGLCD_CS 58 // Mega/Due:66 - AGCM4:58 + #define BEEPER_PIN AUX2_08 + #define LCD_BACKLIGHT_PIN AUX2_10 - //#define BTN_EN1 40 - //#define BTN_EN2 55 // Mega/Due:63 - AGCM4:55 - //#define BTN_ENC 72 // Mega/Due:59 - AGCM4:72 + #define DOGLCD_A0 AUX2_07 + #define DOGLCD_CS AUX2_09 - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 56 // Mega/Due:64 - AGCM4:56 + #define BTN_EN1 AUX2_06 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX2_03 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN AUX3_02 + #endif + #define KILL_PIN AUX2_05 #elif ENABLED(ZONESTAR_LCD) - // TO TEST - //#define ADC_KEYPAD_PIN 12 + #define ADC_KEYPAD_PIN 12 #elif ENABLED(AZSMZ_12864) - // TO TEST + // TODO - #else + #elif ENABLED(G3D_PANEL) - // Beeper on AUX-4 - //#define BEEPER_PIN 33 - - // Buttons are directly attached to AUX-2 - #if IS_RRW_KEYPAD - // TO TEST - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_CLK_PIN 44 - //#define SHIFT_LD_PIN 42 - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 // Mega/Due:63 - AGCM4:55 - #elif ENABLED(PANEL_ONE) - // TO TEST - //#define BTN_EN1 72 // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72) - //#define BTN_EN2 55 // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55) - //#define BTN_ENC 49 // AUX3 PIN 7 - #else - // TO TEST - //#define BTN_EN1 37 - //#define BTN_EN2 35 - //#define BTN_ENC 31 + #define BEEPER_PIN EXP1_01_PIN + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #define KILL_PIN EXP2_08_PIN + + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #define BTN_ENC EXP1_02_PIN + + #elif IS_TFTGLCD_PANEL + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN #endif - #if ENABLED(G3D_PANEL) - // TO TEST - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 41 + #else + + #define BEEPER_PIN EXP2_05_PIN + + #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 + #define BTN_EN1 AUX2_03 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX3_02 + #else + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_02_PIN + #define BTN_ENC EXP2_03_PIN #endif #endif #endif // IS_NEWPANEL -#endif // HAS_WIRED_LCD +#endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED + +#if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS + #define SHIFT_OUT_PIN AUX2_06 + #define SHIFT_CLK_PIN AUX2_07 + #define SHIFT_LD_PIN AUX2_08 + #ifndef BTN_EN1 + #define BTN_EN1 AUX2_05 + #endif + #ifndef BTN_EN2 + #define BTN_EN2 AUX2_03 + #endif + #ifndef BTN_ENC + #define BTN_ENC AUX2_04 + #endif +#endif + +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + /** + * FYSETC TFT-81050 display pinout + * + * Board Display + * ------ ------ + * (MISO) 50 | 1 2 | 52 (SCK) 5V |10 9 | GND + * (LCD_CS) 33 | 3 4 | 53 (SD_CS) RESET | 8 7 | (SD_DET) + * 31 5 6 | 51 (MOSI) (MOSI) 6 5 | (LCD_CS) + * (SD_DET) 49 | 7 8 | RESET (SD_CS) | 4 3 | (MOD_RESET) + * GND | 9 10 | -- (SCK) | 2 1 | (MISO) + * ------ ------ + * EXP2 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * ---------------------------------- + * EXP2-1 <--diode--- EXP1-1 MISO + * EXP2-2 ----------- EXP1-2 SCK + * EXP2-4 ----------- EXP1-3 MOD_RST + * EXP2-4 ----------- EXP1-4 SD_CS + * EXP2-3 ----------- EXP1-5 LCD_CS + * EXP2-6 ----------- EXP1-6 MOSI + * EXP2-7 ----------- EXP1-7 SD DET + * EXP2-8 ----------- EXP1-8 RESET + * EXP2-1 ----------- EXP1-9 MISO->GND + * EXP1-10 ---------- EXP1-10 5V + * + * NOTE: The MISO pin should not get a 5V signal. + * To fix, insert a 1N4148 diode in the MISO line. + */ + + #define BEEPER_PIN EXP1_01_PIN + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + + #define CLCD_MOD_RESET EXP2_05_PIN + #define CLCD_SPI_CS EXP2_03_PIN + +#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index eeb2e92e731c..8abf0c07e735 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -162,31 +162,29 @@ * Connector pinouts * * ------ ------ ---- - * (SDA) D17 | 1 2 | (A1) D30 3V3 | 1 2 | D4 (SS) J3_RX |1 2| J3_TX - * (SCL) D16 | 3 4 | (A2) D29 GND | 3 4 | RESET (TXO) D9 |3 4| D8 (RX0) D8 - * D11 | 5 6 (A3) D28 (MOSI) D5 | 5 6 D7 (SCK) USB_RX |5 6| USB_TX - * D10 | 7 8 | (A4) D27 5V | 7 8 | D6 (MISO) ---- - * 5V | 9 10 | GND J3_RX | 9 10 | J3_TX + * (SDA) 17 | 1 2 | 30 (A1) 3V3 | 1 2 | 4 (SS) J3_RX |1 2| J3_TX + * (SCL) 16 | 3 4 | 29 (A2) GND | 3 4 | RESET (TXO) 9 |3 4| 8 (RX0) + * 11 | 5 6 28 (A3) (MOSI) 5 | 5 6 7 (SCK) USB_RX |5 6| USB_TX + * 10 | 7 8 | 27 (A4) 5V | 7 8 | 6 (MISO) ---- + * 5V | 9 10 | GND J3_RX | 9 10 | J3_TX USB_BLE * ------ ------ - * LCD J3 USB_BLE + * LCD J3 */ - -#define EXP1_01_PIN 17 -#define EXP1_02_PIN 30 -#define EXP1_03_PIN 16 -#define EXP1_04_PIN 29 -#define EXP1_05_PIN 11 -#define EXP1_06_PIN 28 -#define EXP1_07_PIN 10 -#define EXP1_08_PIN 27 -#define EXP1_09_PIN -1 // 5V -#define EXP1_10_PIN -1 // GND +#define EXP1_01_PIN 17 // BEEPER / ENC +#define EXP1_02_PIN 30 // LCD_D4 / SERVO +#define EXP1_03_PIN 16 // ENC / LCD_EN +#define EXP1_04_PIN 29 // SERVO / LCD_RS +#define EXP1_05_PIN 11 // EN1 / LCD_D4 +#define EXP1_06_PIN 28 // LCD_EN / EN1 +#define EXP1_07_PIN 10 // EN2 +#define EXP1_08_PIN 27 // LCD_RS / BEEPER /** * LCD / Controller * * Only the following displays are supported: * ZONESTAR_LCD + * ANET_FULL_GRAPHICS_LCD * CTC_A10S_A13 * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index e391cd1020a6..df9fb0f86493 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -38,59 +38,54 @@ #define BOARD_INFO_NAME "Melzi (Creality)" -// Alter timing for graphical display -#if IS_U8GLIB_ST7920 - #define BOARD_ST7920_DELAY_1 125 - #define BOARD_ST7920_DELAY_2 125 - #define BOARD_ST7920_DELAY_3 125 -#endif - -/** - * EXP1 EXP1 as ENDER2 STOCKDISPLAY EXP1 as CR10 STOCKDISPLAY - * ------ ------ ------ - * D27 | 1 2 | D16 SCK | 1 2 | BTN_E BEEPER_PIN | 1 2 | BTN_ENC - * D11 | 3 4 | RESET BTN_EN1 | 3 4 | RESET BTN_EN1 | 3 4 | RESET - * D10 5 6 | D30 BTN_EN2 5 6 | LCD_A0 BTN_EN2 5 6 | LCD_D4 (ST9720 CLK) - * D28 | 7 8 | D17 LCD_CS | 7 8 | MOSI (ST9720 CS) LCD_RS | 7 8 | LCD_EN (ST9720 DAT) - * GND | 9 10 | 5V GND | 9 10 | 5V GND | 9 10 | 5V - * ------ ------ ------ +/** ------ + * 27 | 1 2 | 16 + * 11 | 3 4 | RESET + * 10 5 6 | 30 + * 28 | 7 8 | 17 + * GND | 9 10 | 5V + * ------ + * EXP1 */ -#define EXP1_01_PIN 27 -#define EXP1_02_PIN 16 -#define EXP1_03_PIN 11 +#define EXP1_01_PIN 27 // BEEP +#define EXP1_02_PIN 16 // ENC +#define EXP1_03_PIN 11 // EN1 #define EXP1_04_PIN -1 // RESET -#define EXP1_05_PIN 10 -#define EXP1_06_PIN 30 -#define EXP1_07_PIN 28 -#define EXP1_08_PIN 17 +#define EXP1_05_PIN 10 // EN2 +#define EXP1_06_PIN 30 // A0 / ST9720 CLK +#define EXP1_07_PIN 28 // CS / ST9720 CS +#define EXP1_08_PIN 17 // ST9720 DAT // // LCD / Controller // #if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) - #if ENABLED(MKS_MINI_12864) - #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING - #error "CAUTION! MKS_MINI_12864 on MELZI_CREALITY requires wiring modifications. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" - #endif - #define DOGLCD_CS EXP1_07_PIN - #define DOGLCD_A0 EXP1_06_PIN - #elif ENABLED(CR10_STOCKDISPLAY) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN // ST9720 CS #define LCD_PINS_EN EXP1_08_PIN // ST9720 DAT #define LCD_PINS_D4 EXP1_06_PIN // ST9720 CLK - #define BEEPER_PIN EXP1_01_PIN - #elif ENABLED(ENDER2_STOCKDISPLAY) + #endif + #if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 EXP1_06_PIN - #define DOGLCD_SCK EXP1_01_PIN - #define DOGLCD_MOSI EXP1_08_PIN - #define FORCE_SOFT_SPI #endif + + #define LCD_SDSS 31 // Controller's SD card + #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_SDSS 31 // Controller's SD card + #define BEEPER_PIN EXP1_01_PIN + #define LCD_PINS_DEFINED + +#endif + +// Alter timing for graphical display +#if IS_U8GLIB_ST7920 + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 @@ -99,61 +94,59 @@ #ifndef SERVO0_PIN #define SERVO0_PIN EXP1_01_PIN #endif - #if SERVO0_PIN == BEEPER_PIN - #undef BEEPER_PIN - #endif #elif HAS_FILAMENT_SENSOR #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN EXP1_01_PIN #endif - #if FIL_RUNOUT_PIN == BEEPER_PIN - #undef BEEPER_PIN - #endif +#endif +#if PIN_EXISTS(BEEPER) && (SERVO0_PIN == BEEPER_PIN || FIL_RUNOUT_PIN == BEEPER_PIN) + #undef BEEPER_PIN + #define BEEPER_PIN -1 #endif /** - PIN: 0 Port: B0 E0_DIR_PIN protected - PIN: 1 Port: B1 E0_STEP_PIN protected - PIN: 2 Port: B2 Z_DIR_PIN protected - PIN: 3 Port: B3 Z_STEP_PIN protected - PIN: 4 Port: B4 AVR_SS_PIN protected - . FAN0_PIN protected - . SD_SS_PIN protected - PIN: 5 Port: B5 AVR_MOSI_PIN Output = 1 - . SD_MOSI_PIN Output = 1 - PIN: 6 Port: B6 AVR_MISO_PIN Input = 0 TIMER3A PWM: 0 WGM: 1 COM3A: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 - . SD_MISO_PIN Input = 0 - PIN: 7 Port: B7 AVR_SCK_PIN Output = 0 TIMER3B PWM: 0 WGM: 1 COM3B: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 - . SD_SCK_PIN Output = 0 - PIN: 8 Port: D0 RXD Input = 1 - PIN: 9 Port: D1 TXD Input = 0 - PIN: 10 Port: D2 BTN_EN2 Input = 1 - PIN: 11 Port: D3 BTN_EN1 Input = 1 - PIN: 12 Port: D4 HEATER_BED_PIN protected - PIN: 13 Port: D5 HEATER_0_PIN protected - PIN: 14 Port: D6 E0_ENABLE_PIN protected - . X_ENABLE_PIN protected - . Y_ENABLE_PIN protected - 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_EN Output = 0 - . SDA Output = 0 - PIN: 18 Port: C2 X_MIN_PIN protected - . X_STOP_PIN protected - PIN: 19 Port: C3 Y_MIN_PIN protected - . Y_STOP_PIN protected - PIN: 20 Port: C4 Z_MIN_PIN protected - . Z_STOP_PIN protected - PIN: 21 Port: C5 X_DIR_PIN protected - PIN: 22 Port: C6 Y_STEP_PIN protected - PIN: 23 Port: C7 Y_DIR_PIN protected - PIN: 24 Port: A7 TEMP_0_PIN protected - PIN: 25 Port: A6 TEMP_BED_PIN protected - PIN: 26 Port: A5 Z_ENABLE_PIN protected - PIN: 27 Port: A4 BEEPER_PIN Output = 0 - PIN: 28 Port: A3 LCD_PINS_RS Output = 0 - PIN: 29 Port: A2 Input = 0 - PIN: 30 Port: A1 LCD_PINS_D4 Output = 1 - PIN: 31 Port: A0 SDSS Output = 1 + PIN: 0 Port: B0 E0_DIR_PIN protected + PIN: 1 Port: B1 E0_STEP_PIN protected + PIN: 2 Port: B2 Z_DIR_PIN protected + PIN: 3 Port: B3 Z_STEP_PIN protected + PIN: 4 Port: B4 AVR_SS_PIN protected + . FAN0_PIN protected + . SD_SS_PIN protected + PIN: 5 Port: B5 AVR_MOSI_PIN Output = 1 + . SD_MOSI_PIN Output = 1 + PIN: 6 Port: B6 AVR_MISO_PIN Input = 0 TIMER3A PWM: 0 WGM: 1 COM3A: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 + . SD_MISO_PIN Input = 0 + PIN: 7 Port: B7 AVR_SCK_PIN Output = 0 TIMER3B PWM: 0 WGM: 1 COM3B: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 + . SD_SCK_PIN Output = 0 + PIN: 8 Port: D0 RXD Input = 1 + PIN: 9 Port: D1 TXD Input = 0 + PIN: 10 Port: D2 BTN_EN2 Input = 1 + PIN: 11 Port: D3 BTN_EN1 Input = 1 + PIN: 12 Port: D4 HEATER_BED_PIN protected + PIN: 13 Port: D5 HEATER_0_PIN protected + PIN: 14 Port: D6 E0_ENABLE_PIN protected + . X_ENABLE_PIN protected + . Y_ENABLE_PIN protected + 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_EN Output = 0 + . SDA Output = 0 + PIN: 18 Port: C2 X_MIN_PIN protected + . X_STOP_PIN protected + PIN: 19 Port: C3 Y_MIN_PIN protected + . Y_STOP_PIN protected + PIN: 20 Port: C4 Z_MIN_PIN protected + . Z_STOP_PIN protected + PIN: 21 Port: C5 X_DIR_PIN protected + PIN: 22 Port: C6 Y_STEP_PIN protected + PIN: 23 Port: C7 Y_DIR_PIN protected + PIN: 24 Port: A7 TEMP_0_PIN protected + PIN: 25 Port: A6 TEMP_BED_PIN protected + PIN: 26 Port: A5 Z_ENABLE_PIN protected + PIN: 27 Port: A4 BEEPER_PIN Output = 0 + PIN: 28 Port: A3 LCD_PINS_RS Output = 0 + PIN: 29 Port: A2 Input = 0 + PIN: 30 Port: A1 LCD_PINS_D4 Output = 1 + PIN: 31 Port: A0 SDSS Output = 1 */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index 323ecaa029fe..dc1ea950a72d 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -29,12 +29,13 @@ #define BOARD_INFO_NAME "Melzi (Malyan)" #if ENABLED(CR10_STOCKDISPLAY) + #define BTN_ENC 28 + #define BTN_EN1 30 + #define BTN_EN2 29 + #define LCD_PINS_RS 17 // ST9720 CS #define LCD_PINS_EN 16 // ST9720 DAT #define LCD_PINS_D4 11 // ST9720 CLK - #define BTN_EN1 30 - #define BTN_EN2 29 - #define BTN_ENC 28 #define LCD_PINS_DEFINED #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index 7e4cc22bbe8f..99cdfd0b4228 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -33,15 +33,17 @@ #define LCD_SDSS -1 #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) + #define BTN_ENC 26 + #define BTN_EN1 10 + #define BTN_EN2 11 + #define LCD_PINS_RS 30 #define LCD_PINS_EN 28 #define LCD_PINS_D4 16 + #define LCD_PINS_D5 17 #define LCD_PINS_D6 27 #define LCD_PINS_D7 29 - #define BTN_EN1 10 - #define BTN_EN2 11 - #define BTN_ENC 26 #define LCD_PINS_DEFINED #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index 2cd949e095de..b48e77a5c367 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -25,6 +25,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 + * + * ATmega644P */ #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 05c3022994f8..6b502ee5307e 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -112,6 +112,10 @@ #define Z_ENABLE_PIN 4 #endif #define E0_ENABLE_PIN 4 +#else + #if !HAS_CUTTER && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // Use IO Header + #define CASE_LIGHT_PIN 4 // Hardware PWM - see if IO Header is available + #endif #endif // @@ -125,16 +129,12 @@ * Sanguino libraries! See #368. */ //#define SDSS 24 -#define SDSS 31 +#define SDSS AUX1_09 #if IS_MELZI - #define LED_PIN 27 + #define LED_PIN AUX1_01 #elif MB(STB_11) - #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED -#endif - -#if !HAS_CUTTER && ENABLED(SANGUINOLOLU_V_1_2) && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header - #define CASE_LIGHT_PIN 4 // Hardware PWM - see if IO Header is available + #define LCD_BACKLIGHT_PIN AUX1_04 // LCD backlight LED #endif /** @@ -145,11 +145,25 @@ * GND GND D31 D30 D29 D28 D27 * A4 A3 A2 A1 A0 */ +#define AUX1_01 27 // A0 +#define AUX1_02 16 // SCL +#define AUX1_03 28 // A1 +#define AUX1_04 17 // SDA +#define AUX1_05 29 // A2 +#define AUX1_06 10 // RX1 +#define AUX1_07 30 // A3 +#define AUX1_08 11 // TX1 +#define AUX1_09 31 // A4 +#define AUX1_10 12 // PWM // // LCD / Controller // -#if HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) +#ifdef LCD_PINS_DEFINED + + // LCD pins already defined by including header + +#elif HAS_WIRED_LCD #define SD_DETECT_PIN -1 @@ -157,49 +171,53 @@ #if ENABLED(LCD_FOR_MELZI) - #define LCD_PINS_RS 17 - #define LCD_PINS_EN 16 - #define LCD_PINS_D4 11 - #define KILL_PIN 10 - #define BEEPER_PIN 27 + #define LCD_PINS_RS AUX1_04 + #define LCD_PINS_EN AUX1_02 + #define LCD_PINS_D4 AUX1_08 + #define KILL_PIN AUX1_06 + #define BEEPER_PIN AUX1_01 #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 - #define LCD_PINS_EN 29 // SID (MOSI) - #define LCD_PINS_D4 17 // SCK (CLK) clock + #define LCD_PINS_RS AUX1_07 // CS chip select /SS chip slave select + #define LCD_PINS_EN AUX1_05 // SID (MOSI) + #define LCD_PINS_D4 AUX1_04 // 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 // with M42 instead of BEEPER_PIN. - #define BEEPER_PIN 27 + #define BEEPER_PIN AUX1_01 #else // Sanguinololu >=1.3 #define LCD_PINS_RS 4 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 + #define LCD_PINS_EN AUX1_04 + #define LCD_PINS_D4 AUX1_07 + #define LCD_PINS_D5 AUX1_05 + #define LCD_PINS_D6 AUX1_03 + #define LCD_PINS_D7 AUX1_01 #endif #else - #define DOGLCD_A0 30 + #define DOGLCD_A0 AUX1_07 #if ENABLED(MAKRPANEL) - #define BEEPER_PIN 29 - #define DOGLCD_CS 17 - #define LCD_BACKLIGHT_PIN 28 // PA3 + #define BEEPER_PIN AUX1_05 + #define DOGLCD_CS AUX1_04 + #define LCD_BACKLIGHT_PIN AUX1_03 // PA3 #elif IS_MELZI - #define BEEPER_PIN 27 - #define DOGLCD_CS 28 + #define BEEPER_PIN AUX1_01 + #ifndef DOGLCD_CS + #define DOGLCD_CS AUX1_03 + #endif - #else // !MAKRPANEL + #else - #define DOGLCD_CS 29 + #ifndef DOGLCD_CS + #define DOGLCD_CS AUX1_05 + #endif #endif @@ -209,29 +227,29 @@ #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards - #define LCD_PINS_RS 28 - #define LCD_PINS_EN 29 - #define LCD_PINS_D4 10 - #define LCD_PINS_D5 11 - #define LCD_PINS_D6 16 - #define LCD_PINS_D7 17 + #define LCD_PINS_RS AUX1_03 + #define LCD_PINS_EN AUX1_05 + #define LCD_PINS_D4 AUX1_06 + #define LCD_PINS_D5 AUX1_08 + #define LCD_PINS_D6 AUX1_02 + #define LCD_PINS_D7 AUX1_04 #else #define LCD_PINS_RS 4 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 + #define LCD_PINS_EN AUX1_04 + #define LCD_PINS_D4 AUX1_07 + #define LCD_PINS_D5 AUX1_05 + #define LCD_PINS_D6 AUX1_03 + #define LCD_PINS_D7 AUX1_01 #endif #if ENABLED(LCD_FOR_MELZI) - #define BTN_ENC 28 - #define BTN_EN1 29 - #define BTN_EN2 30 + #define BTN_ENC AUX1_03 + #define BTN_EN1 AUX1_05 + #define BTN_EN2 AUX1_07 #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards @@ -242,26 +260,26 @@ #elif ENABLED(LCD_I2C_PANELOLU2) #if IS_MELZI - #define BTN_ENC 29 + #define BTN_ENC AUX1_05 #ifndef LCD_SDSS - #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi + #define LCD_SDSS AUX1_07 // Panelolu2 SD card reader rather than the Melzi #endif #else - #define BTN_ENC 30 + #define BTN_ENC AUX1_07 #endif #else // !LCD_FOR_MELZI && !ZONESTAR_LCD && !LCD_I2C_PANELOLU2 - #define BTN_ENC 16 + #define BTN_ENC AUX1_02 #ifndef LCD_SDSS - #define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi + #define LCD_SDSS AUX1_03 // Smart Controller SD card reader rather than the Melzi #endif #endif #if IS_NEWPANEL && !defined(BTN_EN1) - #define BTN_EN1 11 - #define BTN_EN2 10 + #define BTN_EN1 AUX1_08 + #define BTN_EN2 AUX1_06 #endif #endif // HAS_WIRED_LCD @@ -273,8 +291,8 @@ #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header #define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM - #define SPINDLE_LASER_ENA_PIN 10 // Pullup or pulldown! - #define SPINDLE_DIR_PIN 11 + #define SPINDLE_LASER_ENA_PIN AUX1_06 // Pullup or pulldown! + #define SPINDLE_DIR_PIN AUX1_08 #elif !MB(MELZI) // use X stepper motor socket @@ -300,7 +318,7 @@ * /RESET O| |O 1A * /SLEEP O| |O 1B * SPINDLE_LASER_PWM_PIN STEP O| |O VDD - * SPINDLE_LASER_ENA_PIN DIR O| |O GND + * SPINDLE_LASER_ENA_PIN DIR O| |O GND * ------- * * Note: Socket names vary from vendor to vendor. diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index 438acb79c789..ade9c08aa045 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -170,7 +170,7 @@ * (CS) D11 | 3 4 | D10 (DC/D4) * (EN2) D12 5 6 | D4 or D3 (EN/RS) * (ENC) D29 | 7 8 | D2 (EN1) - * (GND) | 9 10 | (5V) + * GND | 9 10 | 5V * ------ */ #define EXP1_01_PIN 5 @@ -193,9 +193,9 @@ #define LCDSCREEN_NAME "ZONESTAR_12864LCD" #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_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 LCD_PINS_RS EXP1_03_PIN // ST7920 CS (LCD-4) + #define LCD_PINS_EN EXP1_06_PIN // ST7920 DAT (LCD-5) + #define LCD_PINS_D4 EXP1_04_PIN // ST7920 CLK (LCD-6) #define BOARD_ST7920_DELAY_1 DELAY_2_NOP #define BOARD_ST7920_DELAY_2 DELAY_2_NOP diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 06646e2e5927..7e24afde26e5 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -176,8 +176,8 @@ // #define CASE_LIGHT_PIN PA13 -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA8 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA8 #endif #define SUICIDE_PIN PC13 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 654fc04a86c2..d67c0a341db5 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -183,6 +183,19 @@ #define EXP1_07_PIN PB8 #define EXP1_08_PIN PB7 +/* ----- + * | 1 | RST + * | 2 | PA3 RX2 + * | 3 | PA2 TX2 + * | 4 | GND + * | 5 | 5V + * ----- + * TFT + */ + +#define TFT_02 PA3 +#define TFT_03 PA2 + #if HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) @@ -347,9 +360,8 @@ #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 // -// SD Support +// SD Card // - #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h index c345a27b76e9..9209515b1a24 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h @@ -25,8 +25,8 @@ #define BOARD_INFO_NAME "BTT SKR Mini E3 V1.2" -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC7 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC7 // LED driving pin #endif /** 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 7e6798deafd6..b950d8d1ac83 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 @@ -55,7 +55,13 @@ * ------ * EXP1 */ +#define EXP1_01_PIN PB5 #define EXP1_02_PIN PA15 +#define EXP1_03_PIN PA9 +#define EXP1_04_PIN -1 // RESET +#define EXP1_05_PIN PA10 +#define EXP1_06_PIN PB9 +#define EXP1_07_PIN PB8 #define EXP1_08_PIN PB15 #include "pins_BTT_SKR_MINI_E3_common.h" @@ -63,8 +69,8 @@ // Release PA13/PA14 (led, usb control) from SWD pins #define DISABLE_DEBUG -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA8 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA8 // LED driving pin #endif #ifndef PS_ON_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 f8eb653339ed..4cfd75088fe7 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 @@ -131,16 +131,29 @@ * ------ ------ * EXP1 EXP1 */ -#ifndef EXP1_02_PIN +#ifndef EXP1_08_PIN + #define EXP1_01_PIN PB5 #define EXP1_02_PIN PB6 + #define EXP1_03_PIN PA9 + #define EXP1_04_PIN -1 // RESET + #define EXP1_05_PIN PA10 + #define EXP1_06_PIN PB9 + #define EXP1_07_PIN PB8 #define EXP1_08_PIN PB7 #endif -#define EXP1_01_PIN PB5 -#define EXP1_03_PIN PA9 -#define EXP1_04_PIN -1 // RESET -#define EXP1_05_PIN PA10 -#define EXP1_06_PIN PB9 -#define EXP1_07_PIN PB8 + +/* ----- + * | 1 | RST + * | 2 | PA3 RX2 + * | 3 | PA2 TX2 + * | 4 | GND + * | 5 | 5V + * ----- + * TFT + */ + +#define TFT_02 PA3 +#define TFT_03 PA2 #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** @@ -298,14 +311,14 @@ * ------ ------ * EXP1 EXP1 * - * --- ------ - * RST | 1 | (MISO) |10 9 | SCK - * (RX2) PA3 | 2 | BTN_EN1 | 8 7 | (SS) - * (TX2) PA2 | 3 | BTN_EN2 | 6 5 | MOSI - * GND | 4 | (CD) | 4 3 | (RST) - * 5V | 5 | (GND) | 2 1 | (KILL) - * --- ------ - * TFT EXP2 + * --- ------ + * RST | 1 | (MISO) |10 9 | SCK + * (RX2) PA3 | 2 | BTN_EN1 | 8 7 | (SS) + * (TX2) PA2 | 3 | BTN_EN2 | 6 5 | MOSI + * GND | 4 | (CD) | 4 3 | (RST) + * 5V | 5 | GND | 2 1 | (KILL) + * --- ------ + * TFT EXP2 * * Needs custom cable: * diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 1d501e512b26..d5b52a35a8f4 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -121,7 +121,7 @@ #define FAN2_PIN PB9 // FAN (fan1 on board) controller cool fan // One NeoPixel onboard and a connector for other NeoPixels -#define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin +#define BOARD_NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin /** * ------ diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index bd6ba086f774..aa836d275bf4 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -169,6 +169,18 @@ #define ONBOARD_SDIO #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer +/** Debug port + * ----- + * | 1 | VCC + * | 2 | PA13 + * | 3 | PA14 + * | 4 | GND + * ----- + */ + +#define DEBUG_02_PIN PA13 +#define DEBUG_03_PIN PA14 + #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 027bfd71b531..e1c7175584e7 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -241,8 +241,8 @@ #if ENABLED(NEOPIXEL_LED) #define LED_PWM PC7 // IO1 - #ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN LED_PWM // USED WIFI IO0/IO1 PIN + #ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN LED_PWM // USED WIFI IO0/IO1 PIN #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index c6aeec979011..b8ff3262c8f9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -272,6 +272,17 @@ * to let the bootloader init the screen. */ +#if ENABLED(TFT_CLASSIC_UI) + // Emulated DOGM SPI + #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 + #define BTN_EN2 EXP2_05_PIN +#elif ENABLED(TFT_COLOR_UI) + #define TFT_BUFFER_WORDS 14400 +#endif + #if HAS_SPI_TFT // Shared SPI TFT @@ -302,27 +313,16 @@ #define LCD_USE_DMA_SPI -#endif +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_01_PIN -#if ENABLED(TFT_CLASSIC_UI) - // Emulated DOGM SPI - #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 #define BTN_EN2 EXP2_05_PIN -#elif ENABLED(TFT_COLOR_UI) - #define TFT_BUFFER_WORDS 14400 -#endif -#if HAS_WIRED_LCD && !HAS_SPI_TFT - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_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 - #define LCD_BACKLIGHT_PIN -1 #if ENABLED(MKS_MINI_12864) @@ -363,7 +363,7 @@ #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else // !MKS_MINI_12864 + #else // !FYSETC_MINI_12864_2_1 #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL @@ -381,10 +381,14 @@ #define BOARD_ST7920_DELAY_2 125 #define BOARD_ST7920_DELAY_3 125 - #endif // !MKS_MINI_12864 + #endif // !FYSETC_MINI_12864_2_1 #endif // HAS_WIRED_LCD && !HAS_SPI_TFT +#ifndef BEEPER_PIN + #define BEEPER_PIN EXP1_01_PIN +#endif + #define SPI_FLASH #if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB @@ -394,10 +398,6 @@ #define SPI_FLASH_MOSI_PIN PB15 #endif -#ifndef BEEPER_PIN - #define BEEPER_PIN EXP1_01_PIN -#endif - #if ENABLED(SPEAKER) && BEEPER_PIN == PC5 #error "MKS Robin nano default BEEPER_PIN is not a SPEAKER." #endif 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 0557992a83e6..49f14866c04d 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -220,7 +220,7 @@ #define SOFTWARE_SPI //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else + #else // !FYSETC_MINI_12864_2_1 #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL @@ -234,7 +234,7 @@ #endif - #endif // !MKS_MINI_12864 + #endif // !FYSETC_MINI_12864_2_1 #endif // HAS_WIRED_LCD @@ -252,19 +252,18 @@ #endif // LED driving pin -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA2 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA2 #endif // // SD Card // #define SDCARD_CONNECTION ONBOARD -#define SPI_DEVICE 2 // Maple -#define ONBOARD_SPI_DEVICE 2 +#define ONBOARD_SPI_DEVICE 2 // Maple #define SDSS SD_SS_PIN #define ONBOARD_SD_CS_PIN SD_SS_PIN -#define SD_DETECT_PIN PC10 // EXP2_07_PIN +#define SD_DETECT_PIN EXP2_07_PIN #define NO_SD_HOST_DRIVE // TODO: This is the only way to set SPI for SD on STM32 (for now) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 10ddc76a0172..50e241901837 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -80,9 +80,9 @@ #define FIL_RUNOUT_PIN PB8 // MT_DET /** ------ - * (BEEPER) PD2 | 1 2 | PB3 (BTN_ENC) - * (BTN_EN1) PB5 | 3 4 | PA11 (RESET?) - * (BTN_EN2) PB4 5 6 | PC1 (LCD_D4) + * (BEEPER) PD2 | 1 2 | PB3 (ENC) + * (EN1) PB5 | 3 4 | PA11 (RESET?) + * (EN2) PB4 5 6 | PC1 (LCD_D4) * (LCD_RS) PC3 | 7 8 | PC2 (LCD_EN) * GND | 9 10 | 5V * ------ 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 82eb079e1db7..0738afd80ee8 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -255,13 +255,41 @@ #define ONBOARD_SD_CS_PIN PC11 #elif SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 - #define SDSS PE10 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PE12 + #define SDSS EXP2_04_PIN + #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 #endif +/** + * ------ ------ + * PC5 | 1 2 | PE13 PA6 | 1 2 | PA5 + * PD13 | 3 4 | PC6 PE8 | 3 4 | PE10 + * PE14 | 5 6 PE15 PE11 | 5 6 PA7 + * PD11 | 7 8 | PD10 PE12 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | 3.3V + * ------ ------ + * 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 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 / Controller // @@ -272,29 +300,40 @@ * to let the bootloader init the screen. */ +#if ENABLED(TFT_CLASSIC_UI) + // Emulated DOGM SPI + #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 + #define BTN_EN2 EXP2_05_PIN +#elif ENABLED(TFT_COLOR_UI) + #define TFT_BUFFER_WORDS 14400 +#endif + #if HAS_SPI_TFT // Shared SPI TFT - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_BACKLIGHT_PIN EXP1_03_PIN - #define TOUCH_CS_PIN PE14 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define BTN_ENC PE13 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define TFT_CS_PIN PD11 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PD10 + #define TFT_CS_PIN EXP1_07_PIN + #define TFT_SCK_PIN EXP2_02_PIN + #define TFT_MISO_PIN EXP2_01_PIN + #define TFT_MOSI_PIN EXP2_06_PIN + #define TFT_DC_PIN EXP1_08_PIN #define TFT_A0_PIN TFT_DC_PIN - #define TFT_RESET_PIN PC6 + #define TFT_RESET_PIN EXP1_04_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI @@ -302,27 +341,16 @@ #define LCD_USE_DMA_SPI -#endif +#elif HAS_WIRED_LCD -#if ENABLED(TFT_CLASSIC_UI) - // Emulated DOGM SPI - #define LCD_PINS_EN PD13 - #define LCD_PINS_RS PC6 - #define BTN_ENC PE13 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 -#elif ENABLED(TFT_COLOR_UI) - #define TFT_BUFFER_WORDS 14400 -#endif + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN -#if HAS_WIRED_LCD && !HAS_SPI_TFT - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - #define LCD_PINS_EN PD13 - #define LCD_PINS_RS PC6 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define LCD_BACKLIGHT_PIN -1 + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN #if ENABLED(MKS_MINI_12864) @@ -331,18 +359,18 @@ #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN -1 - #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - #define DOGLCD_SCK PA5 - #define DOGLCD_MOSI PA7 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN #elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define PIN_SPI_SCK PA5 - #define PIN_TFT_MISO PA6 - #define PIN_TFT_MOSI PA7 - #define TFTGLCD_CS PE8 + #define PIN_SPI_SCK EXP2_02_PIN + #define PIN_TFT_MISO EXP2_01_PIN + #define PIN_TFT_MOSI EXP2_06_PIN + #define TFTGLCD_CS EXP2_03_PIN #endif #ifndef BEEPER_PIN @@ -350,26 +378,26 @@ #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define LCD_PINS_DC PC6 - #define DOGLCD_CS PD13 + #define LCD_PINS_DC EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 DOGLCD_A0 #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PE14 - #define NEOPIXEL_PIN PE15 - #define DOGLCD_MOSI PA7 - #define DOGLCD_SCK PA5 + #define LCD_RESET_PIN EXP1_05_PIN + #define NEOPIXEL_PIN EXP1_06_PIN + #define DOGLCD_MOSI EXP2_06_PIN + #define DOGLCD_SCK EXP2_02_PIN #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else // !MKS_MINI_12864 + #else // !FYSETC_MINI_12864_2_1 - #define LCD_PINS_D4 PE14 + #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PE15 - #define LCD_PINS_D6 PD11 - #define LCD_PINS_D7 PD10 + #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 @@ -383,7 +411,7 @@ #define BOARD_ST7920_DELAY_3 125 #endif - #endif // !MKS_MINI_12864 + #endif // !FYSETC_MINI_12864_2_1 #endif // HAS_WIRED_LCD && !HAS_SPI_TFT @@ -397,7 +425,7 @@ #endif #ifndef BEEPER_PIN - #define BEEPER_PIN PC5 + #define BEEPER_PIN EXP1_01_PIN #endif #if ENABLED(SPEAKER) && BEEPER_PIN == PC5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 35bf1824210e..545b73cf021c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -22,7 +22,8 @@ #pragma once /** - * MKS Robin pro (STM32F103ZET6) board pin assignments + * MKS Robin Pro (STM32F103ZET6) board pin assignments + * Schematic: https://github.com/makerbase-mks/MKS-Robin-Pro/blob/master/hardware/MKS%20Robin%20Pro%20V1.0_001/MKS%20Robin%20Pro%20V1.0_001%20SCH.pdf */ #include "env_validate.h" @@ -111,6 +112,7 @@ #ifndef E2_CS_PIN #define E2_CS_PIN PG9 #endif + // // SPI pins for TMC2130 stepper drivers // @@ -211,11 +213,11 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN PG3 - #define SD_SCK_PIN PB13 - #define SD_MISO_PIN PB14 - #define SD_MOSI_PIN PB15 - #define SD_SS_PIN PG6 + #define SD_DETECT_PIN EXP2_07_PIN + #define SD_SCK_PIN EXP2_02_PIN + #define SD_MISO_PIN EXP2_01_PIN + #define SD_MOSI_PIN EXP2_06_PIN + #define SD_SS_PIN EXP2_04_PIN #elif SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO #define SD_DETECT_PIN PD12 @@ -224,6 +226,88 @@ #error "No custom SD drive cable defined for this board." #endif +/** ------ ------ + * (BEEPER) PC5 | 1 2 | PG2 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) + * (LCD_EN) PG0 | 3 4 | PG1 (LCD_RS) (BTN_EN1) PG5 | 3 4 | PG6 (SD_SS) + * (LCD_D4) PF14 5 6 | PF15 (LCD_D5) (BTN_EN2) PG4 5 6 | PB15 (MOSI) + * (LCD_D6) PF12 | 7 8 | PF13 (LCD_D7) (SD_DETECT) PG3 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN PC5 +#define EXP1_02_PIN PG2 +#define EXP1_03_PIN PG0 +#define EXP1_04_PIN PG1 +#define EXP1_05_PIN PF14 +#define EXP1_06_PIN PF15 +#define EXP1_07_PIN PF12 +#define EXP1_08_PIN PF13 + +#define EXP2_01_PIN PB14 +#define EXP2_02_PIN PB13 +#define EXP2_03_PIN PG5 +#define EXP2_04_PIN PG6 +#define EXP2_05_PIN PG4 +#define EXP2_06_PIN PB15 +#define EXP2_07_PIN PG3 +#define EXP2_08_PIN -1 // RESET + +/** ------- + * | 0 | DGND-| + * 3V3 | 1 2 | DGND-| + * (D0) PD14 | 3 4 | PD15 (D1) + * (D2) PD0 | 5 6 | PD1 (D3) + * (D4) PE7 | 7 8 | PE8 (D5) + * (D6) PE9 | 9 10 | PE10 (D7) + * (D8) PE11 | 11 12 | PE12 (D9) + * (D10) PE13 | 13 14 | PE14 (D11) + * (D12) PE15 | 15 16 | PD8 (D13) + * (D14) PD9 | 17 18 | PD10 (D15) + * (NE4) PD7 | 19 20 | PD11 (A0) + * (NWE) PD5 | 21 22 | PD4 (NOE) + * (RST) PC6? | 23 24 | PD13?(LIGHT) + * (MISO2) PB14 | 25 26 | --- (INT) + * (MOSI2) PB15 | 27 28 | PC5 (BEEPER) + * (SCK2) PB13 | 29 30 | VCC + * (NSS2) PA7 | 31 32 | DGND + * ------- + * FSMC + */ +//#define FSMC_00_PIN -1 // GND +//#define FSMC_01_PIN -1 // 3.3V +//#define FSMC_02_PIN -1 // GND +#define FSMC_03_PIN PD14 // D0 +#define FSMC_04_PIN PD15 // D1 +#define FSMC_05_PIN PD0 // D2 +#define FSMC_06_PIN PD1 // D3 +#define FSMC_07_PIN PE7 // D4 +#define FSMC_08_PIN PE8 // D5 +#define FSMC_09_PIN PE9 // D6 +#define FSMC_10_PIN PE10 // D7 +#define FSMC_11_PIN PE11 // D8 +#define FSMC_12_PIN PE12 // D9 +#define FSMC_13_PIN PE13 // D10 +#define FSMC_14_PIN PE14 // D11 +#define FSMC_15_PIN PE15 // D12 +#define FSMC_16_PIN PD8 // D13 +#define FSMC_17_PIN PD9 // D14 +#define FSMC_18_PIN PD10 // D15 +#define FSMC_19_PIN PD7 // NE4 +#define FSMC_20_PIN PD11 // A0 +#define FSMC_21_PIN PD5 // NWE +#define FSMC_22_PIN PD4 // NOE +#define FSMC_23_PIN PC6 // RST +#define FSMC_24_PIN PD13 // LIGHT +#define FSMC_25_PIN PB14 // MISO2 +#define FSMC_26_PIN -1 // INT +#define FSMC_27_PIN PB15 // MOSI2 +#define FSMC_28_PIN PC5 // BEEPER +#define FSMC_29_PIN PB13 // SCK2 +//#define FSMC_30_PIN -1 // VCC +#define FSMC_31_PIN PA7 // NSS2 +//#define FSMC_32_PIN -1 // GND + // // TFT with FSMC interface // @@ -236,29 +320,29 @@ #define TFT_RESET_PIN LCD_RESET_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN - #define FSMC_CS_PIN PD7 // NE4 - #define FSMC_RS_PIN PD11 // A0 + #define FSMC_CS_PIN FSMC_19_PIN // NE4 + #define FSMC_RS_PIN FSMC_20_PIN // A0 #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 - #define LCD_RESET_PIN PC6 - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_RESET_PIN FSMC_23_PIN + #define LCD_BACKLIGHT_PIN FSMC_24_PIN #define TFT_BUFFER_WORDS 14400 #if NEED_TOUCH_PINS #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 - #define TOUCH_CS_PIN PA7 // SPI2_NSS - #define TOUCH_SCK_PIN PB13 // SPI2_SCK - #define TOUCH_MISO_PIN PB14 // SPI2_MISO - #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI + #define TOUCH_CS_PIN FSMC_31_PIN // SPI2_NSS + #define TOUCH_SCK_PIN FSMC_29_PIN // SPI2_SCK + #define TOUCH_MISO_PIN FSMC_25_PIN // SPI2_MISO + #define TOUCH_MOSI_PIN FSMC_27_PIN // SPI2_MOSI #else - #define BEEPER_PIN PC5 - #define BTN_ENC PG2 - #define BTN_EN1 PG5 - #define BTN_EN2 PG4 + #define BEEPER_PIN FSMC_28_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #endif #elif IS_TFTGLCD_PANEL @@ -269,30 +353,30 @@ #elif HAS_WIRED_LCD - #define BEEPER_PIN PC5 - #define BTN_ENC PG2 - #define LCD_PINS_EN PG0 - #define LCD_PINS_RS PG1 - #define BTN_EN1 PG5 - #define BTN_EN2 PG4 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_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 // MKS MINI12864 and MKS LCD12864B. If using MKS LCD12864A (Need to remove RPK2 resistor) - #if ENABLED(MKS_MINI_12864) + #if ANY(ENDER2_STOCKDISPLAY, MKS_MINI_12864) #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN -1 - #define DOGLCD_A0 PF12 - #define DOGLCD_CS PF15 - #define DOGLCD_SCK PB13 - #define DOGLCD_MOSI PB15 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN - #else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY + #else // !ENDER2_STOCKDISPLAY && !MKS_MINI_12864 - #define LCD_PINS_D4 PF14 + #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PF15 - #define LCD_PINS_D6 PF12 - #define LCD_PINS_D7 PF13 + #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 @@ -300,9 +384,9 @@ #endif - #endif // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY + #endif -#endif +#endif // HAS_WIRED_LCD // Alter timing for graphical display #if IS_U8GLIB_ST7920 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 4b05672fb05a..32f56e31fd9a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -181,17 +181,15 @@ // // Misc. Functions // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PB7 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PB7 // LED driving pin #endif #ifndef PS_ON_PIN #define PS_ON_PIN PE1 // Power Supply Control #endif -/** - * BTT E3 RRF - * ------ +/** ------ * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) * (BTN_EN1) PE7 | 3 4 | RESET * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) @@ -200,20 +198,28 @@ * ------ * EXP1 */ +#define EXP1_01_PIN PE8 +#define EXP1_02_PIN PE9 +#define EXP1_03_PIN PE7 +#define EXP1_04_PIN -1 // RESET +#define EXP1_05_PIN PB2 +#define EXP1_06_PIN PE10 +#define EXP1_07_PIN PB1 +#define EXP1_08_PIN PE11 #if HAS_WIRED_LCD #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) - #define BEEPER_PIN PE8 + #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC PE9 - #define BTN_EN1 PE7 - #define BTN_EN2 PB2 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_RS PB1 - #define LCD_PINS_EN PE11 - #define LCD_PINS_D4 PE10 + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN #if ENABLED(LCD_FOR_MELZI) @@ -257,24 +263,24 @@ #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif - #define LCD_PINS_RS PE10 - #define LCD_PINS_EN PE9 - #define LCD_PINS_D4 PB1 - #define LCD_PINS_D5 PB2 - #define LCD_PINS_D6 PE7 - #define LCD_PINS_D7 PE8 + #define LCD_PINS_RS EXP1_06_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 + #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) - #define BTN_ENC PE9 - #define BTN_EN1 PE7 - #define BTN_EN2 PB2 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN - #define DOGLCD_CS PB1 - #define DOGLCD_A0 PE10 - #define DOGLCD_SCK PE8 - #define DOGLCD_MOSI PE11 + #define DOGLCD_CS EXP1_07_PIN + #define DOGLCD_A0 EXP1_06_PIN + #define DOGLCD_SCK EXP1_01_PIN + #define DOGLCD_MOSI EXP1_08_PIN #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 @@ -316,7 +322,7 @@ * EXP1-1 ----------- EXP1-7 SD_DET */ - #define TFTGLCD_CS PE7 + #define TFTGLCD_CS EXP1_03_PIN #endif @@ -373,10 +379,10 @@ #define CLCD_SPI_BUS 1 // SPI1 connector - #define BEEPER_PIN PE9 + #define BEEPER_PIN EXP1_02_PIN - #define CLCD_MOD_RESET PE7 - #define CLCD_SPI_CS PB1 + #define CLCD_MOD_RESET EXP1_03_PIN + #define CLCD_SPI_CS EXP1_07_PIN #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 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 5a92d9729390..76596a6dde25 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -501,6 +501,7 @@ #endif #endif + #endif // HAS_WIRED_LCD // Alter timing for graphical display @@ -531,8 +532,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PB0 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PB0 #endif #if ENABLED(WIFISUPPORT) 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 5904186fd072..b1ea4bca4c29 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 @@ -90,8 +90,8 @@ #define POWER_LOSS_PIN PC13 // Power Loss Detection: PWR-DET #endif -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA14 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA14 // LED driving pin #endif #ifndef PS_ON_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 9e9f2a607af6..a20002dfc520 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 @@ -640,8 +640,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE6 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE6 #endif #if ENABLED(WIFISUPPORT) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 3daa8139524a..92a1545f8a28 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -255,7 +255,7 @@ #define FORCE_SOFT_SPI #define KILL_PIN -1 // NC - #define NEOPIXEL_PIN EXP1_07_PIN + #define BOARD_NEOPIXEL_PIN EXP1_07_PIN #elif HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index da11ce05ef18..83062a54871b 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -206,7 +206,6 @@ // #define LED_PIN PA15 // Status LED //#define CASE_LIGHT_PIN PB6 // LED Ribbon Connector (PWM TIM4_CH1) -//#define NEOPIXEL_PIN -1 #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires #endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 22e7f6e2e2b4..f795cc35ac83 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -113,7 +113,6 @@ // //#define CASE_LIGHT_PIN_CI -1 //#define CASE_LIGHT_PIN_DO -1 -//#define NEOPIXEL_PIN -1 // // SD support (On board) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h index 772a93605ae6..c5c79311e30e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h @@ -59,8 +59,6 @@ #endif // The FYSETC_MINI_12864_2_1 uses one of the EXP pins -#if DISABLED(FYSETC_MINI_12864_2_1) && !defined(NEOPIXEL_PIN) - #define NEOPIXEL_PIN PC5 -#endif +#define BOARD_NEOPIXEL_PIN PC5 #include "pins_MKS_MONSTER8_common.h" 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 49291b234402..7ec2f1263072 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -359,8 +359,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC5 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC5 #endif // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index dc907cd5b750..ae03e3c194e8 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -163,9 +163,9 @@ #define FAN_SOFT_PWM_REQUIRED // -// Neopixel +// NeoPixel // -#define NEOPIXEL_PIN PC7 +#define BOARD_NEOPIXEL_PIN PC7 #define NEOPIXEL2_PIN PC8 // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index 3c59f521d5df..7df1fb31e611 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -163,9 +163,9 @@ #define FAN_SOFT_PWM_REQUIRED // -// Neopixel +// NeoPixel // -#define NEOPIXEL_PIN PC7 +#define BOARD_NEOPIXEL_PIN PC7 #define NEOPIXEL2_PIN PC8 // diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index daed1da4b00c..ca663039e887 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -139,28 +139,56 @@ #define SD_DETECT_PIN PB0 #define BEEPER_PIN PE8 +/** + * ------ ------ + * (BEEPER) ???? | 1 2 | PE7 (BTN_ENC) (MISO) ???? | 1 2 | ???? (SCK) + * (LCD_EN) PE9 | 3 4 | PE10 (LCD_RS) (BTN_EN1) PB2 | 3 4 | ???? (SD_SS) + * (LCD_D4) PE12 | 5 6 PE13 (LCD_D5) (BTN_EN2) PB1 | 5 6 ???? (MOSI) + * (LCD_D6) PE14 | 7 8 | PE15 (LCD_D7) (SD_DETECT) ???? | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN -1 +#define EXP1_02_PIN PE7 // ENC +#define EXP1_03_PIN PE9 +#define EXP1_04_PIN PE10 +#define EXP1_05_PIN PE12 +#define EXP1_06_PIN PE13 // CS +#define EXP1_07_PIN PE14 // A0 +#define EXP1_08_PIN PE15 + +#define EXP2_01_PIN -1 +#define EXP2_02_PIN -1 +#define EXP2_03_PIN PB2 // EN1 +#define EXP2_04_PIN -1 +#define EXP2_05_PIN PB1 // EN2 +#define EXP2_06_PIN -1 +#define EXP2_07_PIN -1 +#define EXP2_08_PIN -1 + // // LCD / Controller // #if HAS_WIRED_LCD - #define BTN_EN1 PB2 - #define BTN_EN2 PB1 - #define BTN_ENC PE7 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_RS PE10 - #define LCD_PINS_EN PE9 - #define LCD_PINS_D4 PE12 + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS PE13 - #define DOGLCD_A0 PE14 + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 PE13 - #define LCD_PINS_D6 PE14 - #define LCD_PINS_D7 PE15 + #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 diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index 61490005987e..9151e5e07ffb 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -45,9 +45,9 @@ #endif // -// Neopixels +// NeoPixel // -#define NEOPIXEL_PIN PA8 +#define BOARD_NEOPIXEL_PIN PA8 // // Servos 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 6c31fdc57261..912d69e62803 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -133,8 +133,8 @@ // // Default NEOPIXEL_PIN // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PD3 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PD3 // LED driving pin #endif // 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 c2c16ba696bd..8241750be6f5 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 @@ -348,6 +348,6 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC7 // RGB +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC7 // RGB #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index 2990fc50a1b9..0131c50ebfbc 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h @@ -303,8 +303,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PD0 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PD0 #endif #ifndef NEOPIXEL2_PIN 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 ed3fb4e9dcad..2a9157688f7c 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 @@ -331,8 +331,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC11 // RGB1 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC11 // RGB1 #endif #ifndef NEOPIXEL2_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h index 824e44130f6e..b81dbe0dac26 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h @@ -73,8 +73,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC6 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC6 #endif #ifndef NEOPIXEL2_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h index d7c15eaa047e..36aa3895c372 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h @@ -72,8 +72,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA9 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA9 #endif #ifndef NEOPIXEL2_PIN 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 c5e0623f1847..a0f05f1d7ee6 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 @@ -169,6 +169,20 @@ #define EXP1_09_PIN -1 #define EXP1_10_PIN -1 +/** SPI Port + * ------ + * 5V | 1 2 | GND + * CS | 3 4 | CLK + * MOSI | 5 6 | MISO + * 3V3 | 7 8 | GND + * ------ + * SPI1 + */ +#define SPI1_03_PIN PD9 +#define SPI1_04_PIN PA5 +#define SPI1_05_PIN PA7 +#define SPI1_06_PIN PA6 + #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ @@ -442,8 +456,8 @@ #define SD_MOSI_PIN PA7 // -// Default NEOPIXEL_PIN +// NeoPixel // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA8 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA8 // LED driving pin #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 8d21b89acca4..3ef00286670d 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -448,8 +448,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE10 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE10 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PE9 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 5b54ebcf73bb..1a72572e231b 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 @@ -172,7 +172,7 @@ #define FAN1_PIN PA6 // "FAN1" #define FAN2_PIN PA7 // "FAN2" -#define NEOPIXEL_PIN PH3 +#define BOARD_NEOPIXEL_PIN PH3 #define NEOPIXEL2_PIN PB1 #if HAS_LTDC_TFT 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 ee62002b5986..fe0e1a02cef9 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 @@ -23,6 +23,10 @@ #include "env_validate.h" +// +// https://github.com/bigtreetech/SKR-3 +// + // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION @@ -627,8 +631,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE6 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE6 #endif #if ENABLED(WIFISUPPORT) From 0c3d1cf566c43d28bd99487c1352a7c019eecf32 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 23 Jan 2024 00:50:39 +0000 Subject: [PATCH 139/236] [cron] Bump distribution date (2024-01-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 00fc9978a6fa..8bb0b703a42c 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 "2024-01-22" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 a42464d24d7b..c13ea933d27a 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 "2024-01-22" + #define STRING_DISTRIBUTION_DATE "2024-01-23" #endif /** From 4309e6ab76528a8e64343148d81caa2d231c8c13 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 22 Jan 2024 23:31:04 -0600 Subject: [PATCH 140/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fix?= =?UTF-8?q?=20build=5Fall=5Fexamples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/bin/build_all_examples | 6 ++++-- buildroot/bin/build_example | 6 ++++-- buildroot/bin/mfutil | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/buildroot/bin/build_all_examples b/buildroot/bin/build_all_examples index a6d6ede47d79..a77259bb360f 100755 --- a/buildroot/bin/build_all_examples +++ b/buildroot/bin/build_all_examples @@ -14,7 +14,9 @@ # build_all_examples [...] branch [resume-from] # -. mfutil +HERE=`dirname $0` + +. "$HERE/mfutil" GITREPO=https://github.com/MarlinFirmware/Configurations.git STAT_FILE=./.pio/.buildall @@ -123,7 +125,7 @@ CONF_TREE=$( ls -d "$TMP"/config/examples/*/ "$TMP"/config/examples/*/*/ "$TMP"/ for CONF in $CONF_TREE ; do # Get a config's directory name - DIR=$( echo $CONF | sed "s|$TMP/config/examples/||" ) + DIR=$( echo $CONF | "$SED" "s|$TMP/config/examples/||" ) # If looking for a config, skip others [[ $FIRST_CONF ]] && [[ $FIRST_CONF != $DIR && "$FIRST_CONF/" != $DIR ]] && continue diff --git a/buildroot/bin/build_example b/buildroot/bin/build_example index a8878e8d9f3f..dabc4c572cdf 100755 --- a/buildroot/bin/build_example +++ b/buildroot/bin/build_example @@ -5,7 +5,9 @@ # Usage: build_example internal config-home config-folder # -. mfutil +HERE=`dirname $0` + +. "$HERE/mfutil" # Require 'internal' as the first argument [[ "$1" == "internal" ]] || { echo "Don't call this script directly, use build_all_examples instead." ; exit 1 ; } @@ -36,6 +38,6 @@ unset IFS; set +f echo -e "\n#define NO_CONTROLLER_CUSTOM_WIRING_WARNING" >> Marlin/Configuration.h echo "Building the firmware now..." -$HERE/mftest -s -a -n1 || { echo "Failed"; exit 1; } +"$HERE/mftest" -s -a -n1 || { echo "Failed"; exit 1; } echo "Success" diff --git a/buildroot/bin/mfutil b/buildroot/bin/mfutil index 75a2791cfedf..1699dd9adf6d 100755 --- a/buildroot/bin/mfutil +++ b/buildroot/bin/mfutil @@ -7,13 +7,12 @@ which curl 1>/dev/null 2>&1 || { echo "curl not found! Please install it."; exit ; } which git 1>/dev/null 2>&1 || { echo "git not found! Please install it."; exit ; } -SED=$(command -v gsed 2>/dev/null || command -v sed 2>/dev/null) +SED=$(which gsed sed | head -n1) [[ -z "$SED" ]] && { echo "No sed found, please install sed" ; exit 1 ; } OPEN=$( which gnome-open xdg-open open | head -n1 ) SELF=`basename "$0"` -HERE=`dirname "$0"` # Check if called in the right location [[ -e "Marlin/src" ]] || { echo -e "This script must be called from a Marlin working copy with:\n ./buildroot/bin/$SELF $1" ; exit ; } From f1a53407e7c99559f9073f11ab91e7b305ec7770 Mon Sep 17 00:00:00 2001 From: Anson Liu Date: Tue, 23 Jan 2024 08:24:49 -0800 Subject: [PATCH 141/236] =?UTF-8?q?=F0=9F=9A=B8=20DOGM=20active=20extruder?= =?UTF-8?q?=20indicator=20(#26152)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/dogm/status/hotend.h | 8 ++++++++ Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/Marlin/src/lcd/dogm/status/hotend.h b/Marlin/src/lcd/dogm/status/hotend.h index aac29da45122..ae21524ef5af 100644 --- a/Marlin/src/lcd/dogm/status/hotend.h +++ b/Marlin/src/lcd/dogm/status/hotend.h @@ -90,6 +90,14 @@ #elif STATUS_HOTEND_BITMAPS > 1 + const unsigned char status_active_extruder_indicator_bmp[] PROGMEM = { + B00110000, + B00011000, + B00001100, + B00011000, + B00110000 + }; + #ifdef STATUS_HOTEND_ANIM const unsigned char status_hotend1_a_bmp[] PROGMEM = { diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 636d10bbe999..5d1a3363fb1d 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -323,6 +323,11 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co } // PAGE_CONTAINS + #if HAS_MULTI_EXTRUDER && DISABLED(SLIM_LCD_MENUS) + if (active_extruder == heater_id) + u8g.drawBitmapP(_MAX(0, STATUS_HOTEND_X(heater_id) - 6), STATUS_HEATERS_Y + 3, 1, 5, status_active_extruder_indicator_bmp); + #endif + #endif // !STATUS_COMBINE_HEATERS if (PAGE_UNDER(7)) { From d79bcef802de4c0b55e6ea74bab5faee663a752a Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Tue, 23 Jan 2024 21:09:31 +0100 Subject: [PATCH 142/236] =?UTF-8?q?=F0=9F=94=A7=20Sanity=20check=20Z=5FCLE?= =?UTF-8?q?ARANCE=5FFOR=5FHOMING=20(#26721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index eaba158da898..5a22accc6da6 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1725,6 +1725,13 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS), "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle."); #endif +/** + * Make sure Z_CLEARANCE_FOR_HOMING is below Z_MAX_POS + */ +#if HAS_Z_AXIS + static_assert(Z_CLEARANCE_FOR_HOMING <= Z_MAX_POS, "Z_CLEARANCE_FOR_HOMING must be smaller than or equal to Z_MAX_POS."); +#endif + // Check Safe Bed Leveling settings #if HAS_SAFE_BED_LEVELING #if defined(SAFE_BED_LEVELING_START_Y) && !defined(SAFE_BED_LEVELING_START_X) From 5ed6bf65ba32e97b8cad133730a602fc67cda4f9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jan 2024 15:44:51 -0600 Subject: [PATCH 143/236] =?UTF-8?q?=F0=9F=94=A7=20Allow=20for=20no=20STOP?= =?UTF-8?q?=20pin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com> --- Marlin/src/pins/pins_postprocess.h | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index abe193d9794a..411faa4ddf2e 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -515,12 +515,12 @@ #ifdef X_STOP_PIN #if X_HOME_TO_MIN #define X_MIN_PIN X_STOP_PIN - #else + #elif X_HOME_TO_MAX #define X_MAX_PIN X_STOP_PIN #endif #elif X_HOME_TO_MIN #define X_STOP_PIN X_MIN_PIN - #else + #elif X_HOME_TO_MAX #define X_STOP_PIN X_MAX_PIN #endif #if !defined(X2_STOP_PIN) && ENABLED(X_DUAL_ENDSTOPS) && PIN_EXISTS(X_STOP) @@ -532,12 +532,12 @@ #ifdef Y_STOP_PIN #if Y_HOME_TO_MIN #define Y_MIN_PIN Y_STOP_PIN - #else + #elif Y_HOME_TO_MAX #define Y_MAX_PIN Y_STOP_PIN #endif #elif Y_HOME_TO_MIN #define Y_STOP_PIN Y_MIN_PIN - #else + #elif X_HOME_TO_MAX #define Y_STOP_PIN Y_MAX_PIN #endif #if !defined(Y2_STOP_PIN) && ENABLED(Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y_STOP) @@ -549,12 +549,12 @@ #ifdef Z_STOP_PIN #if Z_HOME_TO_MIN #define Z_MIN_PIN Z_STOP_PIN - #else + #elif Z_HOME_TO_MAX #define Z_MAX_PIN Z_STOP_PIN #endif #elif Z_HOME_TO_MIN #define Z_STOP_PIN Z_MIN_PIN - #else + #elif Z_HOME_TO_MAX #define Z_STOP_PIN Z_MAX_PIN #endif #if ENABLED(Z_MULTI_ENDSTOPS) && PIN_EXISTS(Z_STOP) @@ -574,12 +574,12 @@ #ifdef I_STOP_PIN #if I_HOME_TO_MIN #define I_MIN_PIN I_STOP_PIN - #else + #elif I_HOME_TO_MAX #define I_MAX_PIN I_STOP_PIN #endif #elif I_HOME_TO_MIN #define I_STOP_PIN I_MIN_PIN - #else + #elif I_HOME_TO_MAX #define I_STOP_PIN I_MAX_PIN #endif #endif @@ -588,12 +588,12 @@ #ifdef J_STOP_PIN #if J_HOME_TO_MIN #define J_MIN_PIN J_STOP_PIN - #else + #elif J_HOME_TO_MAX #define J_MAX_PIN J_STOP_PIN #endif #elif J_HOME_TO_MIN #define J_STOP_PIN J_MIN_PIN - #else + #elif J_HOME_TO_MAX #define J_STOP_PIN J_MAX_PIN #endif #endif @@ -602,12 +602,12 @@ #ifdef K_STOP_PIN #if K_HOME_TO_MIN #define K_MIN_PIN K_STOP_PIN - #else + #elif K_HOME_TO_MAX #define K_MAX_PIN K_STOP_PIN #endif #elif K_HOME_TO_MIN #define K_STOP_PIN K_MIN_PIN - #else + #elif K_HOME_TO_MAX #define K_STOP_PIN K_MAX_PIN #endif #endif @@ -616,12 +616,12 @@ #ifdef U_STOP_PIN #if U_HOME_TO_MIN #define U_MIN_PIN U_STOP_PIN - #else + #elif U_HOME_TO_MAX #define U_MAX_PIN U_STOP_PIN #endif #elif U_HOME_TO_MIN #define U_STOP_PIN U_MIN_PIN - #else + #elif U_HOME_TO_MAX #define U_STOP_PIN U_MAX_PIN #endif #endif @@ -630,12 +630,12 @@ #ifdef V_STOP_PIN #if V_HOME_TO_MIN #define V_MIN_PIN V_STOP_PIN - #else + #elif V_HOME_TO_MAX #define V_MAX_PIN V_STOP_PIN #endif #elif V_HOME_TO_MIN #define V_STOP_PIN V_MIN_PIN - #else + #elif V_HOME_TO_MAX #define V_STOP_PIN V_MAX_PIN #endif #endif @@ -644,12 +644,12 @@ #ifdef W_STOP_PIN #if W_HOME_TO_MIN #define W_MIN_PIN W_STOP_PIN - #else + #elif W_HOME_TO_MAX #define W_MAX_PIN W_STOP_PIN #endif #elif W_HOME_TO_MIN #define W_STOP_PIN W_MIN_PIN - #else + #elif W_HOME_TO_MAX #define W_STOP_PIN W_MAX_PIN #endif #endif From 18e65f5eb4a1dc4b08d4bece67f2c182e8359ff6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jan 2024 15:55:13 -0600 Subject: [PATCH 144/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20=5FU=20and=20other?= =?UTF-8?q?=20conflicts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #26220 --- Marlin/src/core/types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index 3d1250346125..e67644e52fc6 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -937,7 +937,7 @@ class AxisBits { typedef bits_t(NUM_AXIS_ENUMS) el; union { el bits; - // x, y, z ... e0, e1, e2 ... hx, hy, hz + // Axes x, y, z ... e0, e1, e2 ... hx, hy, hz struct { #if NUM_AXES bool NUM_AXIS_LIST(x:1, y:1, z:1, i:1, j:1, k:1, u:1, v:1, w:1); @@ -949,7 +949,7 @@ class AxisBits { bool hx:1, hy:1, hz:1; #endif }; - // X, Y, Z ... E0, E1, E2 ... HX, HY, HZ + // Axes X, Y, Z ... E0, E1, E2 ... HX, HY, HZ struct { #if NUM_AXES bool NUM_AXIS_LIST(X:1, Y:1, Z:1, I:1, J:1, K:1, U:1, V:1, W:1); @@ -963,7 +963,7 @@ class AxisBits { }; // a, b, c, e ... ha, hb, hc struct { - bool LOGICAL_AXIS_LIST(e:1, a:1, b:1, c:1, _i:1, _j:1, _k:1, _u:1, _v:1, _w:1); + bool LOGICAL_AXIS_LIST(e:1, a:1, b:1, c:1, ii:1, jj:1, kk:1, uu:1, vv:1, ww:1); #if EXTRUDERS > 1 #define _EN_ITEM(N) bool _e##N:1; REPEAT_S(1,EXTRUDERS,_EN_ITEM) @@ -975,7 +975,7 @@ class AxisBits { }; // A, B, C, E ... HA, HB, HC struct { - bool LOGICAL_AXIS_LIST(E:1, A:1, B:1, C:1, _I:1, _J:1, _K:1, _U:1, _V:1, _W:1); + bool LOGICAL_AXIS_LIST(E:1, A:1, B:1, C:1, II:1, JJ:1, KK:1, UU:1, VV:1, WW:1); #if EXTRUDERS > 1 #define _EN_ITEM(N) bool _E##N:1; REPEAT_S(1,EXTRUDERS,_EN_ITEM) From 5fea79fd07e5d874fbd217d8d9e8afceec60ef9e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jan 2024 16:02:33 -0600 Subject: [PATCH 145/236] =?UTF-8?q?=F0=9F=94=A7=20Fix=20ROTATIONAL=5FAXIS?= =?UTF-8?q?=5FGANG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com> --- Marlin/src/gcode/parser.h | 32 +++++++++++++++++------------- Marlin/src/inc/Conditionals_LCD.h | 4 ++++ Marlin/src/inc/Conditionals_adv.h | 5 +++++ Marlin/src/inc/Conditionals_post.h | 6 ------ 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index 5d162c0a41c0..94c5b284e06f 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -288,6 +288,17 @@ class GCodeParser { // Bool is true with no value or non-zero static bool value_bool() { return !has_value() || !!value_byte(); } + static constexpr bool axis_is_rotational(const AxisEnum axis) { + return (false + || TERN0(AXIS4_ROTATES, axis == I_AXIS) + || TERN0(AXIS5_ROTATES, axis == J_AXIS) + || TERN0(AXIS6_ROTATES, axis == K_AXIS) + || TERN0(AXIS7_ROTATES, axis == U_AXIS) + || TERN0(AXIS8_ROTATES, axis == V_AXIS) + || TERN0(AXIS9_ROTATES, axis == W_AXIS) + ); + } + // Units modes: Inches, Fahrenheit, Kelvin #if ENABLED(INCH_MODE_SUPPORT) @@ -307,14 +318,7 @@ class GCodeParser { } static float axis_unit_factor(const AxisEnum axis) { - if (false - || TERN0(AXIS4_ROTATES, axis == I_AXIS) - || TERN0(AXIS5_ROTATES, axis == J_AXIS) - || TERN0(AXIS6_ROTATES, axis == K_AXIS) - || TERN0(AXIS7_ROTATES, axis == U_AXIS) - || TERN0(AXIS8_ROTATES, axis == V_AXIS) - || TERN0(AXIS9_ROTATES, axis == W_AXIS) - ) return 1.0f; + if (axis_is_rotational(axis)) return 1.0f; #if HAS_EXTRUDERS if (axis >= E_AXIS && volumetric_enabled) return volumetric_unit_factor; #endif @@ -327,12 +331,12 @@ class GCodeParser { #else - static float mm_to_linear_unit(const_float_t mm) { return mm; } - static float mm_to_volumetric_unit(const_float_t mm) { return mm; } + static constexpr float mm_to_linear_unit(const_float_t mm) { return mm; } + static constexpr float mm_to_volumetric_unit(const_float_t mm) { return mm; } - static float linear_value_to_mm(const_float_t v) { return v; } - static float axis_value_to_mm(const AxisEnum, const float v) { return v; } - static float per_axis_value(const AxisEnum, const float v) { return v; } + static constexpr float linear_value_to_mm(const_float_t v) { return v; } + static constexpr float axis_value_to_mm(const AxisEnum, const float v) { return v; } + static constexpr float per_axis_value(const AxisEnum, const float v) { return v; } #endif @@ -402,7 +406,7 @@ class GCodeParser { #else // !TEMPERATURE_UNITS_SUPPORT - static float to_temp_units(int16_t c) { return (float)c; } + static constexpr float to_temp_units(int16_t c) { return (float)c; } static celsius_t value_celsius() { return value_int(); } static celsius_t value_celsius_diff() { return value_int(); } diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 64056d40f90d..bff742a5bcb7 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -507,6 +507,10 @@ #define ROTATIONAL_AXES 0 #endif +#if ROTATIONAL_AXES + #define HAS_ROTATIONAL_AXES 1 +#endif + /** * Number of Secondary Linear Axes (e.g., UVW) * All secondary axes for which AXIS*_ROTATES is not defined. diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 9f182a108d8f..379600d91574 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1351,6 +1351,11 @@ #undef MANUAL_MOVE_DISTANCE_IN #endif +// Clean up if no rotational axes exist +#if !HAS_ROTATIONAL_AXES + #undef MANUAL_MOVE_DISTANCE_DEG +#endif + // Power-Loss Recovery #if ENABLED(POWER_LOSS_RECOVERY) && defined(PLR_BED_THRESHOLD) #define HAS_PLR_BED_THRESHOLD 1 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 49562cb856f2..a1ef4a4fe0b7 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -96,12 +96,6 @@ #define AXIS9_NAME 'W' #endif -#if ANY(AXIS4_ROTATES, AXIS5_ROTATES, AXIS6_ROTATES, AXIS7_ROTATES, AXIS8_ROTATES, AXIS9_ROTATES) - #define HAS_ROTATIONAL_AXES 1 -#else - #undef MANUAL_MOVE_DISTANCE_DEG -#endif - #if HAS_X_AXIS #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS)) #endif From 3ef192e7c7b18804ec7e3964a1366bd08355dc93 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jan 2024 16:05:41 -0600 Subject: [PATCH 146/236] =?UTF-8?q?=F0=9F=8E=A8=20Cosmetic=20cleanup=2023-?= =?UTF-8?q?01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/marlinui.cpp | 67 +++++++++++++++++------------------ Marlin/src/module/motion.cpp | 3 +- Marlin/src/module/stepper.cpp | 22 +++++------- 3 files changed, 44 insertions(+), 48 deletions(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 97f15076fd55..23cb0a70580b 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -847,52 +847,51 @@ void MarlinUI::init() { if (processing) return; // Prevent re-entry from idle() calls // Add a manual move to the queue? - if (axis != NO_AXIS_ENUM && ELAPSED(millis(), start_time) && !planner.is_full()) { + if (axis == NO_AXIS_ENUM || PENDING(millis(), start_time) || planner.is_full()) return; - const feedRate_t fr_mm_s = (axis < LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + const feedRate_t fr_mm_s = (axis < LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; - #if IS_KINEMATIC + #if IS_KINEMATIC - #if HAS_MULTI_EXTRUDER - REMEMBER(ae, active_extruder); - #if MULTI_E_MANUAL - if (axis == E_AXIS) active_extruder = e_index; - #endif + #if HAS_MULTI_EXTRUDER + REMEMBER(ae, active_extruder); + #if MULTI_E_MANUAL + if (axis == E_AXIS) active_extruder = e_index; #endif + #endif - // Apply a linear offset to a single axis - if (axis == ALL_AXES_ENUM) - destination = all_axes_destination; - else if (axis <= LOGICAL_AXES) { - destination = current_position; - destination[axis] += offset; - } + // Apply a linear offset to a single axis + if (axis == ALL_AXES_ENUM) + destination = all_axes_destination; + else if (axis <= LOGICAL_AXES) { + destination = current_position; + destination[axis] += offset; + } - // Reset for the next move - offset = 0; - axis = NO_AXIS_ENUM; + // Reset for the next move + offset = 0; + axis = NO_AXIS_ENUM; - // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to - // move_to_destination. This will cause idle() to be called, which can then call this function while the - // previous invocation is being blocked. Modifications to offset shouldn't be made while - // processing is true or the planner will get out of sync. - processing = true; - prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination - processing = false; + // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to + // move_to_destination. This will cause idle() to be called, which can then call this function while the + // previous invocation is being blocked. Modifications to offset shouldn't be made while + // processing is true or the planner will get out of sync. + processing = true; + prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination + processing = false; - #else + #else - // For Cartesian / Core motion simply move to the current_position - planner.buffer_line(current_position, fr_mm_s, - TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder - ); + // For Cartesian / Core motion simply move to the current_position + planner.buffer_line(current_position, fr_mm_s, + TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder + ); - //SERIAL_ECHOLNPGM("Add planner.move with Axis ", C(AXIS_CHAR(axis)), " at FR ", fr_mm_s); + //SERIAL_ECHOLNPGM("Add planner.move with Axis ", C(AXIS_CHAR(axis)), " at FR ", fr_mm_s); - axis = NO_AXIS_ENUM; + axis = NO_AXIS_ENUM; - #endif - } + #endif } // diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 5fe1b3b741c9..b76f11b9849c 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1318,8 +1318,9 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool float cartesian_mm = get_move_distance(diff OPTARG(HAS_ROTATIONAL_AXES, cartes_move)); // If the move is very short, check the E move distance - // No E move either? Game over. TERN_(HAS_EXTRUDERS, if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(diff.e)); + + // No E move either? Game over. if (UNEAR_ZERO(cartesian_mm)) return; // The length divided by the segment size diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 8d55d37b96f8..0ae6ccb9a75c 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2597,20 +2597,16 @@ hal_timer_t Stepper::block_phase_isr() { AxisBits didmove; NUM_AXIS_CODE( - if (X_MOVE_TEST) didmove.a = true, - if (Y_MOVE_TEST) didmove.b = true, - if (Z_MOVE_TEST) didmove.c = true, - if (current_block->steps.i) didmove.i = true, - if (current_block->steps.j) didmove.j = true, - if (current_block->steps.k) didmove.k = true, - if (current_block->steps.u) didmove.u = true, - if (current_block->steps.v) didmove.v = true, - if (current_block->steps.w) didmove.w = true + if (X_MOVE_TEST) didmove.a = true, + if (Y_MOVE_TEST) didmove.b = true, + if (Z_MOVE_TEST) didmove.c = true, + if (!!current_block->steps.i) didmove.i = true, + if (!!current_block->steps.j) didmove.j = true, + if (!!current_block->steps.k) didmove.k = true, + if (!!current_block->steps.u) didmove.u = true, + if (!!current_block->steps.v) didmove.v = true, + if (!!current_block->steps.w) didmove.w = true ); - //if (current_block->steps.e) didmove.e = true; - //if (current_block->steps.a) didmove.x = true; - //if (current_block->steps.b) didmove.y = true; - //if (current_block->steps.c) didmove.z = true; axis_did_move = didmove; // No acceleration / deceleration time elapsed so far From a2228276bbc3908faa8ad3fe021b8961d0c11ec6 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 24 Jan 2024 00:22:20 +0000 Subject: [PATCH 147/236] [cron] Bump distribution date (2024-01-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 8bb0b703a42c..2c6728344f5d 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 "2024-01-23" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 c13ea933d27a..013334f10832 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 "2024-01-23" + #define STRING_DISTRIBUTION_DATE "2024-01-24" #endif /** From e668d5afd75039fbbbc9a3a8c8357c74c399ccb7 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu, 25 Jan 2024 07:50:48 +1300 Subject: [PATCH 148/236] =?UTF-8?q?=F0=9F=94=A7=20STM32=20UID=20followup?= =?UTF-8?q?=20(#26727)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/host/M115.cpp | 8 ++++---- Marlin/src/libs/hex_print.h | 4 ++-- Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h | 5 ----- Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h | 5 ----- ini/stm32f4.ini | 4 ++-- 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index cd2bcb0f94f0..d99737a261c6 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -35,7 +35,7 @@ #include "../../feature/caselight.h" #endif -#if !defined(MACHINE_UUID) && HAS_STM32_UID +#if !defined(MACHINE_UUID) && ENABLED(HAS_STM32_UID) #include "../../libs/hex_print.h" #endif @@ -72,7 +72,7 @@ void GcodeSuite::M115() { #if NUM_AXES != XYZ " AXIS_COUNT:" STRINGIFY(NUM_AXES) #endif - #if defined(MACHINE_UUID) || HAS_STM32_UID + #if defined(MACHINE_UUID) || ENABLED(HAS_STM32_UID) " UUID:" #endif #ifdef MACHINE_UUID @@ -80,7 +80,7 @@ void GcodeSuite::M115() { #endif ); - #if !defined(MACHINE_UUID) && HAS_STM32_UID + #if !defined(MACHINE_UUID) && ENABLED(HAS_STM32_UID) /** * STM32-based devices have a 96-bit CPU device serial number. * Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations. @@ -93,7 +93,7 @@ void GcodeSuite::M115() { #else uint16_t * const UID = (uint16_t*)UID_BASE; SERIAL_ECHO( - F("CEDE2A2F-"), hex_word(UID[0]), '-', hex_word(UID[1]), '-', hex_word(UID[2]), '-', + F("CEDE2A2F-"), hex_word(UID[0]), C('-'), hex_word(UID[1]), C('-'), hex_word(UID[2]), C('-'), hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5]) ); #endif diff --git a/Marlin/src/libs/hex_print.h b/Marlin/src/libs/hex_print.h index 2278ec2c248e..4a5cac2b6c1c 100644 --- a/Marlin/src/libs/hex_print.h +++ b/Marlin/src/libs/hex_print.h @@ -35,8 +35,8 @@ char* _hex_word(const uint16_t w); char* hex_address(const void * const w); char* _hex_long(const uintptr_t l); -template char* hex_word(T w) { return hex_word((uint16_t)w); } -template char* hex_long(T w) { return hex_long((uint32_t)w); } +template char* hex_word(T w) { return _hex_word((uint16_t)w); } +template char* hex_long(T w) { return _hex_long((uint32_t)w); } void print_hex_nybble(const uint8_t n); void print_hex_byte(const uint8_t b); diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index ae03e3c194e8..a256d2e7cb26 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -45,11 +45,6 @@ // I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC) #define HAS_MCP3426_ADC -// Opulo Lumen uses the CPU serial number -#ifdef STM32F4 - #define HAS_STM32_UID 1 -#endif - // // Servos // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index 7df1fb31e611..f7daa4c3ec41 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -45,11 +45,6 @@ // I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC) #define HAS_MCP3426_ADC -// Opulo Lumen uses the CPU serial number -#ifdef STM32F4 - #define HAS_STM32_UID 1 -#endif - // // Servos // diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index de0a5c7d37ae..2ba5742f4fec 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -111,7 +111,7 @@ extends = stm32_variant board = marlin_opulo_lumen_rev3 build_flags = ${stm32_variant.build_flags} -DARDUINO_BLACK_F407VE - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID extra_scripts = ${stm32_variant.extra_scripts} # @@ -122,7 +122,7 @@ extends = stm32_variant board = marlin_opulo_lumen_rev4 build_flags = ${stm32_variant.build_flags} -DARDUINO_BLACK_F407VE - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID extra_scripts = ${stm32_variant.extra_scripts} # From 63989023b8f179ee67dea44b008ea03e314482e6 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:54:37 -0800 Subject: [PATCH 149/236] =?UTF-8?q?=F0=9F=94=A7=20Update=20SKR=5FMINI=5FSC?= =?UTF-8?q?REEN=5FADAPTER=20error=20(#26726)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a0f05f1d7ee6..ba1d06f68923 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 @@ -245,7 +245,7 @@ #define LCD_BACKLIGHT_PIN -1 #define NEOPIXEL_PIN EXP1_02_PIN #else - #error "Only CR10_FYSETC_MINI_12864_2_1 and compatibles are currently supported on the BIGTREE_SKR_MINI_E3 with SKR_MINI_SCREEN_ADAPTER" + #error "Only FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3 with SKR_MINI_SCREEN_ADAPTER." #endif #else From 7fbd9ec5f4c450e062663dbe1964dc95e705733b Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:55:59 -0800 Subject: [PATCH 150/236] =?UTF-8?q?=F0=9F=94=A7=20Allow=20RAMPS=20FAN1=5FP?= =?UTF-8?q?IN=20override=20(#26725)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/ramps/pins_RAMPS.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index a90366e11ce0..25b17f016b8f 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -245,7 +245,9 @@ #define HEATER_BED_PIN MOSFET_C_PIN #endif #elif FET_ORDER_EFF // Hotend, Fan, Fan - #define FAN1_PIN MOSFET_C_PIN + #ifndef FAN1_PIN + #define FAN1_PIN MOSFET_C_PIN + #endif #elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #ifndef HEATER_BED_PIN #define HEATER_BED_PIN MOSFET_C_PIN From ed1391ee5d5c272240b8fe18716c340d7688cb8e Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Wed, 24 Jan 2024 22:21:00 +0200 Subject: [PATCH 151/236] =?UTF-8?q?=F0=9F=94=A7=20Wrap=20POWER=5FLOSS=5FRE?= =?UTF-8?q?TRACT=5FLEN=20(#26695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 22 ++++++++++++++-------- Marlin/src/feature/powerloss.cpp | 7 +++---- Marlin/src/feature/powerloss.h | 5 ++++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 1f22c6d7a501..49eea39180f7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -459,7 +459,7 @@ #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0 #else - #define PID_FAN_SCALING_LIN_FACTOR (0) // Power loss due to cooling = Kf * (fan_speed) + #define PID_FAN_SCALING_LIN_FACTOR (0) // Power-loss due to cooling = Kf * (fan_speed) #define DEFAULT_Kf 10 // A constant value added to the PID-tuner #define PID_FAN_SCALING_MIN_SPEED 10 // Minimum fan speed at which to enable PID_FAN_SCALING #endif @@ -1540,6 +1540,7 @@ * Axis moves <= 1/2 the axis length and Extruder moves <= EXTRUDE_MAXLENGTH * will be shown in the move submenus. */ + #define MANUAL_MOVE_DISTANCE_MM 10, 1.0, 0.1 // (mm) //#define MANUAL_MOVE_DISTANCE_MM 100, 50, 10, 1.0, 0.1 // (mm) //#define MANUAL_MOVE_DISTANCE_MM 500, 100, 50, 10, 1.0, 0.1 // (mm) @@ -1744,21 +1745,26 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) + #define PLR_ENABLED_DEFAULT false // Power-Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) //#define PLR_BED_THRESHOLD BED_MAXTEMP // (°C) Skip user confirmation at or above this bed temperature (0 to disable) - //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss - //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module. - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + + //#define POWER_LOSS_PIN 44 // Pin to detect power-loss. Set to -1 to disable default pin on boards without module, or comment to use board default. + //#define POWER_LOSS_STATE HIGH // State of pin indicating power-loss //#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor //#define POWER_LOSS_PULLDOWN - //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume - //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power-loss with UPS) + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, // especially with "vase mode" printing. Set too high and vases cannot be continued. #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power-loss + #if ENABLED(BACKUP_POWER_SUPPLY) + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail + #endif + // Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled! //#define POWER_LOSS_RECOVER_ZHOME #if ENABLED(POWER_LOSS_RECOVER_ZHOME) diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 7c90bb684a03..495f789f04f0 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -75,16 +75,15 @@ uint32_t PrintJobRecovery::cmd_sdpos, // = 0 PrintJobRecovery recovery; -#ifndef POWER_LOSS_PURGE_LEN - #define POWER_LOSS_PURGE_LEN 0 -#endif - #if DISABLED(BACKUP_POWER_SUPPLY) #undef POWER_LOSS_RETRACT_LEN // No retract at outage without backup power #endif #ifndef POWER_LOSS_RETRACT_LEN #define POWER_LOSS_RETRACT_LEN 0 #endif +#ifndef POWER_LOSS_PURGE_LEN + #define POWER_LOSS_PURGE_LEN 0 +#endif // Allow power-loss recovery to be aborted #define PLR_CAN_ABORT diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index 1fdc42db26ad..f87691cd09f2 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -42,8 +42,11 @@ #define POWER_LOSS_STATE HIGH #endif +#if DISABLED(BACKUP_POWER_SUPPLY) + #undef POWER_LOSS_ZRAISE // No Z raise at outage without backup power +#endif #ifndef POWER_LOSS_ZRAISE - #define POWER_LOSS_ZRAISE 2 + #define POWER_LOSS_ZRAISE 2 // Default Z-raise on outage or resume #endif //#define DEBUG_POWER_LOSS_RECOVERY From 97546bf55b20f10fa8952efbd232481e11e9f916 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:33:02 +1300 Subject: [PATCH 152/236] =?UTF-8?q?=F0=9F=9A=B8=20PLR=20recover=20chamber?= =?UTF-8?q?=20temp=20(#26696)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/powerloss.cpp | 12 ++++++++++++ Marlin/src/feature/powerloss.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 495f789f04f0..70fac66fce39 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -228,6 +228,8 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW TERN_(HAS_HEATED_BED, info.target_temperature_bed = thermalManager.degTargetBed()); + TERN_(HAS_HEATED_CHAMBER, info.target_temperature_chamber = thermalManager.degTargetChamber()); + TERN_(HAS_FAN, COPY(info.fan_speed, thermalManager.fan_speed)); #if HAS_LEVELING @@ -383,6 +385,12 @@ void PrintJobRecovery::resume() { PROCESS_SUBCOMMANDS_NOW(F("M420S0")); #endif + #if HAS_HEATED_CHAMBER + // Restore the chamber temperature + const celsius_t ct = info.target_temperature_chamber; + if (ct) PROCESS_SUBCOMMANDS_NOW(TS(F("M191S"), ct)); + #endif + #if HAS_HEATED_BED // Restore the bed temperature const celsius_t bt = info.target_temperature_bed; @@ -633,6 +641,10 @@ void PrintJobRecovery::resume() { DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed); #endif + #if HAS_HEATED_CHAMBER + DEBUG_ECHOLNPGM("target_temperature_chamber: ", info.target_temperature_chamber); + #endif + #if HAS_FAN DEBUG_ECHOPGM("fan_speed: "); FANS_LOOP(i) { diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index f87691cd09f2..579731ffddcb 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -87,6 +87,9 @@ typedef struct { #if HAS_HEATED_BED celsius_t target_temperature_bed; #endif + #if HAS_HEATED_CHAMBER + celsius_t target_temperature_chamber; + #endif #if HAS_FAN uint8_t fan_speed[FAN_COUNT]; #endif From cbc674ff997b3bffc92cbb2f61a9a5c8952c3446 Mon Sep 17 00:00:00 2001 From: minding-myown-business Date: Thu, 25 Jan 2024 00:24:25 +0000 Subject: [PATCH 153/236] =?UTF-8?q?=F0=9F=93=9D=20Fix=20dead=20LCD=20link?= =?UTF-8?q?=20(#26669)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4fd27c956cc3..9a0cd1addc3c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3037,7 +3037,7 @@ // // Factory display for Creality CR-10 / CR-7 / Ender-3 -// https://www.aliexpress.com/item/32833148327.html +// https://marlinfw.org/docs/hardware/controllers.html#cr10_stockdisplay // // Connect to EXP1 on RAMPS and compatible boards. // From a215bc2ca3b27afb5de7fbf69d9b19da5ac7466e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 25 Jan 2024 00:28:09 +0000 Subject: [PATCH 154/236] [cron] Bump distribution date (2024-01-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 2c6728344f5d..2a3912a4cb28 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 "2024-01-24" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 013334f10832..6b1ffe11a7b4 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 "2024-01-24" + #define STRING_DISTRIBUTION_DATE "2024-01-25" #endif /** From ffbf4a6a9002827daf09a5f36bd28fdf3d61a0e8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 25 Jan 2024 13:41:39 -0600 Subject: [PATCH 155/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20IA=20Creality=20ID?= =?UTF-8?q?EX=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lcd/extui/ia_creality/ia_creality_rts.cpp | 278 ++++++++---------- 1 file changed, 117 insertions(+), 161 deletions(-) diff --git a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp index 8ff9fd9f7144..15810b67a570 100644 --- a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp @@ -459,12 +459,13 @@ int16_t RTS::receiveData() { } /* AutoUpload, (and answer to) Command 0x83 : - | tmp[0 1 2 3 4 ... ] - | Example 5A A5 06 83 20 01 01 78 01 …… - | / / | | \ / | \ \ - | Header | | | | \_____\_ DATA (Words!) - | DatagramLen / VPAdr | - | Command DataLen (in Words) */ + * tmp[0 1 2 3 4 ... ] + * Example 5A A5 06 83 20 01 01 78 01 …… + * / / | | \ / | \ \ + * Header | | | | \_____\_ DATA (Words!) + * DatagramLen / VPAdr | + * Command DataLen (in Words) + */ if (command == VarAddr_R) { const uint16_t vp = tmp[0] << 8 | tmp[1]; @@ -478,7 +479,6 @@ int16_t RTS::receiveData() { rx_datagram_state = DGUS_IDLE; return 2; - break; } // discard anything else @@ -637,7 +637,7 @@ void RTS::handleData() { recdat.head[1] = FHTWO; return; } - for (int16_t i = 0; Addrbuf[i] != 0; i++) + for (int16_t i = 0; Addrbuf[i] != 0; i++) { if (recdat.addr == Addrbuf[i]) { if (Addrbuf[i] == NzBdSet || Addrbuf[i] == NozzlePreheat || Addrbuf[i] == BedPreheat || Addrbuf[i] == Flowrate) Checkkey = ManualSetTemp; @@ -651,6 +651,7 @@ void RTS::handleData() { Checkkey = i; break; } + } switch (recdat.addr) { case Flowrate: @@ -662,7 +663,7 @@ void RTS::handleData() { case HotendPID_P ... HotendPID_D: case BedPID_P ... BedPID_D: #if ENABLED(DUAL_X_CARRIAGE) - case T2Offset_X ... T2Offset_Z + case T2Offset_X ... T2Offset_Z: #if ENABLED(EDITABLE_STEPS_PER_UNIT) case T2StepMM_E: #endif @@ -700,7 +701,8 @@ void RTS::handleData() { #endif switch (Checkkey) { - case Printfile: + + case Printfile: { if (recdat.data[0] == 1) { // card show_status = false; filenavigator.getFiles(0); @@ -734,9 +736,9 @@ void RTS::handleData() { else if (recdat.data[0] == 4) { // Settings show_status = false; } - break; + } break; - case Adjust: + case Adjust: { if (recdat.data[0] == 1) { show_status = false; } @@ -752,13 +754,13 @@ void RTS::handleData() { else if (recdat.data[0] == 3) setTargetFan_percent(getTargetFan_percent((fan_t)getActiveTool()) != 0 ? 100 : 0, FAN0); - break; + } break; - case Feedrate: + case Feedrate: { setFeedrate_percent(recdat.data[0]); - break; + } break; - case PrintChoice: + case PrintChoice: { if (recdat.addr == Stopprint) { if (recdat.data[0] == 240) { // no sendData(ExchangePageBase + 53, ExchangepageAddr); @@ -792,11 +794,11 @@ void RTS::handleData() { show_status = true; sendData(ExchangePageBase + 82, ExchangepageAddr); } - break; + } break; #if HAS_BED_PROBE - case Zoffset: + case Zoffset: { float tmp_zprobe_offset; if (recdat.data[0] >= 32768) tmp_zprobe_offset = (float(recdat.data[0]) - 65536) / 100; @@ -815,11 +817,11 @@ void RTS::handleData() { } sendData(getZOffset_mm() * 100, ProbeOffset_Z); - break; + } break; #endif // HAS_BED_PROBE - case TempControl: + case TempControl: { if (recdat.data[0] == 0) { show_status = true; tpShowStatus = false; @@ -868,9 +870,9 @@ void RTS::handleData() { sendData(ExchangePageBase + 57, ExchangepageAddr); printerStatusKey[1] = 2; } - break; + } break; - case ManualSetTemp: + case ManualSetTemp: { if (recdat.addr == NzBdSet) { if (recdat.data[0] == 0) { if (getTargetFan_percent((fan_t)getActiveTool()) == 0) @@ -942,11 +944,9 @@ void RTS::handleData() { setTargetFan_percent(uint16_t(recdat.data[0]), (fan_t)getActiveTool()); } else { - float tmp_float_handling; - if (recdat.data[0] >= 32768) - tmp_float_handling = (float(recdat.data[0]) - 65536) / 100; - else - tmp_float_handling = float(recdat.data[0]) / 100; + float tmp_float_handling = float(recdat.data[0]); + if (tmp_float_handling >= 32768) tmp_float_handling -= 65536; + tmp_float_handling /= 100; if (false) {} @@ -1053,9 +1053,9 @@ void RTS::handleData() { #endif #endif // HAS_PID_HEATING } - break; + } break; - case Setting: + case Setting: { if (recdat.data[0] == 0) { // return to main page show_status = true; tpShowStatus = false; @@ -1108,29 +1108,27 @@ void RTS::handleData() { injectCommands(F("M84")); sendData(11, FilenameIcon); } - break; + } break; - case ReturnBack: + case ReturnBack: { if (recdat.data[0] == 1) { // return to the tool page show_status = false; sendData(ExchangePageBase + 63, ExchangepageAddr); } - if (recdat.data[0] == 2) // return to the Level mode page + else if (recdat.data[0] == 2) // return to the Level mode page sendData(ExchangePageBase + 64, ExchangepageAddr); - break; + } break; - case Bedlevel: + case Bedlevel: { switch (recdat.data[0]) { - case 1: { // Z-axis to home + case 1: // Z-axis to home // Disallow Z homing if X or Y are unknown injectCommands(isAxisPositionKnown(axis_t(X)) && isAxisPositionKnown(axis_t(Y)) ? F("G28Z\nG1F1500Z0.0") : F("G28\nG1F1500Z0.0")); sendData(getZOffset_mm() * 100, ProbeOffset_Z); break; - } #if HAS_BED_PROBE - - case 2: { // Z-axis to Up + case 2: // Z-axis to Up if (WITHIN((getZOffset_mm() + 0.1), PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) { smartAdjustAxis_steps(getAxisSteps_per_mm(Z) / 10, axis_t(Z), false); //setZOffset_mm(getZOffset_mm() + 0.1); @@ -1138,8 +1136,8 @@ void RTS::handleData() { onStatusChanged(MString<20>(GET_TEXT_F(MSG_UBL_Z_OFFSET), p_float_t(getZOffset_mm(), 3))); } break; - } - case 3: { // Z-axis to Down + + case 3: // Z-axis to Down if (WITHIN((getZOffset_mm() - 0.1), PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) { smartAdjustAxis_steps(-getAxisSteps_per_mm(Z) / 10, axis_t(Z), false); //babystepAxis_steps(int16_t(-getAxisSteps_per_mm(Z)) / 10, axis_t(Z)); @@ -1148,17 +1146,15 @@ void RTS::handleData() { onStatusChanged(MString<20>(GET_TEXT_F(MSG_UBL_Z_OFFSET), p_float_t(getZOffset_mm(), 3))); } break; - } - #endif // HAS_BED_PROBE - case 4: { // Assistant Level + case 4: // Assistant Level TERN_(HAS_MESH, setLevelingActive(false)); injectCommands(isPositionKnown() ? F("G1 F1000 Z0.0") : F("G28\nG1 F1000 Z0.0")); waitway = 2; sendData(ExchangePageBase + 84, ExchangepageAddr); break; - } + case 5: { // AutoLevel "Measuring" Button #if ENABLED(MESH_BED_LEVELING) sendData(ExchangePageBase + 93, ExchangepageAddr); @@ -1173,45 +1169,44 @@ void RTS::handleData() { sendData(ExchangePageBase + 64, ExchangepageAddr); injectCommands(F(MEASURING_GCODE)); #endif - break; - } + } break; #if ENABLED(LCD_BED_TRAMMING) - case 6: { // Bed Tramming, Centre 1 + case 6: // Bed Tramming, Centre 1 setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z)); setAxisPosition_mm(X_CENTER, axis_t(X)); setAxisPosition_mm(Y_CENTER, axis_t(Y)); waitway = 6; break; - } - case 7: { // Bed Tramming, Front Left 2 + + case 7: // Bed Tramming, Front Left 2 setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z)); setAxisPosition_mm(X_MIN_BED + lfrb[0], axis_t(X)); setAxisPosition_mm(Y_MIN_BED + lfrb[1], axis_t(Y)); waitway = 6; break; - } - case 8: { // Bed Tramming, Front Right 3 + + case 8: // Bed Tramming, Front Right 3 setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z)); setAxisPosition_mm(X_MAX_BED - lfrb[2], axis_t(X)); setAxisPosition_mm(Y_MIN_BED + lfrb[1], axis_t(Y)); waitway = 6; break; - } - case 9: { // Bed Tramming, Back Right 4 + + case 9: // Bed Tramming, Back Right 4 setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z)); setAxisPosition_mm(X_MAX_BED - lfrb[2], axis_t(X)); setAxisPosition_mm(Y_MAX_BED - lfrb[3], axis_t(Y)); waitway = 6; break; - } - case 10: { // Bed Tramming, Back Left 5 + + case 10: // Bed Tramming, Back Left 5 setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z)); setAxisPosition_mm(X_MIN_BED + lfrb[0], axis_t(X)); setAxisPosition_mm(Y_MAX_BED - lfrb[3], axis_t(Y)); waitway = 6; break; - } + #endif // LCD_BED_TRAMMING case 11: { // Autolevel switch @@ -1223,113 +1218,92 @@ void RTS::handleData() { #if HAS_BED_PROBE sendData(getZOffset_mm() * 100, ProbeOffset_Z); #endif - break; - } + } break; + #if ENABLED(G26_MESH_VALIDATION) - case 12: { + case 12: injectCommands(F("G26R255")); onStatusChanged(F("Beginning G26.. Heating")); break; - } #endif #if ENABLED(MESH_BED_LEVELING) - case 13: { + case 13: injectCommands(F("G29S1")); onStatusChanged(F("Begin Manual Mesh")); break; - } - case 14: { + case 14: injectCommands(F("G29S2")); onStatusChanged(F("Moving to Next Mesh Point")); break; - } #endif - case 15: { + case 15: injectCommands(F("M211S0\nG91\nG1Z-0.025\nG90\nM211S1")); onStatusChanged(F("Moved down 0.025")); break; - } - case 16: { + case 16: injectCommands(F("M211S0\nG91\nG1Z0.025\nG90\nM211S1")); onStatusChanged(F("Moved up 0.025")); break; - } - case 17: { + case 17: dwin_settings.display_volume = 0; dwin_settings.display_sound = false; setTouchScreenConfiguration(); break; - } - case 18: { + case 18: dwin_settings.display_volume = 255; dwin_settings.display_sound = true; setTouchScreenConfiguration(); break; - } - case 19: { + case 19: dwin_settings.screen_brightness = 10; setTouchScreenConfiguration(); break; - } - case 20: { + case 20: dwin_settings.screen_brightness = 100; setTouchScreenConfiguration(); break; - } - case 21: { + case 21: dwin_settings.display_standby ^= true; setTouchScreenConfiguration(); break; - } - case 22: { - dwin_settings.screen_rotation = dwin_settings.screen_rotation == 10 ? 0 : 10; + case 22: + dwin_settings.screen_rotation = 10 - dwin_settings.screen_rotation == 10 ? 0 : 10; setTouchScreenConfiguration(); break; - } - case 23: { // Set IDEX Autopark + case 23: // Set IDEX Autopark injectCommands(F("M605S1\nG28X\nG1X0")); break; - } - case 24: { // Set IDEX Duplication + case 24: // Set IDEX Duplication injectCommands(F("M605S1\nT0\nG28\nM605S2\nG28X\nG1X0")); break; - } - case 25: { // Set IDEX Mirrored Duplication + case 25: // Set IDEX Mirrored Duplication injectCommands(F("M605S1\nT0\nG28\nM605S2\nG28X\nG1X0\nM605S3")); break; - } - case 26: { // Set IDEX Full Control + case 26: // Set IDEX Full Control injectCommands(F("M605S0\nG28X")); break; - } - case 27: { // Change Tool + case 27: // Change Tool setActiveTool(getActiveTool() == E0 ? E1 : E0, !isAxisPositionKnown(X)); break; - } + default: break; } sendData(10, FilenameIcon); - break; + } break; case XYZEaxis: { axis_t axis = X; float min = 0.0f, max = 0.0f; waitway = 4; if (recdat.addr == DisplayXaxis) { - axis = X; - min = X_MIN_POS; - max = X_MAX_POS; + axis = X; min = X_MIN_POS; max = X_MAX_POS; } else if (recdat.addr == DisplayYaxis) { - axis = Y; - min = Y_MIN_POS; - max = Y_MAX_POS; + axis = Y; min = Y_MIN_POS; max = Y_MAX_POS; } else if (recdat.addr == DisplayZaxis) { - axis = Z; - min = Z_MIN_POS; - max = Z_MAX_POS; + axis = Z; min = Z_MIN_POS; max = Z_MAX_POS; } else if (recdat.addr == AutoZero) { if (recdat.data[0] == 3) { // autohome @@ -1343,19 +1317,16 @@ void RTS::handleData() { axisPageNum = recdat.data[0]; waitway = 0; } - break; - } + } break; float targetPos = float(recdat.data[0]) / 10; LIMIT(targetPos, min, max); setAxisPosition_mm(targetPos, axis); waitway = 0; sendData(10, FilenameIcon); - break; - } - - case Filament: + } break; + case Filament: { uint16_t IconTemp; if (recdat.addr == Exchfilament) { if (getActualTemp_celsius(getActiveTool()) < EXTRUDE_MINTEMP && recdat.data[0] < 5) { @@ -1366,23 +1337,23 @@ void RTS::handleData() { } switch (recdat.data[0]) { - case 1: { // Unload filament1 + case 1: // Unload filament1 setAxisPosition_mm(getAxisPosition_mm(E0) - changeMaterialBuf[0], E0); break; - } - case 2: { // Load filament1 + + case 2: // Load filament1 setAxisPosition_mm(getAxisPosition_mm(E0) + changeMaterialBuf[0], E0); break; - } - case 3: { // Unload filament2 + + case 3: // Unload filament2 setAxisPosition_mm(getAxisPosition_mm(E1) - changeMaterialBuf[1], E1); break; - } - case 4: { // Load filament2 + + case 4: // Load filament2 setAxisPosition_mm(getAxisPosition_mm(E1) + changeMaterialBuf[1], E1); break; - } - case 5: { // sure to heat + + case 5: // sure to heat nozzleTempStatus[0] = 1; setTargetTemp_celsius((PREHEAT_1_TEMP_HOTEND + 10), getActiveTool()); @@ -1397,17 +1368,17 @@ void RTS::handleData() { delay_ms(5); sendData(ExchangePageBase + 68, ExchangepageAddr); break; - } - case 6: { // cancel to heat + + case 6: // cancel to heat sendData(ExchangePageBase + 65, ExchangepageAddr); break; - } - case 0xF1: { // Sure to cancel heating + + case 0xF1: // Sure to cancel heating nozzleTempStatus[0] = 0; delay_ms(1); sendData(ExchangePageBase + 65, ExchangepageAddr); break; - } + case 0xF0: // not to cancel heating break; } @@ -1420,57 +1391,53 @@ void RTS::handleData() { else if (recdat.addr == FilamentUnit2) { changeMaterialBuf[1] = float(recdat.data[0]) / 10; } - break; + } break; - case LanguageChoice: + case LanguageChoice: { //if (recdat.data[0] == 1) settings.save(); else injectCommands(F("M300")); // may at some point use language change screens to save eeprom explicitly switch (recdat.data[0]) { - case 0: { + case 0: injectCommands(F("M500")); break; - } - case 1: { + + case 1: sendData(ExchangePageBase + 94, ExchangepageAddr); break; - } #if ENABLED(PIDTEMP) - case 2: { + case 2: onStatusChanged(F("Hotend PID Started")); startPIDTune(static_cast(pid_hotendAutoTemp), getActiveTool()); break; - } #endif - case 3: { + case 3: injectCommands(F("M502\nM500")); break; - } - case 4: { + + case 4: injectCommands(F("M999\nM280P0S160")); break; - } #if ENABLED(PIDTEMPBED) - case 5: { + case 5: onStatusChanged(F("Bed PID Started")); startBedPIDTune(static_cast(pid_bedAutoTemp)); break; - } #endif - case 6: { + case 6: injectCommands(F("M500")); break; - } + default: break; } - break; + } break; - case No_Filament: + case No_Filament: { if (recdat.data[0] == 1) { // Filament is out, resume / resume selected on screen if (ExtUI::pauseModeStatus != PAUSE_MESSAGE_PURGE && ExtUI::pauseModeStatus != PAUSE_MESSAGE_OPTION) { // setPauseMenuResponse(PAUSE_RESPONSE_RESUME_PRINT); @@ -1507,7 +1474,7 @@ void RTS::handleData() { setUserConfirmed(); } } - break; + } break; #if ENABLED(POWER_LOSS_RECOVERY) case PwrOffNoF: @@ -1518,14 +1485,8 @@ void RTS::handleData() { break; #endif - case Volume: - if (recdat.data[0] < 0) - dwin_settings.display_volume = 0; - else if (recdat.data[0] > 255) - dwin_settings.display_volume = 0xFF; - else - dwin_settings.display_volume = recdat.data[0]; - + case Volume: { + dwin_settings.display_volume = constrain(recdat.data[0], 0, 255); if (dwin_settings.display_volume == 0) { sendData(0, VolumeIcon); sendData(9, SoundIcon); @@ -1535,9 +1496,9 @@ void RTS::handleData() { sendData(8, SoundIcon); } sendData(dwin_settings.display_volume << 8, SoundAddr + 1); - break; + } break; - case Filename: + case Filename: { if (isMediaInserted() && recdat.addr == FilenameChs) { recordcount = recdat.data[0] - 1; @@ -1616,7 +1577,7 @@ void RTS::handleData() { tpShowStatus = false; } } - break; + } break; case VolumeDisplay: { if (recdat.data[0] == 0) { @@ -1632,8 +1593,7 @@ void RTS::handleData() { dwin_settings.display_sound = true; } setTouchScreenConfiguration(); - break; - } + } break; case DisplayBrightness: { if (recdat.data[0] < 10) @@ -1643,8 +1603,7 @@ void RTS::handleData() { else dwin_settings.screen_brightness = (uint8_t)recdat.data[0]; setTouchScreenConfiguration(); - break; - } + } break; case DisplayStandbyBrightness: { if (recdat.data[0] < 10) @@ -1654,8 +1613,7 @@ void RTS::handleData() { else dwin_settings.standby_brightness = (uint8_t)recdat.data[0]; setTouchScreenConfiguration(); - break; - } + } break; case DisplayStandbySeconds: { if (recdat.data[0] < 5) @@ -1665,8 +1623,7 @@ void RTS::handleData() { else dwin_settings.standby_time_seconds = (uint8_t)recdat.data[0]; setTouchScreenConfiguration(); - break; - } + } break; case AutolevelVal: { uint8_t meshPoint = (recdat.addr - AutolevelVal) / 2, @@ -1680,8 +1637,7 @@ void RTS::handleData() { xy_uint8_t point = { xPnt, yPnt }; setMeshPoint(point, meshVal); sendData(meshVal * 1000, recdat.addr); - break; - } + } break; default: break; } From 38560378fcb99bcdb4b889f3b8e08c7dc5abe366 Mon Sep 17 00:00:00 2001 From: engrenage <32837871+petaflot@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:24:57 +0100 Subject: [PATCH 156/236] =?UTF-8?q?=F0=9F=94=A7=20Allow=20float=20Z=5FPROB?= =?UTF-8?q?E=5FLOW=5FPOINT=20(#26711)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 4 +--- Marlin/src/module/probe.cpp | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5a22accc6da6..ccbf5c670590 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1508,9 +1508,7 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #endif #endif - #if Z_PROBE_LOW_POINT > 0 - #error "Z_PROBE_LOW_POINT must be less than or equal to 0." - #endif + static_assert(Z_PROBE_LOW_POINT <= 0, "Z_PROBE_LOW_POINT must be less than or equal to 0."); #if ENABLED(PROBE_ACTIVATION_SWITCH) #ifndef PROBE_ACTIVATION_SWITCH_STATE diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index ee9e9b34acef..2fec098b8aaa 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -1010,6 +1010,10 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai // If any error occurred stow the probe and set an alert if (isnan(measured_z)) { + // TODO: Disable steppers (unless G29_RETRY_AND_RECOVER or G29_HALT_ON_FAILURE are set). + // Something definitely went wrong at this point, so it might be a good idea to release the steppers. + // The user may want to quickly move the carriage or bed by hand to avoid bed damage from the (hot) nozzle. + // This would also benefit from the contemplated "Audio Alerts" feature. stow(); LCD_MESSAGE(MSG_LCD_PROBING_FAILED); #if DISABLED(G29_RETRY_AND_RECOVER) From 04c8a3138e3ce1edcd59c8e6c1ba4abeba28e30d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 25 Jan 2024 15:07:34 -0600 Subject: [PATCH 157/236] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20LCD=20pins=20com?= =?UTF-8?q?ments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/esp32/pins_MM_JOKER.h | 1 + Marlin/src/pins/esp32/pins_MRR_ESPE.h | 6 +++--- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 6 +++--- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 1 + Marlin/src/pins/lpc1768/pins_EMOTRONIC.h | 1 + Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 1 + Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 1 + Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 1 + Marlin/src/pins/mega/pins_CNCONTROLS_12.h | 1 + Marlin/src/pins/mega/pins_EINSTART-S.h | 6 +----- Marlin/src/pins/mega/pins_HJC2560C_REV2.h | 1 + Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 1 + Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 1 + Marlin/src/pins/mega/pins_OVERLORD.h | 1 + Marlin/src/pins/mega/pins_WEEDO_62A.h | 1 + Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 1 + Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 1 + Marlin/src/pins/rambo/pins_MINIRAMBO.h | 1 + Marlin/src/pins/rambo/pins_RAMBO.h | 1 + Marlin/src/pins/ramps/pins_3DRAG.h | 1 + Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h | 3 ++- Marlin/src/pins/ramps/pins_FELIX2.h | 1 + Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 9 +++++++-- Marlin/src/pins/ramps/pins_K8600.h | 1 + Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 1 + Marlin/src/pins/ramps/pins_ORTUR_4.h | 1 + Marlin/src/pins/ramps/pins_RAMPS.h | 6 +++--- Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 7 ++----- Marlin/src/pins/ramps/pins_RUMBA.h | 1 + Marlin/src/pins/ramps/pins_TT_OSCAR.h | 6 +++--- Marlin/src/pins/ramps/pins_ULTIMAKER.h | 1 + Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 1 + Marlin/src/pins/ramps/pins_VORON.h | 2 +- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 6 +++--- Marlin/src/pins/sam/pins_ALLIGATOR_R2.h | 1 + Marlin/src/pins/sam/pins_ARCHIM1.h | 1 + Marlin/src/pins/sam/pins_ARCHIM2.h | 1 + Marlin/src/pins/sam/pins_DUE3DOM.h | 1 + Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 1 + Marlin/src/pins/sam/pins_KRATOS32.h | 1 + Marlin/src/pins/sam/pins_RADDS.h | 1 + Marlin/src/pins/sam/pins_RAMPS_DUO.h | 1 + Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 1 + Marlin/src/pins/sam/pins_RAMPS_SMART.h | 1 + Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 1 + Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 1 + Marlin/src/pins/samd/pins_RAMPS_144.h | 6 +++--- Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h | 1 + Marlin/src/pins/sanguino/pins_MELZI_CREALITY_E2.h | 1 + Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h | 1 + Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 1 + Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 1 + Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 1 + Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 1 + Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 1 + Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 1 + Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 1 + Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 1 + Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 1 + Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h | 1 + Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h | 1 + Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h | 1 + Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 1 + Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 1 + Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h | 1 + Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 1 + Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 3 ++- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 3 ++- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 3 ++- Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h | 3 ++- Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 3 ++- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 1 + Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 1 + Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h | 1 + Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h | 3 ++- Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h | 3 ++- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 1 + Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 1 + Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 3 ++- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 1 + Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 1 + Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h | 1 + Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 3 ++- Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 3 ++- Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 3 ++- Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h | 3 ++- Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h | 3 ++- Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 2 +- Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h | 3 ++- Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 3 ++- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 1 + Marlin/src/pins/teensy2/pins_TEENSY2.h | 1 + Marlin/src/pins/teensy2/pins_TEENSYLU.h | 1 + 93 files changed, 128 insertions(+), 48 deletions(-) diff --git a/Marlin/src/pins/esp32/pins_MM_JOKER.h b/Marlin/src/pins/esp32/pins_MM_JOKER.h index b992fe89c3c8..b74321dbfcef 100644 --- a/Marlin/src/pins/esp32/pins_MM_JOKER.h +++ b/Marlin/src/pins/esp32/pins_MM_JOKER.h @@ -219,6 +219,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD //#define LCD_PINS_RS 13 diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index 90ff78487f33..bcdb8c4faa75 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -121,9 +121,9 @@ #define SDSS 5 #define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers -////////////////////////// -// LCDs and Controllers // -////////////////////////// +// +// LCD / Controller +// #if HAS_WIRED_LCD diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index ea6e4a4bee68..0704145d7407 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -399,9 +399,9 @@ #define EXP2_07_PIN 49 // SD_DET #define EXP2_08_PIN 41 // KILL -////////////////////////// -// LCDs and Controllers // -////////////////////////// +// +// LCD / Controller +// #if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index 94ce0b097b7b..e6a2abc0f0f0 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -111,6 +111,7 @@ // // LCD / Controller // + #if !defined(BEEPER_PIN) && HAS_WIRED_LCD && DISABLED(LCD_USE_I2C_BUZZER) #define BEEPER_PIN P1_30 // (EXP1-1) Not 5V-tolerant #endif diff --git a/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h index 43a9b786eb7d..5c4e8d40e85b 100644 --- a/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h +++ b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h @@ -138,6 +138,7 @@ // // LCD / Controller // + #if ENABLED(EMOTION_TECH_LCD) #define BEEPER_PIN EXP2_01_PIN #define DOGLCD_A0 EXP2_06_PIN diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 335d6b9d23e7..039d906efcad 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -230,6 +230,7 @@ // // LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index 3db18e4acfea..0134e936319d 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -93,6 +93,7 @@ // // LCD / Controller // + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index 60d68a8607ba..1c0623aea866 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -138,6 +138,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 6 diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h index 5c92f92e29d6..4864a6d83c78 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -143,6 +143,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 16 diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h index 813cbf7dc42f..92c85c12110f 100644 --- a/Marlin/src/pins/mega/pins_EINSTART-S.h +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -78,12 +78,8 @@ #define SDSS 53 #define LED_PIN 4 -////////////////////////// -// LCDs and Controllers // -////////////////////////// - // -// LCD Display output pins +// LCD / Controller // // Requires #define U8GLIB_SH1106_EINSTART in Configuration.h diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index 512da028348b..638465f3b9eb 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -122,6 +122,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 18 diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 3868f11c11b0..688c147a6890 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -167,6 +167,7 @@ // // LCD / Controller // + #if ENABLED(MINIPANEL) #define BEEPER_PIN MINI_15 diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index e9a0ddc09dfc..22c14fc5e89e 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -187,6 +187,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if IS_RRD_FG_SC diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 1ae9e69af073..332d7d4cb4dc 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -122,6 +122,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD // OVERLORD OLED pins #define LCD_PINS_RS 20 diff --git a/Marlin/src/pins/mega/pins_WEEDO_62A.h b/Marlin/src/pins/mega/pins_WEEDO_62A.h index f3adf5eab8b8..436529cb3510 100644 --- a/Marlin/src/pins/mega/pins_WEEDO_62A.h +++ b/Marlin/src/pins/mega/pins_WEEDO_62A.h @@ -92,6 +92,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 37 diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index d73092c2f68a..ada4885752a3 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -208,6 +208,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL #define KILL_PIN 32 diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 6d37fcf7df77..75d0974b0a36 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -202,6 +202,7 @@ // // LCD / Controller // + #if ANY(HAS_WIRED_LCD, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) #define KILL_PIN 32 diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index a7b8c8466bbc..f176efcc7111 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -147,6 +147,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL #if !MB(MINIRAMBO_10A) diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 494ea547f27f..8ea3c15b4620 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -199,6 +199,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL #define KILL_PIN 80 diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 2d419e132179..3a2d7ea19561 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -131,6 +131,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD && IS_NEWPANEL #undef BEEPER_PIN diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index 90f46fe3861e..83045bdfe02d 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -85,8 +85,9 @@ #define SD_SCK_PIN 52 // PB1 // -// LCDs and Controllers +// LCD / Controller // + #if HAS_WIRED_LCD #if ENABLED(ZONESTAR_LCD) #define LCD_PINS_RS 2 diff --git a/Marlin/src/pins/ramps/pins_FELIX2.h b/Marlin/src/pins/ramps/pins_FELIX2.h index 34bd29d19fe7..746de8581a67 100644 --- a/Marlin/src/pins/ramps/pins_FELIX2.h +++ b/Marlin/src/pins/ramps/pins_FELIX2.h @@ -49,6 +49,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD && IS_NEWPANEL #define SD_DETECT_PIN 6 diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 08c40822fc76..102595363377 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -192,7 +192,6 @@ // // Misc. Functions // -#define SDSS EXP2_04_PIN #define LED_PIN 13 #define KILL_PIN 41 @@ -230,10 +229,16 @@ #define EXP2_08_PIN -1 // RESET // -// LCDs and Controllers +// SD Card // + +#define SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN +// +// LCD / Controller +// + #if ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_08_PIN diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index eacaf95b3801..170401bf1c21 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -60,6 +60,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD && IS_NEWPANEL #define LCD_PINS_RS 27 diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 9afdc62a53a8..6ef77909d163 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -63,6 +63,7 @@ // // LCD / Controller // + #if ANY(VIKI2, miniVIKI) /** * VIKI2 Has two groups of wires with... diff --git a/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/src/pins/ramps/pins_ORTUR_4.h index d2adf9971c84..e8a87911d1b7 100644 --- a/Marlin/src/pins/ramps/pins_ORTUR_4.h +++ b/Marlin/src/pins/ramps/pins_ORTUR_4.h @@ -79,6 +79,7 @@ // // LCD / Controller // + #if IS_RRD_FG_SC #define BEEPER_PIN 35 diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 25b17f016b8f..0195f3a1bc9a 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -585,9 +585,9 @@ #endif -////////////////////////// -// LCDs and Controllers // -////////////////////////// +// +// LCD / Controller +// #ifdef LCD_PINS_DEFINED diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index 542b3cb81642..9565adad2f3b 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -244,13 +244,10 @@ #endif #endif -////////////////////////// -// LCDs and Controllers // -////////////////////////// - // -// LCD Display output pins +// LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 45 #define LCD_PINS_RS 19 diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 1d2aeb4f0f88..9a4a384e4ab5 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -190,6 +190,7 @@ // // LCD / Controller // + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC 38 // Set as output on init #define LCD_PINS_RS 41 // Pull low for 1s to init diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 64f595f31232..ed4f373c541d 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -304,9 +304,9 @@ #define EXP2_07_PIN 49 // SD_DET #define EXP2_08_PIN 41 // KILL / RESET -////////////////////////// -// LCDs and Controllers // -////////////////////////// +// +// LCD / Controller +// #if HAS_WIRED_LCD diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index 4e1fb487b5d3..b4eea9d4885c 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -118,6 +118,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 18 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 01fc6b416d16..5cf143a09cf6 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -166,6 +166,7 @@ // // LCD / Controller // + #if ANY(BOARD_REV_1_0, BOARD_REV_1_1_TO_1_3) #define LCD_PINS_RS 24 diff --git a/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/src/pins/ramps/pins_VORON.h index 4aee2ab1424a..ee3d7f0185bf 100644 --- a/Marlin/src/pins/ramps/pins_VORON.h +++ b/Marlin/src/pins/ramps/pins_VORON.h @@ -49,6 +49,6 @@ #include "pins_RAMPS.h" // -// LCDs and Controllers +// LCD / Controller // #undef BEEPER_PIN diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index beea40ab20f0..85420bdec3f2 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -329,9 +329,9 @@ #define EXP2_08_PIN 41 #endif -////////////////////////// -// LCDs and Controllers // -////////////////////////// +// +// LCD / Controller +// #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index 312745f11d10..ceaeb8a587b5 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -148,6 +148,7 @@ // // LCD / Controller // + #if IS_RRD_FG_SC #define LCD_PINS_RS 18 #define LCD_PINS_EN 15 diff --git a/Marlin/src/pins/sam/pins_ARCHIM1.h b/Marlin/src/pins/sam/pins_ARCHIM1.h index a6ac53e5ece1..e7530f981ba6 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM1.h +++ b/Marlin/src/pins/sam/pins_ARCHIM1.h @@ -180,6 +180,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN 23 // D24 PA15_CTS1 #define LCD_PINS_RS 17 // D17 PA12_RXD1 diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index 56202cc18868..31ed50194cc2 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -235,6 +235,7 @@ // // LCD / Controller // + #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 diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index bd6cb7a6cd79..66aa581271a2 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -111,6 +111,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define LCD_PINS_RS 42 diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 8ad5e2229cfd..b9f73adfe9c1 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -103,6 +103,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define LCD_PINS_RS 42 diff --git a/Marlin/src/pins/sam/pins_KRATOS32.h b/Marlin/src/pins/sam/pins_KRATOS32.h index 74da7a78f625..bebe2b82a35d 100644 --- a/Marlin/src/pins/sam/pins_KRATOS32.h +++ b/Marlin/src/pins/sam/pins_KRATOS32.h @@ -145,6 +145,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BTN_EN1 48 diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index 9a3edff0c989..4f713391fc96 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -224,6 +224,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if ENABLED(RADDS_DISPLAY) diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index b00d215cc7fb..6b7bf514669e 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -66,6 +66,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if ALL(IS_NEWPANEL, PANEL_ONE) diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 1ae96ebe6d86..2b9c8fd7eb79 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -166,6 +166,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h index 2a0733c601f8..90e9b9969790 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_SMART.h +++ b/Marlin/src/pins/sam/pins_RAMPS_SMART.h @@ -95,6 +95,7 @@ // // LCD / Controller // + #if ENABLED(AZSMZ_12864) // Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index b28971c19211..f083f01d4f12 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -216,6 +216,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC) diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 1b66b766db2c..fa27868ff940 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -206,6 +206,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC) diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index da3af2a0ab3e..39061efb2d6f 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -417,9 +417,9 @@ #endif -////////////////////////// -// LCDs and Controllers // -////////////////////////// +// +// LCD / Controller +// #ifdef LCD_PINS_DEFINED diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index df9fb0f86493..f441523322e3 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -59,6 +59,7 @@ // // LCD / Controller // + #if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN // ST9720 CS diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY_E2.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY_E2.h index b36c7140c45b..dd557265c464 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY_E2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY_E2.h @@ -56,6 +56,7 @@ // // LCD / Controller // + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #if ENABLED(CR10_STOCKDISPLAY) #if HAS_MEDIA diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 6b502ee5307e..bee2a30e44ab 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -159,6 +159,7 @@ // // LCD / Controller // + #ifdef LCD_PINS_DEFINED // LCD pins already defined by including header diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 7e24afde26e5..b6a3c4141fac 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -120,6 +120,7 @@ // // LCD / Controller // + #if ENABLED(CR10_STOCKDISPLAY) #define BTN_ENC PA15 #define BTN_EN1 PA9 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 fad09daf7964..d0bd2944bc03 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 @@ -142,6 +142,7 @@ // // LCD / Controller // + #if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index d5b52a35a8f4..e8f9cf023581 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -145,6 +145,7 @@ // // LCD / Controller // + #if ENABLED(CR10_STOCKDISPLAY) #define BEEPER_PIN EXP1_01_PIN #define BTN_EN1 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index e1c7175584e7..28537967381a 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -272,6 +272,7 @@ // // LCD / Controller // + #ifndef BEEPER_PIN #define BEEPER_PIN PC5 #endif diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index 69e11be20cf5..e31d11f40827 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -150,6 +150,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define SPI_DEVICE 2 // Maple diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index b97ccc8ec738..94c6dc2bfa6b 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -134,6 +134,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if IS_RRD_SC diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 4bb8c5dee627..5f66f9bc3bb9 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -134,6 +134,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if IS_RRD_SC diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 57abf7aca79e..9f7efa99c427 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -139,6 +139,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if IS_RRD_SC diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 34f7dba91f9c..3f6ae1414bc8 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -134,6 +134,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if IS_RRD_SC diff --git a/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h b/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h index 4ac0a24d1c4d..000548ee5351 100644 --- a/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h +++ b/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h @@ -180,6 +180,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_10_PIN #define BTN_ENC EXP1_09_PIN diff --git a/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h index 13e32145c62e..a376feb93a74 100644 --- a/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h +++ b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h @@ -251,6 +251,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN // NC #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index 4c65ce9f6456..33440e30dd1d 100644 --- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -168,6 +168,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BTN_ENC PA0 #define BTN_EN1 PC4 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index 06f697e27020..c1e5a46f70db 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -278,6 +278,7 @@ // // LCD / Controller // + #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index edfee05166c3..c2b2512f4ab8 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -133,6 +133,7 @@ // // LCD / Controller // + #if HAS_SPI_TFT || HAS_FSMC_TFT #define TFT_RESET_PIN PE6 #define TFT_CS_PIN PD7 diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 02ad9bb4ad76..502ec19bed03 100644 --- a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -125,6 +125,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC PB8 // Set as output on init diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h index 33b2219655ea..886dd092fb84 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h +++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h @@ -140,6 +140,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN 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 d7196b75fc34..2abbf3452bed 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -238,8 +238,9 @@ #define SDSS EXP2_04_PIN // -// LCDs and Controllers +// LCD / Controller // + #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN 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 5444842aa229..2830fc3b74dc 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -410,8 +410,9 @@ #define EXP2_07_PIN PB10 // -// LCDs and Controllers +// LCD / Controller // + #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #define TFT_CS_PIN EXP2_04_PIN 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 76596a6dde25..169cc9d8322a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -412,8 +412,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) 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 e80344c2e25a..0e1d2a32d8ac 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -432,8 +432,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) 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 a20002dfc520..41514181f5a9 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 @@ -437,8 +437,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 725d326ec2fe..d41a6eac754a 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -283,6 +283,7 @@ // // LCD / Controller // + #if IS_RRD_SC #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_RS EXP1_04_PIN diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 92a1545f8a28..8658191dbe22 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -238,6 +238,7 @@ // // LCD / Controller // + #if ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h index bfe4469084f0..4a1960367cff 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h @@ -278,6 +278,7 @@ // // LCD / Controller // + #if ENABLED(FYSETC_242_OLED_12864) #define BEEPER_PIN EXP2_08_PIN diff --git a/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h b/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h index f63f4adeec1e..98a54ffb0df5 100644 --- a/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h +++ b/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h @@ -480,8 +480,9 @@ #endif // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h b/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h index 4aced54b10db..248fc514ac40 100644 --- a/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h @@ -334,8 +334,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) 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 b4e9cabd905c..0b3673046797 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 @@ -285,6 +285,7 @@ // // LCD / Controller // + #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #define TFT_CS_PIN EXP1_07_PIN #define TFT_SCK_PIN EXP2_02_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 ecc5e60d3b35..5af3cf53dd49 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -291,6 +291,7 @@ // // LCD / Controller // + #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 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 7ec2f1263072..b20477a15db5 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -284,8 +284,9 @@ #endif // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index ca663039e887..4574df53ac11 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -170,6 +170,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index bf45f94ab80b..d9c542c6a281 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -181,6 +181,7 @@ // // LCD / Controller // + #if IS_RRD_FG_SC #define BEEPER_PIN PC7 // LCD_BEEPER #define BTN_ENC PE11 // BTN_ENC 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 912d69e62803..103a14891103 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -140,6 +140,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD #define BTN_EN1 PB7 #define BTN_EN2 PB5 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index 0131c50ebfbc..b7c5a8c470f8 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h @@ -208,8 +208,9 @@ #endif // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) 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 2a9157688f7c..8d75638ee578 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 @@ -236,8 +236,9 @@ #endif // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) 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 796527b364d5..327c5f1970ca 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -286,8 +286,9 @@ #endif // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h index d55e0a3f84f8..1840e441f8e6 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h @@ -454,8 +454,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h index bc6118228ff8..2c5c4bc05e8b 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h @@ -418,8 +418,9 @@ #endif // -// LCDs and Controllers +// LCD / Controller // + #if ENABLED(BTT_MINI_12864) // BTT Mini 12864 V2.0 connected via 18-pin FPC cable #define BEEPER_PIN EXP1_01_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 3ef00286670d..f51dbac93b14 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -410,7 +410,7 @@ #endif // -// LCDs and Controllers +// LCD / Controller // #if ENABLED(BTT_MINI_12864) // BTT Mini 12864 V2.0 connected via 18-pin FPC cable diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h index 820dc449c187..ba24722e15d4 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h @@ -423,8 +423,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) 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 fe0e1a02cef9..1d63f40e4cd6 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 @@ -431,8 +431,9 @@ #endif // BTT_MOTOR_EXPANSION // -// LCDs and Controllers +// LCD / Controller // + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index c1eee00c2dd3..ab4427a8892d 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -130,6 +130,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD && IS_NEWPANEL #define LCD_PINS_RS 9 // E1 JP11-11 diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index 9c8c6ce628b6..dac4c6c94006 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -167,6 +167,7 @@ // // LCD / Controller // + #if IS_ULTIPANEL #define LCD_PINS_RS 8 // E0 #define LCD_PINS_EN 9 // E1 diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index deeffe9038cf..a6a16f2be158 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -149,6 +149,7 @@ // // LCD / Controller // + #if HAS_WIRED_LCD && IS_NEWPANEL #define BEEPER_PIN -1 From 16acb57b22747b495953ecef065ba625f4dc3df8 Mon Sep 17 00:00:00 2001 From: Cesar Guillermo Montiel Date: Thu, 25 Jan 2024 20:12:49 -0300 Subject: [PATCH 158/236] =?UTF-8?q?=E2=9C=A8=20Creality=20v2.4.S4=5F170=20?= =?UTF-8?q?(Ender=202=20Pro,=20HC32F460KCTA)=20(#26730)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 2 + .../pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h | 222 ++++++++++++++++++ Marlin/src/pins/pins.h | 3 + ini/hc32.ini | 7 + 4 files changed, 234 insertions(+) create mode 100644 Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 91141b23f99f..0895bb46a08f 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -519,7 +519,9 @@ // // HC32 ARM Cortex-M4 // + #define BOARD_AQUILA_V101 7200 // Voxelab Aquila V1.0.0/V1.0.1/V1.0.2/V1.0.3 as found in the Voxelab Aquila X2 and C2 +#define BOARD_CREALITY_ENDER2P_V24S4 7201 // Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) // // Custom board diff --git a/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h b/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h new file mode 100644 index 000000000000..64b013d9993e --- /dev/null +++ b/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h @@ -0,0 +1,222 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// +// Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) +// Derived from https://github.com/Klipper3d/klipper/blob/master/config/printer-creality-ender2pro-hc32-2022.cfg +// +#include "env_validate.h" + +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 + #error "Creality v2.4.S4 only supports one hotend and E-stepper" +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Creality v2.4.S4" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "Ender 2 Pro" +#endif + +// +// Onboard crystal oscillator +// +#ifndef BOARD_XTAL_FREQUENCY + #define BOARD_XTAL_FREQUENCY 8000000 // 8 MHz XTAL +#endif + +// +// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role +// +//#define DISABLE_DEBUG +//#define DISABLE_JTAG + +// +// EEPROM +// +#if NO_EEPROM_SELECTED + #define IIC_BL24CXX_EEPROM + //#define SDCARD_EEPROM_EMULATION + #undef NO_EEPROM_SELECTED +#endif + +#if ENABLED(IIC_BL24CXX_EEPROM) + #define IIC_EEPROM_SDA PA12 + #define IIC_EEPROM_SCL PA11 + #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) +#elif ENABLED(SDCARD_EEPROM_EMULATION) + #define MARLIN_EEPROM_SIZE 0x800 // 2K +#endif + +// +// Servos +// +#ifndef SERVO0_PIN + #define SERVO0_PIN PB0 // BLTouch OUT * +#endif + +// +// Limit Switches +// +#define X_STOP_PIN PA5 +#define Y_STOP_PIN PA6 +#define Z_STOP_PIN PB0 // BLTOUCH * + +#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 PC15 // "Pulled-high" * +#endif + +// +// Steppers +// +#define X_ENABLE_PIN PC2 +#define X_STEP_PIN PC1 +#define X_DIR_PIN PC0 + +#define Y_ENABLE_PIN PH2 +#define Y_STEP_PIN PB9 +#define Y_DIR_PIN PB8 + +#define Z_ENABLE_PIN PB7 +#define Z_STEP_PIN PB6 +#define Z_DIR_PIN PB5 + +#define E0_ENABLE_PIN PB4 +#define E0_STEP_PIN PB3 +#define E0_DIR_PIN PA15 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC5 // HEATER1 ADC1_IN15 +#define TEMP_BED_PIN PC4 // HOT BED ADC1_IN14 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PA1 // HEATER1 +#define HEATER_BED_PIN PB10 // HOT BED + +#define FAN0_PIN PA0 // FAN0 + +// +// SD Card +// +#define SD_DETECT_PIN PA10 +#define ONBOARD_SPI_DEVICE 1 +#define ONBOARD_SD_CS_PIN PC3 // SDSS +#define ONBOARD_SDIO +#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer + +#ifndef LCD_SERIAL_PORT + #define LCD_SERIAL_PORT 1 +#endif + +// +// SDIO Pins +// +#define BOARD_SDIO_D0 PC8 +#define BOARD_SDIO_D1 PC9 +#define BOARD_SDIO_D2 PC10 +#define BOARD_SDIO_D3 PC11 +#define BOARD_SDIO_CLK PC12 +#define BOARD_SDIO_CMD PD2 +#define BOARD_SDIO_DET PA10 + +// +// USART Pins +// + +// Display +#define BOARD_USART1_TX_PIN PA2 // LCD +#define BOARD_USART1_RX_PIN PA3 + +// Host +#define BOARD_USART2_TX_PIN PA8 // USB +#define BOARD_USART2_RX_PIN PA7 + +// Onboard LED (HIGH = off, LOW = on) +#ifndef LED_BUILTIN + #define LED_BUILTIN PC3 +#endif + +#define BOARD_NO_NATIVE_USB + +// +// SPI3 Pins (LCD) +// +#define SPI_NSS PB15 // SPI3_NSS +#define SPI_SCK PB14 // SPI3_CLK +#define SPI_MISO PB13 // SPI3_MISO +#define SPI_MOSI PB12 // SPI3_MOSI + +// +// LCD / Controller +// + +/** ------ + * PC6 | 1 2 | PC7 + * PA2 | 3 4 | PC1 + * PB13 5 6 | PB14 + * PB15 | 7 8 | PB12 + * GND | 9 10 | 5V + * ------ + * EXP1 + */ +#define EXP1_01_PIN PC6 +#define EXP1_02_PIN PC7 +#define EXP1_03_PIN PA2 +#define EXP1_04_PIN PC1 +#define EXP1_05_PIN PB13 +#define EXP1_06_PIN PB14 +#define EXP1_07_PIN PB15 +#define EXP1_08_PIN PB12 + +#if ENABLED(CR10_STOCKDISPLAY) // LCD used for C2 + /** ------ + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | KILL + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V + * ------ + */ + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN + + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + + #define KILL_PIN EXP1_04_PIN +#endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 71d663d1eaf3..af32d8c11968 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -900,8 +900,11 @@ // // HC32 ARM Cortex-M4 // + #elif MB(AQUILA_V101) #include "hc32f4/pins_AQUILA_101.h" // HC32F460 env:HC32F460C_aquila_101 +#elif MB(CREALITY_ENDER2P_V24S4) + #include "hc32f4/pins_CREALITY_ENDER2P_V24S4.h" // HC32F460 env:HC32F460C_e2p24s4 // // Custom board (with custom PIO env) diff --git a/ini/hc32.ini b/ini/hc32.ini index d25ef4e7be07..9bf15447e2cd 100644 --- a/ini/hc32.ini +++ b/ini/hc32.ini @@ -85,3 +85,10 @@ board_build.ld_args.flash_size = 512K extends = HC32F460C_base board_build.ld_args.flash_start = 0xC000 # Bootloader start address, as logged by the bootloader on boot board_build.ld_args.boot_mode = secondary # Save ~1.4k of flash by compiling as secondary firmware + +# +# Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) (256K Flash, 192K RAM). +# +[env:HC32F460C_e2p24s4] +extends = HC32F460C_base +board_build.ld_args.flash_start = 0x8000 From 8594e9462ca429cbaccd2b3d0e2eb15684bd27ae Mon Sep 17 00:00:00 2001 From: ejhoness <72996067+ejhoness@users.noreply.github.com> Date: Thu, 25 Jan 2024 20:37:35 -0300 Subject: [PATCH 159/236] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20draw=5Fdialo?= =?UTF-8?q?g.cpp=20typo=20(#26684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 1f703f365291..32eb7e77d73b 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -396,7 +396,7 @@ void lv_draw_dialog(uint8_t type) { F(DIALOG_UPLOAD_FINISH_EN), '\n', F(DIALOG_UPLOAD_SIZE_EN), F(": "), int(upload_size / 1024), F(" KBytes\n"), F(DIALOG_UPLOAD_TIME_EN), F(": "), int(upload_time_sec), F(" s\n"), - F(DIALOG_UPLOAD_SPEED_EN), F(": "), int(upload_size / upload_time_sec / 1024), F(" KBytes/s\n"), + F(DIALOG_UPLOAD_SPEED_EN), F(": "), int(upload_size / upload_time_sec / 1024), F(" KBytes/s\n") ); lv_label_set_text(labelDialog, buf); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); From 9b3119393f0c7fe3eb08734e097df09c7466acc3 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Fri, 26 Jan 2024 12:39:09 +1300 Subject: [PATCH 160/236] =?UTF-8?q?=F0=9F=A9=B9=20Followup=20to=20EDITABLE?= =?UTF-8?q?=5FSTEPS=5FPER=5FUNIT=20(#26677)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26618 --- Marlin/src/module/settings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 34f840e8e3b4..3a66c12ccc8d 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1861,8 +1861,10 @@ void MarlinSettings::postprocess() { EEPROM_READ(planner.settings.min_segment_time_us); - float tmp2[NUM_AXES + e_factors]; - EEPROM_READ((uint8_t *)tmp2, sizeof(tmp2)); // axis_steps_per_mm + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + float tmp2[NUM_AXES + e_factors]; + EEPROM_READ((uint8_t *)tmp2, sizeof(tmp2)); // axis_steps_per_mm + #endif feedRate_t tmp3[NUM_AXES + e_factors]; EEPROM_READ((uint8_t *)tmp3, sizeof(tmp3)); // max_feedrate_mm_s From 4f65466161c39bee82a8fa98263989a01b706927 Mon Sep 17 00:00:00 2001 From: sargonphin <85966195+sargonphin@users.noreply.github.com> Date: Fri, 26 Jan 2024 00:48:06 +0100 Subject: [PATCH 161/236] =?UTF-8?q?=F0=9F=94=A7=20HYBRID=5FTHRESHOLD=20san?= =?UTF-8?q?ity=20checks=20(#26681)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 55 ++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index ccbf5c670590..27629c5a7da0 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3348,10 +3348,59 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #error "MARKFORGED requires both X and Y to use sensorless homing if either one does." #endif +// TMC Hybrid Threshold +#if ENABLED(HYBRID_THRESHOLD) + #if !STEALTHCHOP_ENABLED + #error "Enable STEALTHCHOP_(XY|Z|E) to use HYBRID_THRESHOLD." + #elif defined(X_HYBRID_THRESHOLD) && X_HYBRID_THRESHOLD == 0 + #error "X_HYBRID_THRESHOLD must be greater than 0." + #elif defined(X2_HYBRID_THRESHOLD) && X2_HYBRID_THRESHOLD == 0 + #error "X2_HYBRID_THRESHOLD must be greater than 0." + #elif defined(Y_HYBRID_THRESHOLD) && Y_HYBRID_THRESHOLD == 0 + #error "Y_HYBRID_THRESHOLD must be greater than 0." + #elif defined(Y2_HYBRID_THRESHOLD) && Y2_HYBRID_THRESHOLD == 0 + #error "Y2_HYBRID_THRESHOLD must be greater than 0." + #elif defined(Z_HYBRID_THRESHOLD) && Z_HYBRID_THRESHOLD == 0 + #error "Z_HYBRID_THRESHOLD must be greater than 0." + #elif defined(Z2_HYBRID_THRESHOLD) && Z2_HYBRID_THRESHOLD == 0 + #error "Z2_HYBRID_THRESHOLD must be greater than 0." + #elif defined(Z3_HYBRID_THRESHOLD) && Z3_HYBRID_THRESHOLD == 0 + #error "Z3_HYBRID_THRESHOLD must be greater than 0." + #elif defined(Z4_HYBRID_THRESHOLD) && Z4_HYBRID_THRESHOLD == 0 + #error "Z4_HYBRID_THRESHOLD must be greater than 0." + #elif defined(I_HYBRID_THRESHOLD) && I_HYBRID_THRESHOLD == 0 + #error "I_HYBRID_THRESHOLD must be greater than 0." + #elif defined(J_HYBRID_THRESHOLD) && J_HYBRID_THRESHOLD == 0 + #error "J_HYBRID_THRESHOLD must be greater than 0." + #elif defined(K_HYBRID_THRESHOLD) && K_HYBRID_THRESHOLD == 0 + #error "K_HYBRID_THRESHOLD must be greater than 0." + #elif defined(U_HYBRID_THRESHOLD) && U_HYBRID_THRESHOLD == 0 + #error "U_HYBRID_THRESHOLD must be greater than 0." + #elif defined(V_HYBRID_THRESHOLD) && V_HYBRID_THRESHOLD == 0 + #error "V_HYBRID_THRESHOLD must be greater than 0." + #elif defined(W_HYBRID_THRESHOLD) && W_HYBRID_THRESHOLD == 0 + #error "W_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E0_HYBRID_THRESHOLD) && E0_HYBRID_THRESHOLD == 0 + #error "E0_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E1_HYBRID_THRESHOLD) && E1_HYBRID_THRESHOLD == 0 + #error "E1_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E2_HYBRID_THRESHOLD) && E2_HYBRID_THRESHOLD == 0 + #error "E2_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E3_HYBRID_THRESHOLD) && E3_HYBRID_THRESHOLD == 0 + #error "E3_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E4_HYBRID_THRESHOLD) && E4_HYBRID_THRESHOLD == 0 + #error "E4_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E5_HYBRID_THRESHOLD) && E5_HYBRID_THRESHOLD == 0 + #error "E5_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E6_HYBRID_THRESHOLD) && E6_HYBRID_THRESHOLD == 0 + #error "E6_HYBRID_THRESHOLD must be greater than 0." + #elif defined(E7_HYBRID_THRESHOLD) && E7_HYBRID_THRESHOLD == 0 + #error "E7_HYBRID_THRESHOLD must be greater than 0." + #endif +#endif // HYBRID_THRESHOLD + // Other TMC feature requirements -#if ENABLED(HYBRID_THRESHOLD) && !STEALTHCHOP_ENABLED - #error "Enable STEALTHCHOP_(XY|Z|E) to use HYBRID_THRESHOLD." -#elif ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD +#if ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD #error "SENSORLESS_HOMING requires TMC2130, TMC2160, TMC2209, TMC2660, or TMC5160 stepper drivers." #elif ENABLED(SENSORLESS_PROBING) && !HAS_STALLGUARD #error "SENSORLESS_PROBING requires TMC2130, TMC2160, TMC2209, TMC2660, or TMC5160 stepper drivers." From 6c1fd1f69c349b24ded49d7c5a1118fe7a5e37dd Mon Sep 17 00:00:00 2001 From: qwertymodo Date: Thu, 25 Jan 2024 16:16:32 -0800 Subject: [PATCH 162/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20single=20Neo=20str?= =?UTF-8?q?ip=20M150=20K=20(#26709)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/feature/leds/M150.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/feature/leds/M150.cpp b/Marlin/src/gcode/feature/leds/M150.cpp index 43062c3f752a..dd5752ee4ceb 100644 --- a/Marlin/src/gcode/feature/leds/M150.cpp +++ b/Marlin/src/gcode/feature/leds/M150.cpp @@ -60,6 +60,7 @@ void GcodeSuite::M150() { #if ENABLED(NEOPIXEL_LED) const pixel_index_t index = parser.intval('I', -1); + const bool seenK = parser.seen_test('K'); #if ENABLED(NEOPIXEL2_SEPARATE) #ifndef NEOPIXEL_M150_DEFAULT #define NEOPIXEL_M150_DEFAULT -1 @@ -69,12 +70,13 @@ void GcodeSuite::M150() { int8_t brightness = neo.brightness(), unit = parser.intval('S', NEOPIXEL_M150_DEFAULT); switch (unit) { case -1: neo2.neoindex = index; // fall-thru - case 0: neo.neoindex = index; old_color = parser.seen('K') ? neo.pixel_color(index >= 0 ? index : 0) : 0; break; - case 1: neo2.neoindex = index; brightness = neo2.brightness(); old_color = parser.seen('K') ? neo2.pixel_color(index >= 0 ? index : 0) : 0; break; + case 0: neo.neoindex = index; old_color = seenK ? neo.pixel_color(_MAX(index, 0)) : 0; break; + case 1: neo2.neoindex = index; brightness = neo2.brightness(); old_color = seenK ? neo2.pixel_color(_MAX(index, 0)) : 0; break; } #else const uint8_t brightness = neo.brightness(); neo.neoindex = index; + old_color = seenK ? neo.pixel_color(_MAX(index, 0)) : 0; #endif #endif From 01094ea6aa7b843f830ec350e5886fcab6b652ff Mon Sep 17 00:00:00 2001 From: Miguel Risco-Castillo Date: Thu, 25 Jan 2024 19:18:49 -0500 Subject: [PATCH 163/236] =?UTF-8?q?=E2=9C=A8=F0=9F=94=A8=20EEPROM=20exclus?= =?UTF-8?q?ion=20zone=20(#26729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/AVR/eeprom.cpp | 6 ++-- Marlin/src/HAL/DUE/eeprom_flash.cpp | 6 ++-- Marlin/src/HAL/DUE/eeprom_wired.cpp | 6 ++-- Marlin/src/HAL/ESP32/eeprom.cpp | 10 ++++-- Marlin/src/HAL/HC32/eeprom_bl24cxx.cpp | 16 +++------ Marlin/src/HAL/HC32/eeprom_sdcard.cpp | 7 ++-- Marlin/src/HAL/HC32/eeprom_wired.cpp | 10 +++--- Marlin/src/HAL/LINUX/eeprom.cpp | 2 +- Marlin/src/HAL/LPC1768/eeprom_flash.cpp | 8 +++-- Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp | 2 +- Marlin/src/HAL/LPC1768/eeprom_wired.cpp | 6 ++-- Marlin/src/HAL/SAMD21/eeprom_flash.cpp | 38 ++++++++++++--------- Marlin/src/HAL/SAMD21/eeprom_qspi.cpp | 6 ++-- Marlin/src/HAL/SAMD21/eeprom_wired.cpp | 6 ++-- Marlin/src/HAL/SAMD51/eeprom_qspi.cpp | 6 ++-- Marlin/src/HAL/SAMD51/eeprom_wired.cpp | 6 ++-- Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp | 7 ++-- Marlin/src/HAL/STM32/eeprom_flash.cpp | 14 ++++---- Marlin/src/HAL/STM32/eeprom_sdcard.cpp | 2 +- Marlin/src/HAL/STM32/eeprom_sram.cpp | 2 +- Marlin/src/HAL/STM32/eeprom_wired.cpp | 6 ++-- Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp | 7 ++-- Marlin/src/HAL/STM32F1/eeprom_flash.cpp | 2 +- Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp | 2 +- Marlin/src/HAL/STM32F1/eeprom_wired.cpp | 6 ++-- Marlin/src/HAL/TEENSY31_32/eeprom.cpp | 6 ++-- Marlin/src/HAL/TEENSY35_36/eeprom.cpp | 6 ++-- Marlin/src/HAL/TEENSY40_41/eeprom.cpp | 6 ++-- Marlin/src/HAL/shared/eeprom_api.h | 13 +++++++ Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 3 +- Marlin/src/module/settings.cpp | 3 +- 31 files changed, 120 insertions(+), 106 deletions(-) diff --git a/Marlin/src/HAL/AVR/eeprom.cpp b/Marlin/src/HAL/AVR/eeprom.cpp index 6465e4702544..45c7abd1db2c 100644 --- a/Marlin/src/HAL/AVR/eeprom.cpp +++ b/Marlin/src/HAL/AVR/eeprom.cpp @@ -35,14 +35,14 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(E2END + 1) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); @@ -61,7 +61,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/DUE/eeprom_flash.cpp b/Marlin/src/HAL/DUE/eeprom_flash.cpp index a0ed6cc84347..a5c7ab836dbf 100644 --- a/Marlin/src/HAL/DUE/eeprom_flash.cpp +++ b/Marlin/src/HAL/DUE/eeprom_flash.cpp @@ -958,14 +958,14 @@ static void ee_Init() { #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { ee_Init(); return true; } bool PersistentStore::access_finish() { ee_Flush(); return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! ee_Write(uint32_t(p), v); @@ -984,7 +984,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = ee_Read(uint32_t(pos)); + uint8_t c = ee_Read(uint32_t(REAL_EEPROM_ADDR(pos))); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/DUE/eeprom_wired.cpp b/Marlin/src/HAL/DUE/eeprom_wired.cpp index 24f8c06d2e1b..84338ccb4bf5 100644 --- a/Marlin/src/HAL/DUE/eeprom_wired.cpp +++ b/Marlin/src/HAL/DUE/eeprom_wired.cpp @@ -36,14 +36,14 @@ #ifndef MARLIN_EEPROM_SIZE #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); @@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/ESP32/eeprom.cpp b/Marlin/src/HAL/ESP32/eeprom.cpp index cb5f881284ec..ca4a80636141 100644 --- a/Marlin/src/HAL/ESP32/eeprom.cpp +++ b/Marlin/src/HAL/ESP32/eeprom.cpp @@ -31,24 +31,28 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { return EEPROM.begin(MARLIN_EEPROM_SIZE); } bool PersistentStore::access_finish() { EEPROM.end(); return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { for (size_t i = 0; i < size; i++) { - EEPROM.write(pos++, value[i]); + const int p = REAL_EEPROM_ADDR(pos); + EEPROM.write(p, value[i]); crc16(crc, &value[i], 1); + ++pos; } return false; } bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { for (size_t i = 0; i < size; i++) { - uint8_t c = EEPROM.read(pos++); + const int p = REAL_EEPROM_ADDR(pos); + uint8_t c = EEPROM.read(p); if (writing) value[i] = c; crc16(crc, &c, 1); + ++pos; } return false; } diff --git a/Marlin/src/HAL/HC32/eeprom_bl24cxx.cpp b/Marlin/src/HAL/HC32/eeprom_bl24cxx.cpp index fe4a91384a28..59da99b3f56d 100644 --- a/Marlin/src/HAL/HC32/eeprom_bl24cxx.cpp +++ b/Marlin/src/HAL/HC32/eeprom_bl24cxx.cpp @@ -37,7 +37,7 @@ #error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); @@ -49,7 +49,7 @@ bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { while (size--) { uint8_t v = *value; - uint8_t *const p = (uint8_t *const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); // EEPROM has only ~100,000 write cycles, // so only write bytes that have changed! @@ -70,16 +70,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui return false; } -bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, - uint16_t *crc, const bool writing /*=true*/) { +bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) { do { - uint8_t *const p = (uint8_t *const)pos; - uint8_t c = eeprom_read_byte(p); - if (writing) - { - *value = c; - } - + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); + if (writing) *value = c; crc16(crc, &c, 1); pos++; value++; diff --git a/Marlin/src/HAL/HC32/eeprom_sdcard.cpp b/Marlin/src/HAL/HC32/eeprom_sdcard.cpp index ec77c441a0b2..601e86dd3054 100644 --- a/Marlin/src/HAL/HC32/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/HC32/eeprom_sdcard.cpp @@ -38,9 +38,7 @@ #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -size_t PersistentStore::capacity() { - return MARLIN_EEPROM_SIZE; -} +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } #define _ALIGN(x) __attribute__((aligned(x))) static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE]; @@ -85,11 +83,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing /*=true*/) { for (size_t i = 0; i < size; i++) { - uint8_t c = HAL_eeprom_data[pos + i]; + const uint8_t c = HAL_eeprom_data[pos + i]; if (writing) value[i] = c; crc16(crc, &c, 1); } - pos += size; return false; } diff --git a/Marlin/src/HAL/HC32/eeprom_wired.cpp b/Marlin/src/HAL/HC32/eeprom_wired.cpp index 42c25635884d..d9be65b4c07c 100644 --- a/Marlin/src/HAL/HC32/eeprom_wired.cpp +++ b/Marlin/src/HAL/HC32/eeprom_wired.cpp @@ -35,7 +35,7 @@ #ifndef MARLIN_EEPROM_SIZE #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_finish() { return true; } @@ -56,7 +56,7 @@ bool PersistentStore::access_start() { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { while (size--) { - uint8_t *const p = (uint8_t *const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; // EEPROM has only ~100,000 write cycles, // so only write bytes that have changed! @@ -77,10 +77,8 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t *)pos); - if (writing && value) { - *value = c; - } + const uint8_t c = eeprom_read_byte((uint8_t *)REAL_EEPROM_ADDR(pos)); + if (writing && value) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/LINUX/eeprom.cpp b/Marlin/src/HAL/LINUX/eeprom.cpp index f878bba6a51b..2b9b37e66d2c 100644 --- a/Marlin/src/HAL/LINUX/eeprom.cpp +++ b/Marlin/src/HAL/LINUX/eeprom.cpp @@ -35,7 +35,7 @@ uint8_t buffer[MARLIN_EEPROM_SIZE]; char filename[] = "eeprom.dat"; -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { const char eeprom_erase_value = 0xFF; diff --git a/Marlin/src/HAL/LPC1768/eeprom_flash.cpp b/Marlin/src/HAL/LPC1768/eeprom_flash.cpp index 38d2705d519a..9f873d5774a3 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_flash.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_flash.cpp @@ -61,7 +61,7 @@ static uint8_t ram_eeprom[MARLIN_EEPROM_SIZE] __attribute__((aligned(4))) = {0}; static bool eeprom_dirty = false; static int current_slot = 0; -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { uint32_t first_nblank_loc, first_nblank_val; @@ -112,7 +112,8 @@ bool PersistentStore::access_finish() { } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { - for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i]; + const int p = REAL_EEPROM_ADDR(pos); + for (size_t i = 0; i < size; i++) ram_eeprom[p + i] = value[i]; eeprom_dirty = true; crc16(crc, value, size); pos += size; @@ -120,8 +121,9 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui } bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { + const int p = REAL_EEPROM_ADDR(pos); const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos]; - if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[pos + i]; + if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[p + i]; crc16(crc, buff, size); pos += size; return false; // return true for any error diff --git a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp index 4f1797dc6a7d..30ecb01a0915 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp @@ -49,7 +49,7 @@ bool eeprom_file_open = false; #define MARLIN_EEPROM_SIZE size_t(0x1000) // 4KiB of Emulated EEPROM #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { const char eeprom_erase_value = 0xFF; diff --git a/Marlin/src/HAL/LPC1768/eeprom_wired.cpp b/Marlin/src/HAL/LPC1768/eeprom_wired.cpp index 1bbc39d4a242..3230e29afcd1 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_wired.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_wired.cpp @@ -36,7 +36,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x8000 // 32K #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } @@ -45,7 +45,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint16_t written = 0; while (size--) { uint8_t v = *value; - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes @@ -64,7 +64,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { // Read from external EEPROM - const uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/SAMD21/eeprom_flash.cpp b/Marlin/src/HAL/SAMD21/eeprom_flash.cpp index 4a4e328d1a00..66329bff19c8 100644 --- a/Marlin/src/HAL/SAMD21/eeprom_flash.cpp +++ b/Marlin/src/HAL/SAMD21/eeprom_flash.cpp @@ -37,19 +37,24 @@ static const uint8_t flashdata[TOTAL_FLASH_SIZE] __attribute__((__aligned__(256 #include "../shared/eeprom_api.h" -size_t PersistentStore::capacity() { - return MARLIN_EEPROM_SIZE; - /* const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ, +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } + +/* +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } + const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ, sblk = NVMCTRL->SEESTAT.bit.SBLK; - return (!psz && !sblk) ? 0 - : (psz <= 2) ? (0x200 << psz) - : (sblk == 1 || psz == 3) ? 4096 - : (sblk == 2 || psz == 4) ? 8192 - : (sblk <= 4 || psz == 5) ? 16384 - : (sblk >= 9 && psz == 7) ? 65536 - : 32768;*/ + return ( + (!psz && !sblk) ? 0 + : (psz <= 2) ? (0x200 << psz) + : (sblk == 1 || psz == 3) ? 4096 + : (sblk == 2 || psz == 4) ? 8192 + : (sblk <= 4 || psz == 5) ? 16384 + : (sblk >= 9 && psz == 7) ? 65536 + : 32768 + ) - eeprom_exclude_size; } +*/ uint32_t PAGE_SIZE; uint32_t ROW_SIZE; @@ -99,8 +104,7 @@ bool PersistentStore::access_finish() { volatile uint32_t *dst_addr = (volatile uint32_t *) &flashdata; uint32_t *pointer = (uint32_t *) buffer; - for (uint32_t i = 0; i < TOTAL_FLASH_SIZE; i+=4) { - + for (uint32_t i = 0; i < TOTAL_FLASH_SIZE; i += 4) { *dst_addr = (uint32_t) *pointer; pointer++; dst_addr ++; @@ -120,19 +124,19 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui if (!hasWritten) { // init temp buffer buffer = (uint8_t *) malloc(MARLIN_EEPROM_SIZE); - hasWritten=true; + hasWritten = true; } - memcpy(buffer+pos,value,size); + memcpy(buffer + REAL_EEPROM_ADDR(pos), value, size); pos += size; return false; } bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { - volatile uint8_t *dst_addr = (volatile uint8_t *) &flashdata; - dst_addr += pos; + volatile uint8_t *dst_addr = (volatile uint8_t *) &flashdata; + dst_addr += REAL_EEPROM_ADDR(pos); - memcpy(value,(const void *) dst_addr,size); + memcpy(value, (const void *)dst_addr, size); pos += size; return false; } diff --git a/Marlin/src/HAL/SAMD21/eeprom_qspi.cpp b/Marlin/src/HAL/SAMD21/eeprom_qspi.cpp index 587dcb0b1416..12977a178c57 100644 --- a/Marlin/src/HAL/SAMD21/eeprom_qspi.cpp +++ b/Marlin/src/HAL/SAMD21/eeprom_qspi.cpp @@ -38,7 +38,7 @@ static bool initialized; -size_t PersistentStore::capacity() { return qspi.size(); } +size_t PersistentStore::capacity() { return qspi.size() - eeprom_exclude_size; } bool PersistentStore::access_start() { if (!initialized) { @@ -56,7 +56,7 @@ bool PersistentStore::access_finish() { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { while (size--) { const uint8_t v = *value; - qspi.writeByte(pos, v); + qspi.writeByte(REAL_EEPROM_ADDR(pos), v); crc16(crc, &v, 1); pos++; value++; @@ -66,7 +66,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { while (size--) { - uint8_t c = qspi.readByte(pos); + const uint8_t c = qspi.readByte(REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/SAMD21/eeprom_wired.cpp b/Marlin/src/HAL/SAMD21/eeprom_wired.cpp index ab71e616fc7b..da0eb1b0c81b 100644 --- a/Marlin/src/HAL/SAMD21/eeprom_wired.cpp +++ b/Marlin/src/HAL/SAMD21/eeprom_wired.cpp @@ -42,7 +42,7 @@ #ifndef MARLIN_EEPROM_SIZE #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } @@ -51,7 +51,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint16_t written = 0; while (size--) { const uint8_t v = *value; - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes @@ -69,7 +69,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { while (size--) { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/SAMD51/eeprom_qspi.cpp b/Marlin/src/HAL/SAMD51/eeprom_qspi.cpp index 1c82ede04032..a39e4c4fa31f 100644 --- a/Marlin/src/HAL/SAMD51/eeprom_qspi.cpp +++ b/Marlin/src/HAL/SAMD51/eeprom_qspi.cpp @@ -35,7 +35,7 @@ static bool initialized; -size_t PersistentStore::capacity() { return qspi.size(); } +size_t PersistentStore::capacity() { return qspi.size() - eeprom_exclude_size; } bool PersistentStore::access_start() { if (!initialized) { @@ -53,7 +53,7 @@ bool PersistentStore::access_finish() { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { while (size--) { const uint8_t v = *value; - qspi.writeByte(pos, v); + qspi.writeByte(REAL_EEPROM_ADDR(pos), v); crc16(crc, &v, 1); pos++; value++; @@ -63,7 +63,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { while (size--) { - uint8_t c = qspi.readByte(pos); + const uint8_t c = qspi.readByte(REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/SAMD51/eeprom_wired.cpp b/Marlin/src/HAL/SAMD51/eeprom_wired.cpp index 7a03d4eaa34c..00a739a5872b 100644 --- a/Marlin/src/HAL/SAMD51/eeprom_wired.cpp +++ b/Marlin/src/HAL/SAMD51/eeprom_wired.cpp @@ -40,7 +40,7 @@ #ifndef MARLIN_EEPROM_SIZE #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } @@ -49,7 +49,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint16_t written = 0; while (size--) { const uint8_t v = *value; - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes @@ -67,7 +67,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { while (size--) { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp b/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp index f30b3dedb203..3e0bb58dad14 100644 --- a/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp +++ b/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp @@ -44,7 +44,7 @@ #error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } @@ -53,7 +53,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint16_t written = 0; while (size--) { uint8_t v = *value; - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes @@ -71,8 +71,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t * const p = (uint8_t * const)pos; - uint8_t c = eeprom_read_byte(p); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index 69511c6de40c..37963ad50154 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -101,7 +101,7 @@ static bool eeprom_data_written = false; #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(E2END + 1) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { @@ -245,14 +245,15 @@ bool PersistentStore::access_finish() { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { while (size--) { uint8_t v = *value; + const int p = REAL_EEPROM_ADDR(pos); #if ENABLED(FLASH_EEPROM_LEVELING) - if (v != ram_eeprom[pos]) { - ram_eeprom[pos] = v; + if (v != ram_eeprom[p]) { + ram_eeprom[p] = v; eeprom_data_written = true; } #else - if (v != eeprom_buffered_read_byte(pos)) { - eeprom_buffered_write_byte(pos, v); + if (v != eeprom_buffered_read_byte(p)) { + eeprom_buffered_write_byte(p, v); eeprom_data_written = true; } #endif @@ -265,7 +266,8 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - const uint8_t c = TERN(FLASH_EEPROM_LEVELING, ram_eeprom[pos], eeprom_buffered_read_byte(pos)); + const int p = REAL_EEPROM_ADDR(pos); + const uint8_t c = TERN(FLASH_EEPROM_LEVELING, ram_eeprom[p], eeprom_buffered_read_byte(p)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp index 1b5c0ae5b2c0..071d0bac0008 100644 --- a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp @@ -40,7 +40,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } #define _ALIGN(x) __attribute__ ((aligned(x))) static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE]; diff --git a/Marlin/src/HAL/STM32/eeprom_sram.cpp b/Marlin/src/HAL/STM32/eeprom_sram.cpp index 9bd84ff4fe27..58a67f1759ab 100644 --- a/Marlin/src/HAL/STM32/eeprom_sram.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sram.cpp @@ -33,7 +33,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } diff --git a/Marlin/src/HAL/STM32/eeprom_wired.cpp b/Marlin/src/HAL/STM32/eeprom_wired.cpp index 6fb9d9b51b7b..5440030bd4c4 100644 --- a/Marlin/src/HAL/STM32/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32/eeprom_wired.cpp @@ -38,7 +38,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(E2END + 1) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } @@ -47,7 +47,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint16_t written = 0; while (size--) { uint8_t v = *value; - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes @@ -66,7 +66,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { // Read from either external EEPROM, program flash or Backup SRAM - const uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp b/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp index 4e25bc69da4e..1252e77b0b3a 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp @@ -41,7 +41,7 @@ #error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } @@ -50,7 +50,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint16_t written = 0; while (size--) { uint8_t v = *value; - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes @@ -68,8 +68,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t * const p = (uint8_t * const)pos; - uint8_t c = eeprom_read_byte(p); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/STM32F1/eeprom_flash.cpp b/Marlin/src/HAL/STM32F1/eeprom_flash.cpp index 48fb2d286cc6..afdfefd5f076 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_flash.cpp @@ -41,7 +41,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE ((EEPROM_PAGE_SIZE) * 2) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } static uint8_t ram_eeprom[MARLIN_EEPROM_SIZE] __attribute__((aligned(4))) = {0}; static bool eeprom_dirty = false; diff --git a/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp b/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp index 9cfa97c1ab6e..6b7219342219 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp @@ -39,7 +39,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } #define _ALIGN(x) __attribute__ ((aligned(x))) // SDIO uint32_t* compat. static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE]; diff --git a/Marlin/src/HAL/STM32F1/eeprom_wired.cpp b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp index bc48eef34fa3..bfb771809443 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp @@ -36,7 +36,7 @@ #ifndef MARLIN_EEPROM_SIZE #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_finish() { return true; } @@ -57,7 +57,7 @@ bool PersistentStore::access_start() { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); @@ -76,7 +76,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing && value) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/TEENSY31_32/eeprom.cpp b/Marlin/src/HAL/TEENSY31_32/eeprom.cpp index d1ff9408229f..a7e5e590a36a 100644 --- a/Marlin/src/HAL/TEENSY31_32/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY31_32/eeprom.cpp @@ -36,7 +36,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(E2END + 1) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } @@ -44,7 +44,7 @@ bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); @@ -63,7 +63,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/TEENSY35_36/eeprom.cpp b/Marlin/src/HAL/TEENSY35_36/eeprom.cpp index a2afa4534345..977cd70ee853 100644 --- a/Marlin/src/HAL/TEENSY35_36/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY35_36/eeprom.cpp @@ -35,7 +35,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(E2END + 1) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } @@ -43,7 +43,7 @@ bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); @@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/TEENSY40_41/eeprom.cpp b/Marlin/src/HAL/TEENSY40_41/eeprom.cpp index 87f7dd3cfce5..357fed47b085 100644 --- a/Marlin/src/HAL/TEENSY40_41/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY40_41/eeprom.cpp @@ -35,7 +35,7 @@ #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(E2END + 1) #endif -size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; } bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } @@ -43,7 +43,7 @@ bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { uint16_t written = 0; while (size--) { - uint8_t * const p = (uint8_t * const)pos; + uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos); uint8_t v = *value; if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); @@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { do { - uint8_t c = eeprom_read_byte((uint8_t*)pos); + const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos)); if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/shared/eeprom_api.h b/Marlin/src/HAL/shared/eeprom_api.h index 7be1e72f7ab5..763271b42d84 100644 --- a/Marlin/src/HAL/shared/eeprom_api.h +++ b/Marlin/src/HAL/shared/eeprom_api.h @@ -26,6 +26,19 @@ #include "../../libs/crc16.h" +// For testing. Define with -DEEPROM_EXCL_ZONE=919,926 in INI files. +//#define EEPROM_EXCL_ZONE 919,926 // Test a range +//#define EEPROM_EXCL_ZONE 333 // Test a single byte + +#ifdef EEPROM_EXCL_ZONE + static constexpr int eeprom_exclude_zone[] = { EEPROM_EXCL_ZONE }, + eeprom_exclude_size = eeprom_exclude_zone[COUNT(eeprom_exclude_zone) - 1] - eeprom_exclude_zone[0] + 1; + #define REAL_EEPROM_ADDR(A) (A < eeprom_exclude_zone[0] ? (A) : (A) + eeprom_exclude_size) +#else + #define REAL_EEPROM_ADDR(A) (A) + static constexpr int eeprom_exclude_size = 0; +#endif + class PersistentStore { public: diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 560ff71e8493..6fccde8e89e8 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1817,7 +1817,8 @@ void unified_bed_leveling::smart_fill_mesh() { print_hex_word(i); SERIAL_ECHOPGM(": "); for (uint16_t j = 0; j < 16; j++) { - persistentStore.read_data(i + j, &cccc, sizeof(uint8_t)); + int pos = i + j; + persistentStore.read_data(pos, &cccc, sizeof(uint8_t)); print_hex_byte(cccc); SERIAL_CHAR(' '); } diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 3a66c12ccc8d..2dc48ebbf0ad 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -729,7 +729,8 @@ void MarlinSettings::postprocess() { bool MarlinSettings::sd_update_status() { uint8_t val; - persistentStore.read_data(SD_FIRMWARE_UPDATE_EEPROM_ADDR, &val); + int pos = SD_FIRMWARE_UPDATE_EEPROM_ADDR; + persistentStore.read_data(pos, &val); return (val == SD_FIRMWARE_UPDATE_ACTIVE_VALUE); } From ee8630c28270bf3281f798660d43c6e88d2b8eb4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 26 Jan 2024 00:42:39 +0000 Subject: [PATCH 164/236] [cron] Bump distribution date (2024-01-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 2a3912a4cb28..e16cd784ae2d 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 "2024-01-25" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 6b1ffe11a7b4..62f8027db6ad 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 "2024-01-25" + #define STRING_DISTRIBUTION_DATE "2024-01-26" #endif /** From 5768b42c398c232a3f891093e87d18de0331f2f1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 25 Jan 2024 22:06:09 -0600 Subject: [PATCH 165/236] Add Conditionals_type.h --- Marlin/src/HAL/AVR/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/DUE/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/ESP32/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/HC32/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/LINUX/inc/Conditionals_type.h | 22 +++++++++++++ .../src/HAL/LPC1768/inc/Conditionals_type.h | 22 +++++++++++++ .../HAL/NATIVE_SIM/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/SAMD21/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/SAMD51/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/HAL/STM32/inc/Conditionals_type.h | 22 +++++++++++++ .../src/HAL/STM32F1/inc/Conditionals_type.h | 22 +++++++++++++ .../HAL/TEENSY31_32/inc/Conditionals_type.h | 22 +++++++++++++ .../HAL/TEENSY35_36/inc/Conditionals_type.h | 22 +++++++++++++ .../HAL/TEENSY40_41/inc/Conditionals_type.h | 22 +++++++++++++ Marlin/src/inc/Conditionals_type.h | 32 +++++++++++++++++++ Marlin/src/inc/MarlinConfig.h | 3 ++ 16 files changed, 343 insertions(+) create mode 100644 Marlin/src/HAL/AVR/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/DUE/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/ESP32/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/HC32/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/LINUX/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/LPC1768/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/SAMD21/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/SAMD51/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/STM32/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/STM32F1/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/TEENSY31_32/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/TEENSY35_36/inc/Conditionals_type.h create mode 100644 Marlin/src/HAL/TEENSY40_41/inc/Conditionals_type.h create mode 100644 Marlin/src/inc/Conditionals_type.h diff --git a/Marlin/src/HAL/AVR/inc/Conditionals_type.h b/Marlin/src/HAL/AVR/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/AVR/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/DUE/inc/Conditionals_type.h b/Marlin/src/HAL/DUE/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/DUE/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/ESP32/inc/Conditionals_type.h b/Marlin/src/HAL/ESP32/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/ESP32/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/HC32/inc/Conditionals_type.h b/Marlin/src/HAL/HC32/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/HC32/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/LINUX/inc/Conditionals_type.h b/Marlin/src/HAL/LINUX/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/LINUX/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_type.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_type.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/SAMD21/inc/Conditionals_type.h b/Marlin/src/HAL/SAMD21/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/SAMD21/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/SAMD51/inc/Conditionals_type.h b/Marlin/src/HAL/SAMD51/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/SAMD51/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_type.h b/Marlin/src/HAL/STM32/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/STM32/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/STM32F1/inc/Conditionals_type.h b/Marlin/src/HAL/STM32F1/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/STM32F1/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_type.h b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_type.h b/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_type.h b/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_type.h new file mode 100644 index 000000000000..82f95a10357f --- /dev/null +++ b/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/Marlin/src/inc/Conditionals_type.h b/Marlin/src/inc/Conditionals_type.h new file mode 100644 index 000000000000..1f9cfcae16fb --- /dev/null +++ b/Marlin/src/inc/Conditionals_type.h @@ -0,0 +1,32 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * Conditionals_type.h + * Internal defines that depend on Configurations and Pins but are not user-editable. + * Define conditionals in this file if they depend on core/types.h. + */ + +#ifdef GITHUB_ACTIONS + // Extras for CI testing +#endif diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h index 8f6519dbafd4..4058761b9f7c 100644 --- a/Marlin/src/inc/MarlinConfig.h +++ b/Marlin/src/inc/MarlinConfig.h @@ -48,6 +48,9 @@ #include "../core/types.h" // Ahead of sanity-checks + #include "Conditionals_type.h" + #include HAL_PATH(.., inc/Conditionals_type.h) + #include "Changes.h" #include "SanityCheck.h" #include HAL_PATH(.., inc/SanityCheck.h) From afc2dd6cab2c50ddca1506350a8845b82a4ffce7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 25 Jan 2024 22:09:06 -0600 Subject: [PATCH 166/236] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20cleanup=2025-01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/HC32/inc/SanityCheck.h | 6 ++---- Marlin/src/HAL/HC32/printf_retarget.cpp | 2 +- Marlin/src/module/scara.cpp | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Marlin/src/HAL/HC32/inc/SanityCheck.h b/Marlin/src/HAL/HC32/inc/SanityCheck.h index d7c6894039cb..ef8d9a997583 100644 --- a/Marlin/src/HAL/HC32/inc/SanityCheck.h +++ b/Marlin/src/HAL/HC32/inc/SanityCheck.h @@ -58,11 +58,9 @@ #endif #if TEMP_SENSOR_SOC - #if !defined(TEMP_SOC_PIN) + #ifndef TEMP_SOC_PIN #error "TEMP_SOC_PIN must be defined to use TEMP_SENSOR_SOC." - #endif - - #if defined(TEMP_SOC_PIN) && IS_GPIO_PIN(TEMP_SOC_PIN) + #elif IS_GPIO_PIN(TEMP_SOC_PIN) #error "TEMP_SOC_PIN must not be a valid GPIO pin to avoid conflicts." #endif #endif diff --git a/Marlin/src/HAL/HC32/printf_retarget.cpp b/Marlin/src/HAL/HC32/printf_retarget.cpp index 2c98415dff96..8a48aca3d44a 100644 --- a/Marlin/src/HAL/HC32/printf_retarget.cpp +++ b/Marlin/src/HAL/HC32/printf_retarget.cpp @@ -23,7 +23,7 @@ #ifdef ARDUINO_ARCH_HC32 #ifdef REDIRECT_PRINTF_TO_SERIAL -#if !defined(__GNUC__) +#ifndef __GNUC__ #error "only GCC is supported" #endif diff --git a/Marlin/src/module/scara.cpp b/Marlin/src/module/scara.cpp index 9c149670e92e..0f00ab564338 100644 --- a/Marlin/src/module/scara.cpp +++ b/Marlin/src/module/scara.cpp @@ -229,9 +229,7 @@ float segments_per_second = DEFAULT_SEGMENTS_PER_SECOND; // Move all carriages together linearly until an endstop is hit. //do_blocking_move_to_xy_z(pos, mlz, homing_feedrate(Z_AXIS)); - current_position.x = 0 ; - current_position.y = 0 ; - current_position.z = max_length(Z_AXIS) ; + current_position.set(0, 0, max_length(Z_AXIS)); line_to_current_position(homing_feedrate(Z_AXIS)); planner.synchronize(); From 0ba4cd2b3bcf404fcd533e4a87992e86f3366c7f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 27 Jan 2024 00:19:36 +0000 Subject: [PATCH 167/236] [cron] Bump distribution date (2024-01-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 e16cd784ae2d..562f37857a4b 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 "2024-01-26" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 62f8027db6ad..76c7dd4856ac 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 "2024-01-26" + #define STRING_DISTRIBUTION_DATE "2024-01-27" #endif /** From ce8535f01ca4b85ca1f7cae3908d3174ac11fff6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 26 Jan 2024 15:18:38 -0600 Subject: [PATCH 168/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fix?= =?UTF-8?q?=20warning,=20adjust=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/endstops.cpp | 2 +- buildroot/tests/LPC1769 | 2 +- buildroot/tests/mega2560 | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 9c6a3c011cca..490d6bc2cefb 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -788,7 +788,7 @@ void Endstops::update() { 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)) }; + const Flags moving = { uvalue_t(NUM_AXES)(0 MAIN_AXIS_MAP(_G38_SET)) }; MAIN_AXIS_MAP(_G38_RESP); } #endif diff --git a/buildroot/tests/LPC1769 b/buildroot/tests/LPC1769 index 9987d155adeb..dd4f5f28eada 100755 --- a/buildroot/tests/LPC1769 +++ b/buildroot/tests/LPC1769 @@ -33,7 +33,7 @@ exec_test $1 $2 "Smoothieboard with TFTGLCD_PANEL_SPI and many features" "$3" # REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING \ # AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 EEPROM_SETTINGS \ # FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR FAN_SOFT_PWM \ -# SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME \ +# SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \ # SD_ABORT_ON_ENDSTOP_HIT ADVANCED_OK GCODE_MACROS \ # VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS \ # EXTRA_FAN_SPEED FWRETRACT MENU_ADDAUTOSTART SDCARD_SORT_ALPHA diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index c41e73640d44..97d12090c2a0 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -60,8 +60,8 @@ exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE | Sle # restore_configs opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO NUM_SERVOS 1 \ - EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \ - NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \ + EXTRUDERS 4 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 FAN_KICKSTART_TIME 500 \ + NUM_RUNOUT_SENSORS 4 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 Z_SERVO_MEASURE_ANGLE DEACTIVATE_SERVOS_AFTER_MOVE Z_SERVO_DEACTIVATE_AFTER_STOW \ @@ -70,7 +70,7 @@ opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \ 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 "Z Servo Probe | Multiple runout sensors (x5)" "$3" +exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 4 | VIKI2 | Servo Probe | Multiple runout sensors (x4)" "$3" # # Extruder Only. No XYZ axes at all. From ebea672240ba49067194e9a6959ba2604da2d4c2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 27 Jan 2024 11:45:54 -0600 Subject: [PATCH 169/236] =?UTF-8?q?=F0=9F=90=9B=20Protect=20EEPROM=20bytes?= =?UTF-8?q?=20916-926?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26729 Ender-3S1 STM32F401 Bootloader --- Marlin/src/HAL/shared/eeprom_api.h | 4 ++-- Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/HAL/shared/eeprom_api.h b/Marlin/src/HAL/shared/eeprom_api.h index 763271b42d84..33d80695db52 100644 --- a/Marlin/src/HAL/shared/eeprom_api.h +++ b/Marlin/src/HAL/shared/eeprom_api.h @@ -26,8 +26,8 @@ #include "../../libs/crc16.h" -// For testing. Define with -DEEPROM_EXCL_ZONE=919,926 in INI files. -//#define EEPROM_EXCL_ZONE 919,926 // Test a range +// For testing. Define with -DEEPROM_EXCL_ZONE=916,926 in INI files. +//#define EEPROM_EXCL_ZONE 916,926 // Test a range //#define EEPROM_EXCL_ZONE 333 // Test a single byte #ifdef EEPROM_EXCL_ZONE diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h b/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h index 32f70a371540..fa524464e386 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h @@ -35,4 +35,6 @@ #define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. #define ALLOW_STM32F4 +#define EEPROM_EXCL_ZONE 916,926 // Ender-3S1 STM32F401 Bootloader EEPROM exclusion zone + #include "../stm32f1/pins_CREALITY_V24S1_301.h" From bf8675b44a43c82a1ee8595fa3f7a1f1e5dca61e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 28 Jan 2024 00:22:35 +0000 Subject: [PATCH 170/236] [cron] Bump distribution date (2024-01-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 562f37857a4b..fa00c19ef283 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 "2024-01-27" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 76c7dd4856ac..33298c2ca9b8 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 "2024-01-27" + #define STRING_DISTRIBUTION_DATE "2024-01-28" #endif /** From 7a4d601f4d8b88acffe62b31d614773ad0f20a57 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 28 Jan 2024 14:13:23 -0800 Subject: [PATCH 171/236] =?UTF-8?q?=F0=9F=A9=B9=20Temp=20constraints=20fol?= =?UTF-8?q?lowup=20(#26744)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to cb291e8d --- Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 1 + Marlin/src/lcd/menu/menu_configuration.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index ed4f8c73673a..9fc9156f296c 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -39,6 +39,7 @@ #include "../../../core/serial.h" #include "../../../module/stepper.h" #include "../../../module/probe.h" +#include "../../../module/temperature.h" #if ENABLED(POWER_LOSS_RECOVERY) #include "../../../feature/powerloss.h" diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 44021ce35ad0..6a992b8f2fd6 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -31,6 +31,7 @@ #include "menu_item.h" #include "../../MarlinCore.h" +#include "../../module/temperature.h" #if ENABLED(LCD_ENDSTOP_TEST) #include "../../module/endstops.h" From 541bd26cd7d0d31d1f81298fb5ddc2d43f9c4c03 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 29 Jan 2024 00:21:02 +0000 Subject: [PATCH 172/236] [cron] Bump distribution date (2024-01-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 fa00c19ef283..5519a1a6426b 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 "2024-01-28" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 33298c2ca9b8..d80ddf931797 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 "2024-01-28" + #define STRING_DISTRIBUTION_DATE "2024-01-29" #endif /** From 5639237e2b174715413f9ffc6f6421db9150d9d6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 29 Jan 2024 20:38:03 -0600 Subject: [PATCH 173/236] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20cleanup=2029-01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Marlin.ino | 2 +- Marlin/src/HAL/AVR/HAL_SPI.cpp | 2 - Marlin/src/HAL/AVR/Servo.cpp | 1 - Marlin/src/HAL/AVR/endstop_interrupts.h | 1 - Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h | 1 - Marlin/src/HAL/AVR/pinsDebug.h | 3 -- Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp | 1 - Marlin/src/HAL/DUE/MarlinSerial.cpp | 1 - Marlin/src/HAL/DUE/fastio/G2_PWM.h | 1 - Marlin/src/HAL/DUE/fastio/G2_pins.h | 1 - Marlin/src/HAL/DUE/usb/compiler.h | 11 ----- Marlin/src/HAL/DUE/usb/conf_access.h | 2 - Marlin/src/HAL/DUE/usb/conf_clock.h | 1 - Marlin/src/HAL/DUE/usb/conf_usb.h | 4 -- Marlin/src/HAL/DUE/usb/ctrl_access.c | 28 ------------ Marlin/src/HAL/DUE/usb/ctrl_access.h | 9 ---- Marlin/src/HAL/DUE/usb/mrepeat.h | 1 - Marlin/src/HAL/DUE/usb/osc.h | 2 - Marlin/src/HAL/DUE/usb/preprocessor.h | 1 - Marlin/src/HAL/DUE/usb/sbc_protocol.h | 1 - Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h | 5 --- Marlin/src/HAL/DUE/usb/sysclk.h | 1 - Marlin/src/HAL/DUE/usb/udc.c | 1 - Marlin/src/HAL/DUE/usb/udc.h | 2 - Marlin/src/HAL/DUE/usb/udd.h | 1 - Marlin/src/HAL/DUE/usb/udi_cdc.c | 10 ----- Marlin/src/HAL/DUE/usb/udi_cdc.h | 2 - Marlin/src/HAL/DUE/usb/udi_cdc_desc.c | 1 - Marlin/src/HAL/DUE/usb/udi_composite_desc.c | 2 - Marlin/src/HAL/DUE/usb/udi_msc.c | 6 --- Marlin/src/HAL/DUE/usb/uotghs_device_due.c | 45 ------------------- Marlin/src/HAL/DUE/usb/uotghs_device_due.h | 6 --- Marlin/src/HAL/DUE/usb/uotghs_otg.h | 2 - Marlin/src/HAL/DUE/usb/usb_protocol.h | 4 -- Marlin/src/HAL/DUE/usb/usb_protocol_cdc.h | 3 -- Marlin/src/HAL/DUE/usb/usb_protocol_msc.h | 4 -- Marlin/src/HAL/LINUX/servo_private.h | 1 - .../win_usb_driver/lpc176x_usb_driver.inf | 5 +-- Marlin/src/HAL/NATIVE_SIM/servo_private.h | 1 - .../src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h | 1 - Marlin/src/HAL/SAMD21/HAL.cpp | 3 -- Marlin/src/HAL/SAMD21/HAL.h | 1 - Marlin/src/HAL/SAMD21/SAMD21.h | 2 - Marlin/src/HAL/SAMD21/Servo.cpp | 1 - .../u8g/u8g_com_HAL_samd21_shared_hw_spi.cpp | 1 - Marlin/src/HAL/SAMD51/Servo.cpp | 1 - Marlin/src/HAL/STM32/inc/SanityCheck.h | 1 - Marlin/src/HAL/STM32F1/HAL_N32.h | 1 - Marlin/src/HAL/STM32F1/SPI.cpp | 1 - .../maple_win_usb_driver/maple_serial.inf | 1 - Marlin/src/HAL/STM32F1/onboard_sd.h | 1 - Marlin/src/HAL/STM32F1/sdio.h | 1 - Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp | 1 - Marlin/src/HAL/shared/Delay.cpp | 1 - Marlin/src/HAL/shared/backtrace/unwarm.cpp | 2 - Marlin/src/HAL/shared/backtrace/unwarm.h | 3 -- .../shared/cpu_exception/exception_arm.cpp | 1 - Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 1 - Marlin/src/feature/encoder_i2c.cpp | 2 - Marlin/src/feature/fwretract.cpp | 1 - Marlin/src/feature/meatpack.h | 1 - .../src/feature/mmu/mmu2-serial-protocol.md | 9 ---- Marlin/src/feature/runout.h | 1 - Marlin/src/feature/spindle_laser.h | 1 - Marlin/src/feature/stepper_driver_safety.h | 1 - Marlin/src/feature/twibus.h | 1 - Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp | 2 - Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp | 1 - Marlin/src/lcd/dogm/HAL_LCD_class_defines.h | 1 - Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 1 - .../u8g_dev_ssd1306_sh1106_128x64_I2C.cpp | 2 - .../lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp | 1 - .../lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp | 20 ++++----- Marlin/src/lcd/e3v2/common/dwin_api.h | 1 - Marlin/src/lcd/e3v2/marlinui/dwin_string.h | 2 - .../src/lcd/extui/anycubic_vyper/dgus_tft.h | 1 - .../src/lcd/extui/dgus/mks/DGUSDisplayDef.h | 7 --- .../definition/DGUS_ScreenAddrList.cpp | 1 - .../ftdi_eve_touch_ui/cocoa_press/screens.h | 1 - .../cocoa_press/statistics_screen.cpp | 1 - .../ftdi_eve_lib/basic/boards.h | 1 - .../ftdi_eve_lib/extended/event_loop.cpp | 1 - .../unicode/cyrillic_char_set_bitmap_31.h | 1 - .../ftdi_eve_touch_ui/language/language.cpp | 1 - .../lcd/extui/ftdi_eve_touch_ui/screens.cpp | 1 - .../extui/ftdi_eve_touch_ui/theme/sounds.cpp | 1 - .../lcd/extui/ia_creality/FileNavigator.cpp | 1 - Marlin/src/lcd/extui/malyan/malyan.cpp | 1 - .../src/lcd/extui/mks_ui/SPIFlashStorage.cpp | 1 - Marlin/src/lcd/extui/mks_ui/draw_wifi.h | 1 - Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h | 1 - Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h | 1 - .../lcd/extui/mks_ui/tft_lvgl_configuration.h | 6 +-- Marlin/src/lcd/language/language_pl.h | 1 - Marlin/src/lcd/language/language_test.h | 4 -- Marlin/src/lcd/language/language_uk.h | 1 - Marlin/src/lcd/menu/game/invaders.cpp | 1 - .../tft/fontdata/Helvetica/Helvetica_19.cpp | 1 - .../lcd/tft/fontdata/Unifont/LICENSE-OFL-1.1 | 1 - Marlin/src/lcd/tft/tft_string.cpp | 1 - Marlin/src/lcd/tft/ui_color_ui.cpp | 1 - Marlin/src/lcd/tft/ui_common.cpp | 1 - Marlin/src/lcd/tft_io/ili9328.h | 2 - Marlin/src/lcd/tft_io/ili9341.h | 1 - Marlin/src/lcd/tft_io/r65105.h | 2 - .../libs/heatshrink/heatshrink_decoder.cpp | 1 - Marlin/src/module/motion.cpp | 1 - Marlin/src/module/planner.h | 2 - Marlin/src/pins/pinsDebug.h | 1 - Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h | 1 - Marlin/src/sd/SdBaseFile.cpp | 2 - Marlin/src/sd/SdBaseFile.h | 1 - .../src/sd/usb_flashdrive/lib-uhs2/UsbCore.h | 2 - .../sd/usb_flashdrive/lib-uhs2/masstorage.cpp | 2 - .../src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h | 2 - .../src/sd/usb_flashdrive/lib-uhs3/README.txt | 2 - .../UHS_BULK_STORAGE/UHS_BULK_STORAGE.h | 4 -- .../UHS_BULK_STORAGE_INLINE.h | 19 -------- .../lib-uhs3/UHS_host/UHS_UsbCore.h | 3 -- .../lib-uhs3/UHS_host/UHS_address.h | 3 -- .../lib-uhs3/UHS_host/UHS_host_INLINE.h | 4 -- .../lib-uhs3/UHS_host/UHS_macros.h | 3 -- .../lib-uhs3/UHS_host/UHS_printf_HELPER.h | 2 - .../lib-uhs3/UHS_host/UHS_printhex.h | 2 - .../lib-uhs3/UHS_host/UHS_settings.h | 1 - .../lib-uhs3/UHS_host/UHS_usb_ch9.h | 4 -- .../USB_HOST_SHIELD/USB_HOST_SHIELD.h | 6 --- .../USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h | 3 -- .../lib-uhs3/UHS_host/macro_logic.h | 2 - .../lib-uhs3/dyn_SWI/SWI_INLINE.h | 4 -- .../usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h | 2 - 131 files changed, 13 insertions(+), 361 deletions(-) diff --git a/Marlin/Marlin.ino b/Marlin/Marlin.ino index 81652000a8a6..066cc1717d35 100644 --- a/Marlin/Marlin.ino +++ b/Marlin/Marlin.ino @@ -2,7 +2,7 @@ Marlin Firmware - (c) 2011-2023 MarlinFirmware + (c) 2011-2024 MarlinFirmware Portions of Marlin are (c) by their respective authors. All code complies with GPLv2 and/or GPLv3 diff --git a/Marlin/src/HAL/AVR/HAL_SPI.cpp b/Marlin/src/HAL/AVR/HAL_SPI.cpp index 32c0361d0352..db6a12734d4d 100644 --- a/Marlin/src/HAL/AVR/HAL_SPI.cpp +++ b/Marlin/src/HAL/AVR/HAL_SPI.cpp @@ -119,7 +119,6 @@ void spiBegin() { while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } } - /** begin spi transaction */ void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) { // Based on Arduino SPI library @@ -175,7 +174,6 @@ void spiBegin() { SPSR = clockDiv | 0x01; } - #else // SOFTWARE_SPI || FORCE_SOFT_SPI // ------------------------ diff --git a/Marlin/src/HAL/AVR/Servo.cpp b/Marlin/src/HAL/AVR/Servo.cpp index 0a1ef5337ae9..8ce9bc11b8cc 100644 --- a/Marlin/src/HAL/AVR/Servo.cpp +++ b/Marlin/src/HAL/AVR/Servo.cpp @@ -63,7 +63,6 @@ static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval) - /************ static functions common to all instances ***********************/ static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) { diff --git a/Marlin/src/HAL/AVR/endstop_interrupts.h b/Marlin/src/HAL/AVR/endstop_interrupts.h index 2532624d39cb..91cb336e2462 100644 --- a/Marlin/src/HAL/AVR/endstop_interrupts.h +++ b/Marlin/src/HAL/AVR/endstop_interrupts.h @@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); } #endif - // Install Pin change interrupt for a pin. Can be called multiple times. void pciSetup(const int8_t pin) { if (digitalPinHasPCICR(pin)) { diff --git a/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h b/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h index 0c434b157c78..51c5e096586e 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h @@ -679,7 +679,6 @@ #define PF7_PWM 0 #define PF7_DDR DDRF - /** * Some of the pin mapping functions of the Teensduino extension to the Arduino IDE * do not function the same as the other Arduino extensions. diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index fc51f41ef81e..15db63b4d7f8 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -163,7 +163,6 @@ bool pwm_status(uint8_t pin) { SERIAL_ECHO_SP(2); } // pwm_status - const volatile uint8_t* const PWM_other[][3] PROGMEM = { { &TCCR0A, &TCCR0B, &TIMSK0 }, { &TCCR1A, &TCCR1B, &TIMSK1 }, @@ -181,7 +180,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = { #endif }; - const volatile uint8_t* const PWM_OCR[][3] PROGMEM = { #ifdef TIMER0A @@ -217,7 +215,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = { #endif }; - #define TCCR_A(T) pgm_read_word(&PWM_other[T][0]) #define TCCR_B(T) pgm_read_word(&PWM_other[T][1]) #define TIMSK(T) pgm_read_word(&PWM_other[T][2]) diff --git a/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp b/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp index 79bafe293967..131174b06c41 100644 --- a/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp +++ b/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp @@ -120,7 +120,6 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) { U8G_ATOMIC_END(); } - #if ENABLED(FYSETC_MINI_12864) #define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3 #else diff --git a/Marlin/src/HAL/DUE/MarlinSerial.cpp b/Marlin/src/HAL/DUE/MarlinSerial.cpp index 638f7a100722..90efe55fc23d 100644 --- a/Marlin/src/HAL/DUE/MarlinSerial.cpp +++ b/Marlin/src/HAL/DUE/MarlinSerial.cpp @@ -474,7 +474,6 @@ void MarlinSerial::flushTX() { } } - // If not using the USB port as serial port #if defined(SERIAL_PORT) && SERIAL_PORT >= 0 template class MarlinSerial< MarlinSerialCfg >; diff --git a/Marlin/src/HAL/DUE/fastio/G2_PWM.h b/Marlin/src/HAL/DUE/fastio/G2_PWM.h index 2afe246ceaea..054eb2cf8039 100644 --- a/Marlin/src/HAL/DUE/fastio/G2_PWM.h +++ b/Marlin/src/HAL/DUE/fastio/G2_PWM.h @@ -49,7 +49,6 @@ extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B; #define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) } - #define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \ PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \ PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \ diff --git a/Marlin/src/HAL/DUE/fastio/G2_pins.h b/Marlin/src/HAL/DUE/fastio/G2_pins.h index 80c87bd39296..38fcc5e5df0b 100644 --- a/Marlin/src/HAL/DUE/fastio/G2_pins.h +++ b/Marlin/src/HAL/DUE/fastio/G2_pins.h @@ -168,7 +168,6 @@ const G2_PinDescription G2_g_APinDescription[] = { { PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52 { PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53 - // 54 .. 65 - Analog pins // ---------------------- { PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0 diff --git a/Marlin/src/HAL/DUE/usb/compiler.h b/Marlin/src/HAL/DUE/usb/compiler.h index 633197914eef..27c554cdb7e1 100644 --- a/Marlin/src/HAL/DUE/usb/compiler.h +++ b/Marlin/src/HAL/DUE/usb/compiler.h @@ -142,7 +142,6 @@ */ #define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack()) - /** * \brief Set aligned boundary. */ @@ -283,7 +282,6 @@ typedef double F64; //!< 64-bit floating-point number. typedef uint32_t iram_size_t; //! @} - /*! \name Status Types */ //! @{ @@ -291,7 +289,6 @@ typedef bool Status_bool_t; //!< Boolean status. typedef U8 Status_t; //!< 8-bit-coded status. //! @} - /*! \name Aliasing Aggregate Types */ //! @{ @@ -462,7 +459,6 @@ typedef struct #endif //! @} - #ifndef __ASSEMBLY__ // not for assembling. //! \name Optimization Control @@ -581,7 +577,6 @@ typedef struct //! @} - /*! \name Zero-Bit Counting * * Under GCC, __builtin_clz and __builtin_ctz behave like macros when @@ -692,7 +687,6 @@ typedef struct //! @} - /*! \name Bit Reversing */ //! @{ @@ -732,7 +726,6 @@ typedef struct //! @} - /*! \name Alignment */ //! @{ @@ -798,7 +791,6 @@ typedef struct */ #define Long_call(addr) ((*(void (*)(void))(addr))()) - /*! \name MCU Endianism Handling * ARM is MCU little endianism. */ @@ -868,7 +860,6 @@ typedef struct #define CPU_TO_BE32(x) swap32(x) //! @} - /*! \name Endianism Conversion * * The same considerations as for clz and ctz apply here but GCC's @@ -955,7 +946,6 @@ typedef struct //! @} - /*! \name Target Abstraction */ //! @{ @@ -997,7 +987,6 @@ typedef U8 Byte; //!< 8-bit unsigned integer. #endif // #ifndef __ASSEMBLY__ - #ifdef __ICCARM__ #define SHORTENUM __packed #elif defined(__GNUC__) diff --git a/Marlin/src/HAL/DUE/usb/conf_access.h b/Marlin/src/HAL/DUE/usb/conf_access.h index f401685223cb..0ea5fe228782 100644 --- a/Marlin/src/HAL/DUE/usb/conf_access.h +++ b/Marlin/src/HAL/DUE/usb/conf_access.h @@ -81,7 +81,6 @@ #define LUN_0_NAME "\"SD/MMC Card\"" //! @} - /*! \name Actions Associated with Memory Accesses * * Write here the action to associate with each memory access. @@ -112,5 +111,4 @@ #define GLOBAL_WR_PROTECT false //!< Management of a global write protection. //! @} - #endif // _CONF_ACCESS_H_ diff --git a/Marlin/src/HAL/DUE/usb/conf_clock.h b/Marlin/src/HAL/DUE/usb/conf_clock.h index 97e70e99a5b9..0c7815ee4d72 100644 --- a/Marlin/src/HAL/DUE/usb/conf_clock.h +++ b/Marlin/src/HAL/DUE/usb/conf_clock.h @@ -96,5 +96,4 @@ // - UPLL frequency: 480MHz // - USB clock: 480 / 1 = 480MHz - #endif /* CONF_CLOCK_H_INCLUDED */ diff --git a/Marlin/src/HAL/DUE/usb/conf_usb.h b/Marlin/src/HAL/DUE/usb/conf_usb.h index f66194c6e6f9..fb4ef3424110 100644 --- a/Marlin/src/HAL/DUE/usb/conf_usb.h +++ b/Marlin/src/HAL/DUE/usb/conf_usb.h @@ -88,7 +88,6 @@ #endif //@} - /** * USB Device Callbacks definitions (Optional) * @{ @@ -150,7 +149,6 @@ //@} - /** * USB Interface Configuration * @{ @@ -210,7 +208,6 @@ //@} //@} - /** * Configuration of MSC interface * @{ @@ -245,7 +242,6 @@ //@} - /** * Description of Composite Device * @{ diff --git a/Marlin/src/HAL/DUE/usb/ctrl_access.c b/Marlin/src/HAL/DUE/usb/ctrl_access.c index 99f97f62cb80..b766ed12732b 100644 --- a/Marlin/src/HAL/DUE/usb/ctrl_access.c +++ b/Marlin/src/HAL/DUE/usb/ctrl_access.c @@ -68,7 +68,6 @@ #endif #include "ctrl_access.h" - //_____ D E F I N I T I O N S ______________________________________________ #ifdef FREERTOS_USED @@ -112,7 +111,6 @@ static xSemaphoreHandle ctrl_access_semphr = NULL; #endif // FREERTOS_USED - #if MAX_LUN /*! \brief Initializes an entry of the LUN descriptor table. @@ -242,17 +240,14 @@ static const struct #endif - #if GLOBAL_WR_PROTECT == true bool g_wr_protect; #endif - /*! \name Control Interface */ //! @{ - #ifdef FREERTOS_USED bool ctrl_access_init(void) @@ -270,7 +265,6 @@ bool ctrl_access_init(void) return true; } - /*! \brief Locks accesses to LUNs. * * \return \c true if the access was successfully locked, else \c false. @@ -288,7 +282,6 @@ static bool ctrl_access_lock(void) #endif // FREERTOS_USED - U8 get_nb_lun(void) { #if MEM_USB == ENABLE @@ -309,13 +302,11 @@ U8 get_nb_lun(void) #endif } - U8 get_cur_lun(void) { return LUN_ID_0; } - Ctrl_status mem_test_unit_ready(U8 lun) { Ctrl_status status; @@ -337,7 +328,6 @@ Ctrl_status mem_test_unit_ready(U8 lun) return status; } - Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector) { Ctrl_status status; @@ -359,7 +349,6 @@ Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector) return status; } - U8 mem_sector_size(U8 lun) { U8 sector_size; @@ -381,7 +370,6 @@ U8 mem_sector_size(U8 lun) return sector_size; } - bool mem_unload(U8 lun, bool unload) { bool unloaded; @@ -433,7 +421,6 @@ bool mem_wr_protect(U8 lun) return wr_protect; } - bool mem_removal(U8 lun) { bool removal; @@ -458,7 +445,6 @@ bool mem_removal(U8 lun) return removal; } - const char *mem_name(U8 lun) { #if MAX_LUN==0 @@ -475,17 +461,14 @@ const char *mem_name(U8 lun) #endif } - //! @} - #if ACCESS_USB == true /*! \name MEM <-> USB Interface */ //! @{ - Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector) { Ctrl_status status; @@ -505,7 +488,6 @@ Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector) return status; } - Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector) { Ctrl_status status; @@ -525,19 +507,16 @@ Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector) return status; } - //! @} #endif // ACCESS_USB == true - #if ACCESS_MEM_TO_RAM == true /*! \name MEM <-> RAM Interface */ //! @{ - Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram) { Ctrl_status status; @@ -564,7 +543,6 @@ Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram) return status; } - Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram) { Ctrl_status status; @@ -591,19 +569,16 @@ Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram) return status; } - //! @} #endif // ACCESS_MEM_TO_RAM == true - #if ACCESS_STREAM == true /*! \name Streaming MEM <-> MEM Interface */ //! @{ - #if ACCESS_MEM_TO_MEM == true #include "fat.h" @@ -625,21 +600,18 @@ Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_ad #endif // ACCESS_MEM_TO_MEM == true - Ctrl_status stream_state(U8 id) { UNUSED(id); return CTRL_GOOD; } - U16 stream_stop(U8 id) { UNUSED(id); return 0; } - //! @} #endif // ACCESS_STREAM diff --git a/Marlin/src/HAL/DUE/usb/ctrl_access.h b/Marlin/src/HAL/DUE/usb/ctrl_access.h index b33839076eae..d9cb05da7472 100644 --- a/Marlin/src/HAL/DUE/usb/ctrl_access.h +++ b/Marlin/src/HAL/DUE/usb/ctrl_access.h @@ -56,7 +56,6 @@ * Support and FAQ: visit Atmel Support */ - #ifndef _CTRL_ACCESS_H_ #define _CTRL_ACCESS_H_ @@ -89,7 +88,6 @@ typedef enum CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed. } Ctrl_status; - // FYI: Each Logical Unit Number (LUN) corresponds to a memory. // Check LUN defines. @@ -136,7 +134,6 @@ typedef enum #define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage). //! @} - // Include LUN header files. #if LUN_0 == ENABLE #include LUN_0_INCLUDE @@ -166,13 +163,11 @@ typedef enum #include LUN_USB_INCLUDE #endif - // Check the configuration of write protection in conf_access.h. #ifndef GLOBAL_WR_PROTECT #error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h #endif - #if GLOBAL_WR_PROTECT == true //! Write protect. @@ -180,7 +175,6 @@ extern bool g_wr_protect; #endif - /*! \name Control Interface */ //! @{ @@ -279,7 +273,6 @@ extern const char *mem_name(U8 lun); //! @} - #if ACCESS_USB == true /*! \name MEM <-> USB Interface @@ -310,7 +303,6 @@ extern Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector); #endif // ACCESS_USB == true - #if ACCESS_MEM_TO_RAM == true /*! \name MEM <-> RAM Interface @@ -341,7 +333,6 @@ extern Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram); #endif // ACCESS_MEM_TO_RAM == true - #if ACCESS_STREAM == true /*! \name Streaming MEM <-> MEM Interface diff --git a/Marlin/src/HAL/DUE/usb/mrepeat.h b/Marlin/src/HAL/DUE/usb/mrepeat.h index 8363d9cde380..10a8237545de 100644 --- a/Marlin/src/HAL/DUE/usb/mrepeat.h +++ b/Marlin/src/HAL/DUE/usb/mrepeat.h @@ -57,7 +57,6 @@ #include "preprocessor.h" - //! Maximal number of repetitions supported by MREPEAT. #define MREPEAT_LIMIT 256 diff --git a/Marlin/src/HAL/DUE/usb/osc.h b/Marlin/src/HAL/DUE/usb/osc.h index c0ae24381a39..1585018ed851 100644 --- a/Marlin/src/HAL/DUE/usb/osc.h +++ b/Marlin/src/HAL/DUE/usb/osc.h @@ -128,7 +128,6 @@ static inline void osc_enable(uint32_t ul_id) { pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS); break; - case OSC_MAINCK_4M_RC: pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz); break; @@ -141,7 +140,6 @@ static inline void osc_enable(uint32_t ul_id) { pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz); break; - case OSC_MAINCK_XTAL: pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*, pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US, diff --git a/Marlin/src/HAL/DUE/usb/preprocessor.h b/Marlin/src/HAL/DUE/usb/preprocessor.h index c12d01cb642f..fe796c4fb83e 100644 --- a/Marlin/src/HAL/DUE/usb/preprocessor.h +++ b/Marlin/src/HAL/DUE/usb/preprocessor.h @@ -51,5 +51,4 @@ #include "stringz.h" #include "mrepeat.h" - #endif // _PREPROCESSOR_H_ diff --git a/Marlin/src/HAL/DUE/usb/sbc_protocol.h b/Marlin/src/HAL/DUE/usb/sbc_protocol.h index 983ec7adca1c..cdd4caa3cd50 100644 --- a/Marlin/src/HAL/DUE/usb/sbc_protocol.h +++ b/Marlin/src/HAL/DUE/usb/sbc_protocol.h @@ -86,7 +86,6 @@ enum scsi_sbc_mode { SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page }; - //! \name SBC-2 Device-Specific Parameter //@{ #define SCSI_MS_SBC_WP 0x80 //!< Write Protected diff --git a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h index 553fd3c29a88..c0d3c925e80a 100644 --- a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h +++ b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h @@ -45,7 +45,6 @@ * Support and FAQ: visit Atmel Support */ - #ifndef _SD_MMC_SPI_MEM_H_ #define _SD_MMC_SPI_MEM_H_ @@ -63,17 +62,14 @@ #error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled #endif - #include "ctrl_access.h" - //_____ D E F I N I T I O N S ______________________________________________ #define SD_MMC_REMOVED 0 #define SD_MMC_INSERTED 1 #define SD_MMC_REMOVING 2 - //---- CONTROL FUNCTIONS ---- //! //! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI. @@ -133,7 +129,6 @@ extern bool sd_mmc_spi_wr_protect(void); //! extern bool sd_mmc_spi_removal(void); - //---- ACCESS DATA FUNCTIONS ---- #if ACCESS_USB == true diff --git a/Marlin/src/HAL/DUE/usb/sysclk.h b/Marlin/src/HAL/DUE/usb/sysclk.h index 062337861502..4001366868a0 100644 --- a/Marlin/src/HAL/DUE/usb/sysclk.h +++ b/Marlin/src/HAL/DUE/usb/sysclk.h @@ -212,7 +212,6 @@ extern "C" { #define CONFIG_USBCLK_DIV #endif - extern void sysclk_enable_usb(void); extern void sysclk_disable_usb(void); diff --git a/Marlin/src/HAL/DUE/usb/udc.c b/Marlin/src/HAL/DUE/usb/udc.c index 60bf0cfff35c..f6a4243d1d94 100644 --- a/Marlin/src/HAL/DUE/usb/udc.c +++ b/Marlin/src/HAL/DUE/usb/udc.c @@ -83,7 +83,6 @@ static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface; //! @} - //! \name Internal structure to store the USB device main strings //! @{ diff --git a/Marlin/src/HAL/DUE/usb/udc.h b/Marlin/src/HAL/DUE/usb/udc.h index 6230a81b359c..aba08d956e84 100644 --- a/Marlin/src/HAL/DUE/usb/udc.h +++ b/Marlin/src/HAL/DUE/usb/udc.h @@ -685,6 +685,4 @@ usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void); } \endcode */ - - #endif // _UDC_H_ diff --git a/Marlin/src/HAL/DUE/usb/udd.h b/Marlin/src/HAL/DUE/usb/udd.h index 6eda465e54a4..4e482784e163 100644 --- a/Marlin/src/HAL/DUE/usb/udd.h +++ b/Marlin/src/HAL/DUE/usb/udd.h @@ -213,7 +213,6 @@ void udd_send_remotewakeup(void); */ void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size ); - /** * \name Endpoint Management * diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc.c b/Marlin/src/HAL/DUE/usb/udi_cdc.c index 89debe57f130..26788570c619 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc.c +++ b/Marlin/src/HAL/DUE/usb/udi_cdc.c @@ -457,7 +457,6 @@ void udi_cdc_data_sof_notify(void) #endif } - // ------------------------ //------- Internal routines to control serial line @@ -520,7 +519,6 @@ static void udi_cdc_ctrl_state_change(uint8_t port, bool b_set, le16_t bit_mask) udi_cdc_ctrl_state_notify(port, ep_comm); } - static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep) { #if UDI_CDC_PORT_NB == 1 // To optimize code @@ -542,7 +540,6 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep) } } - static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) { uint8_t port; @@ -578,11 +575,9 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udi_cdc_ctrl_state_notify(port, ep); } - // ------------------------ //------- Internal routines to process data transfer - static bool udi_cdc_rx_start(uint8_t port) { irqflags_t flags; @@ -632,7 +627,6 @@ static bool udi_cdc_rx_start(uint8_t port) udi_cdc_data_received); } - static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) { uint8_t buf_sel_trans; @@ -668,7 +662,6 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_ udi_cdc_rx_start(port); } - static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) { uint8_t port; @@ -700,7 +693,6 @@ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t udi_cdc_tx_send(port); } - static void udi_cdc_tx_send(uint8_t port) { irqflags_t flags; @@ -780,11 +772,9 @@ static void udi_cdc_tx_send(uint8_t port) udi_cdc_data_sent); } - // ------------------------ //------- Application interface - //------- Application interface void udi_cdc_ctrl_signal_dcd(bool b_set) diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc.h b/Marlin/src/HAL/DUE/usb/udi_cdc.h index 2bc5fff18716..e9c6abbbb2f2 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc.h +++ b/Marlin/src/HAL/DUE/usb/udi_cdc.h @@ -106,7 +106,6 @@ typedef struct { usb_ep_desc_t ep_notify; } udi_cdc_comm_desc_t; - /** * \brief Data Class interface descriptor * @@ -121,7 +120,6 @@ typedef struct { usb_ep_desc_t ep_out; } udi_cdc_data_desc_t; - //! CDC communication endpoints size for all speeds #define UDI_CDC_COMM_EP_SIZE 64 //! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B) diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c b/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c index 4c79e8df1309..bcae362cef8f 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c +++ b/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c @@ -109,7 +109,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = { .bNumConfigurations = 1 }; - #ifdef USB_DEVICE_HS_SUPPORT //! USB Device Qualifier Descriptor for HS COMPILER_WORD_ALIGNED diff --git a/Marlin/src/HAL/DUE/usb/udi_composite_desc.c b/Marlin/src/HAL/DUE/usb/udi_composite_desc.c index b10d043b9f12..8fa5acbb3f72 100644 --- a/Marlin/src/HAL/DUE/usb/udi_composite_desc.c +++ b/Marlin/src/HAL/DUE/usb/udi_composite_desc.c @@ -93,7 +93,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = { .bNumConfigurations = 1 }; - #ifdef USB_DEVICE_HS_SUPPORT //! USB Device Qualifier Descriptor for HS COMPILER_WORD_ALIGNED @@ -147,7 +146,6 @@ UDC_DESC_STORAGE udc_desc_t udc_desc_hs = { }; #endif - /** * \name UDC structures which contains all USB Device definitions */ diff --git a/Marlin/src/HAL/DUE/usb/udi_msc.c b/Marlin/src/HAL/DUE/usb/udi_msc.c index 3f70a8fb18bc..56664f4bf7c6 100644 --- a/Marlin/src/HAL/DUE/usb/udi_msc.c +++ b/Marlin/src/HAL/DUE/usb/udi_msc.c @@ -86,7 +86,6 @@ UDC_DESC_STORAGE udi_api_t udi_api_msc = { }; //@} - /** * \ingroup udi_msc_group * \defgroup udi_msc_group_internal Implementation of UDI MSC @@ -137,7 +136,6 @@ volatile bool udi_msc_b_reset_trans = true; //@} - /** * \name Internal routines */ @@ -190,7 +188,6 @@ static void udi_msc_cbw_received(udd_ep_status_t status, static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag); //@} - /** * \name Routines to process small data packet */ @@ -217,7 +214,6 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); //@} - /** * \name Routines to process CSW packet */ @@ -250,7 +246,6 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); //@} - /** * \name Routines manage sense data */ @@ -307,7 +302,6 @@ static void udi_msc_sense_fail_cdb_invalid(void); static void udi_msc_sense_command_invalid(void); //@} - /** * \name Routines manage SCSI Commands */ diff --git a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c index 5a988b7421d1..01dda7e7fec8 100644 --- a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c +++ b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c @@ -293,7 +293,6 @@ do { \ # endif #endif - /** * \name Power management routine. */ @@ -310,7 +309,6 @@ static bool udd_b_idle; //! State of sleep manager static bool udd_b_sleep_initialized = false; - /*! \brief Authorize or not the CPU powerdown mode * * \param b_enable true to authorize idle mode @@ -338,7 +336,6 @@ static void udd_sleep_mode(bool b_idle) //@} - /** * \name Control endpoint low level management routine. * @@ -410,7 +407,6 @@ static void udd_ctrl_send_zlp_out(void); //! \brief Call callback associated to setup request static void udd_ctrl_endofrequest(void); - /** * \brief Main interrupt routine for control endpoint * @@ -422,7 +418,6 @@ static bool udd_ctrl_interrupt(void); //@} - /** * \name Management of bulk/interrupt/isochronous endpoints * @@ -460,7 +455,6 @@ typedef struct { uint8_t stall_requested:1; } udd_ep_job_t; - //! Array to register a job on bulk/interrupt/isochronous endpoint static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP]; @@ -522,7 +516,6 @@ static bool udd_ep_interrupt(void); #endif // (0!=USB_DEVICE_MAX_EP) //@} - // ------------------------ //--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS @@ -671,13 +664,11 @@ ISR(UDD_USB_INT_FUN) return; } - bool udd_include_vbus_monitoring(void) { return true; } - void udd_enable(void) { irqflags_t flags; @@ -764,7 +755,6 @@ void udd_enable(void) cpu_irq_restore(flags); } - void udd_disable(void) { irqflags_t flags; @@ -866,7 +856,6 @@ void udd_attach(void) cpu_irq_restore(flags); } - void udd_detach(void) { otg_unfreeze_clock(); @@ -883,7 +872,6 @@ void udd_detach(void) udd_sleep_mode(false); } - bool udd_is_high_speed(void) { #ifdef USB_DEVICE_HS_SUPPORT @@ -893,7 +881,6 @@ bool udd_is_high_speed(void) #endif } - void udd_set_address(uint8_t address) { udd_disable_address(); @@ -901,13 +888,11 @@ void udd_set_address(uint8_t address) udd_enable_address(); } - uint8_t udd_getaddress(void) { return udd_get_configured_address(); } - uint16_t udd_get_frame_number(void) { return udd_frame_number(); @@ -930,14 +915,12 @@ void udd_send_remotewakeup(void) } } - void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size) { udd_g_ctrlreq.payload = payload; udd_g_ctrlreq.payload_size = payload_size; } - #if (0 != USB_DEVICE_MAX_EP) bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes, uint16_t MaxEndpointSize) @@ -1061,7 +1044,6 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes, return true; } - void udd_ep_free(udd_ep_id_t ep) { uint8_t ep_index = ep & USB_EP_ADDR_MASK; @@ -1074,14 +1056,12 @@ void udd_ep_free(udd_ep_id_t ep) udd_ep_job[ep_index - 1].stall_requested = false; } - bool udd_ep_is_halted(udd_ep_id_t ep) { uint8_t ep_index = ep & USB_EP_ADDR_MASK; return Is_udd_endpoint_stall_requested(ep_index); } - bool udd_ep_set_halt(udd_ep_id_t ep) { uint8_t ep_index = ep & USB_EP_ADDR_MASK; @@ -1122,7 +1102,6 @@ bool udd_ep_set_halt(udd_ep_id_t ep) return true; } - bool udd_ep_clear_halt(udd_ep_id_t ep) { uint8_t ep_index = ep & USB_EP_ADDR_MASK; @@ -1163,7 +1142,6 @@ bool udd_ep_clear_halt(udd_ep_id_t ep) return true; } - bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket, uint8_t * buf, iram_size_t buf_size, udd_callback_trans_t callback) @@ -1230,7 +1208,6 @@ bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket, #endif } - void udd_ep_abort(udd_ep_id_t ep) { uint8_t ep_index = ep & USB_EP_ADDR_MASK; @@ -1259,7 +1236,6 @@ void udd_ep_abort(udd_ep_id_t ep) udd_ep_abort_job(ep); } - bool udd_ep_wait_stall_clear(udd_ep_id_t ep, udd_callback_halt_cleared_t callback) { @@ -1294,7 +1270,6 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep, } #endif // (0 != USB_DEVICE_MAX_EP) - #ifdef USB_DEVICE_HS_SUPPORT void udd_test_mode_j(void) @@ -1303,20 +1278,17 @@ void udd_test_mode_j(void) udd_enable_hs_test_mode_j(); } - void udd_test_mode_k(void) { udd_enable_hs_test_mode(); udd_enable_hs_test_mode_k(); } - void udd_test_mode_se0_nak(void) { udd_enable_hs_test_mode(); } - void udd_test_mode_packet(void) { uint8_t i; @@ -1360,8 +1332,6 @@ void udd_test_mode_packet(void) } #endif // USB_DEVICE_HS_SUPPORT - - // ------------------------ //--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT @@ -1411,7 +1381,6 @@ static void udd_ctrl_init(void) udd_ep_control_state = UDD_EPCTRL_SETUP; } - static void udd_ctrl_setup_received(void) { irqflags_t flags; @@ -1473,7 +1442,6 @@ static void udd_ctrl_setup_received(void) } } - static void udd_ctrl_in_sent(void) { static bool b_shortpacket = false; @@ -1557,7 +1525,6 @@ static void udd_ctrl_in_sent(void) cpu_irq_restore(flags); } - static void udd_ctrl_out_received(void) { irqflags_t flags; @@ -1648,7 +1615,6 @@ static void udd_ctrl_out_received(void) cpu_irq_restore(flags); } - static void udd_ctrl_underflow(void) { if (Is_udd_out_received(0)) @@ -1665,7 +1631,6 @@ static void udd_ctrl_underflow(void) } } - static void udd_ctrl_overflow(void) { if (Is_udd_in_send(0)) @@ -1681,7 +1646,6 @@ static void udd_ctrl_overflow(void) } } - static void udd_ctrl_stall_data(void) { // Stall all packets on IN & OUT control endpoint @@ -1689,7 +1653,6 @@ static void udd_ctrl_stall_data(void) udd_enable_stall_handshake(0); } - static void udd_ctrl_send_zlp_in(void) { irqflags_t flags; @@ -1707,7 +1670,6 @@ static void udd_ctrl_send_zlp_in(void) cpu_irq_restore(flags); } - static void udd_ctrl_send_zlp_out(void) { irqflags_t flags; @@ -1723,7 +1685,6 @@ static void udd_ctrl_send_zlp_out(void) cpu_irq_restore(flags); } - static void udd_ctrl_endofrequest(void) { // If a callback is registered then call it @@ -1732,7 +1693,6 @@ static void udd_ctrl_endofrequest(void) } } - static bool udd_ctrl_interrupt(void) { @@ -1783,7 +1743,6 @@ static bool udd_ctrl_interrupt(void) return false; } - // ------------------------ //--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS @@ -1798,7 +1757,6 @@ static void udd_ep_job_table_reset(void) } } - static void udd_ep_job_table_kill(void) { uint8_t i; @@ -1809,7 +1767,6 @@ static void udd_ep_job_table_kill(void) } } - static void udd_ep_abort_job(udd_ep_id_t ep) { ep &= USB_EP_ADDR_MASK; @@ -1818,7 +1775,6 @@ static void udd_ep_abort_job(udd_ep_id_t ep) udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep); } - static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num) { if (ptr_job->busy == false) { @@ -1889,7 +1845,6 @@ static void udd_ep_trans_done(udd_ep_id_t ep) udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT | UOTGHS_DEVDMACONTROL_CHANN_ENB; - // Disable IRQs to have a short sequence // between read of EOT_STA and DMA enable flags = cpu_irq_save(); diff --git a/Marlin/src/HAL/DUE/usb/uotghs_device_due.h b/Marlin/src/HAL/DUE/usb/uotghs_device_due.h index 6df26d63dfd4..99ad492c1f55 100644 --- a/Marlin/src/HAL/DUE/usb/uotghs_device_due.h +++ b/Marlin/src/HAL/DUE/usb/uotghs_device_due.h @@ -129,7 +129,6 @@ extern "C" { #define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI)) //! @} - //! @name UOTGHS device attach control //! These macros manage the UOTGHS Device attach. //! @{ @@ -141,7 +140,6 @@ extern "C" { #define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH)) //! @} - //! @name UOTGHS device bus events control //! These macros manage the UOTGHS Device bus events. //! @{ @@ -246,7 +244,6 @@ extern "C" { #define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk)) //! @} - //! @name UOTGHS Device endpoint drivers //! These macros manage the common features of the endpoints. //! @{ @@ -330,7 +327,6 @@ extern "C" { #define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk)) //! @} - //! @name UOTGHS Device control endpoint //! These macros control the endpoints. //! @{ @@ -530,7 +526,6 @@ extern "C" { //! Tests if IN sending interrupt is enabled #define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE)) - //! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint. //! @param ep Endpoint of which to access FIFO data register //! @param scale Data scale in bits: 64, 32, 16 or 8 @@ -652,7 +647,6 @@ typedef struct { //! @} //! @} - /// @cond 0 /**INDENT-OFF**/ #ifdef __cplusplus diff --git a/Marlin/src/HAL/DUE/usb/uotghs_otg.h b/Marlin/src/HAL/DUE/usb/uotghs_otg.h index f0e55c896fac..8c12a3e29199 100644 --- a/Marlin/src/HAL/DUE/usb/uotghs_otg.h +++ b/Marlin/src/HAL/DUE/usb/uotghs_otg.h @@ -53,7 +53,6 @@ extern "C" { #endif - //! \ingroup usb_group //! \defgroup otg_group UOTGHS OTG Driver //! UOTGHS low-level driver for OTG features @@ -74,7 +73,6 @@ bool otg_dual_enable(void); */ void otg_dual_disable(void); - //! @name UOTGHS OTG ID pin management //! The ID pin come from the USB OTG connector (A and B receptable) and //! allows to select the USB mode host or device. diff --git a/Marlin/src/HAL/DUE/usb/usb_protocol.h b/Marlin/src/HAL/DUE/usb/usb_protocol.h index 4540247df826..9bf0a1ba60c1 100644 --- a/Marlin/src/HAL/DUE/usb/usb_protocol.h +++ b/Marlin/src/HAL/DUE/usb/usb_protocol.h @@ -374,7 +374,6 @@ typedef struct { uint8_t bNumDeviceCaps; } usb_dev_bos_desc_t; - /** * \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure * @@ -411,7 +410,6 @@ typedef struct { uint8_t iFunction; //!< Index of string descriptor } usb_association_desc_t; - /** * \brief Standard USB configuration descriptor structure */ @@ -426,7 +424,6 @@ typedef struct { uint8_t bMaxPower; } usb_conf_desc_t; - #define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set #define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered #define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered @@ -475,7 +472,6 @@ typedef struct { uint8_t bInterval; } usb_ep_desc_t; - /** * \brief A standard USB string descriptor structure */ diff --git a/Marlin/src/HAL/DUE/usb/usb_protocol_cdc.h b/Marlin/src/HAL/DUE/usb/usb_protocol_cdc.h index 9b82afc6242b..769e7589bcc8 100644 --- a/Marlin/src/HAL/DUE/usb/usb_protocol_cdc.h +++ b/Marlin/src/HAL/DUE/usb/usb_protocol_cdc.h @@ -168,7 +168,6 @@ COMPILER_PACK_SET(1) //! \name USB CDC Descriptors //@{ - //! CDC Header Functional Descriptor typedef struct { uint8_t bFunctionLength; @@ -203,7 +202,6 @@ typedef struct { uint8_t bSlaveInterface0; } usb_cdc_union_desc_t; - //! \name USB CDC Call Management Capabilities //@{ //! Device handles call management itself @@ -278,7 +276,6 @@ typedef struct { //@} //@} - //! \name USB CDC notification message //@{ diff --git a/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h b/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h index cc30a94e4fc8..227a13dc533c 100644 --- a/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h +++ b/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h @@ -47,7 +47,6 @@ #ifndef _USB_PROTOCOL_MSC_H_ #define _USB_PROTOCOL_MSC_H_ - /** * \ingroup usb_protocol_group * \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions @@ -89,7 +88,6 @@ #define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only //@} - /** * \brief MSC USB requests (bRequest) */ @@ -98,7 +96,6 @@ enum usb_reqid_msc { USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN }; - COMPILER_PACK_SET(1) /** @@ -122,7 +119,6 @@ struct usb_msc_cbw { #define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength //@} - /** * \name A Command Status Wrapper (CSW). */ diff --git a/Marlin/src/HAL/LINUX/servo_private.h b/Marlin/src/HAL/LINUX/servo_private.h index bcc8d2037f90..11e1c2b93c62 100644 --- a/Marlin/src/HAL/LINUX/servo_private.h +++ b/Marlin/src/HAL/LINUX/servo_private.h @@ -60,7 +60,6 @@ #define INVALID_SERVO 255 // flag indicating an invalid servo index - // Types typedef struct { diff --git a/Marlin/src/HAL/LPC1768/win_usb_driver/lpc176x_usb_driver.inf b/Marlin/src/HAL/LPC1768/win_usb_driver/lpc176x_usb_driver.inf index 4732eb855242..37d9a617dbb5 100644 --- a/Marlin/src/HAL/LPC1768/win_usb_driver/lpc176x_usb_driver.inf +++ b/Marlin/src/HAL/LPC1768/win_usb_driver/lpc176x_usb_driver.inf @@ -8,14 +8,12 @@ DriverVer =04/14/2008, 5.1.2600.5512 [Manufacturer] %PROVIDER%=DeviceList,ntamd64 - [DeviceList] %DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00 [DeviceList.ntamd64] %DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00 - [LPC1768USB] include=mdmcpq.inf CopyFiles=FakeModemCopyFileSection @@ -28,9 +26,8 @@ AddService=usbser, 0x00000002, LowerFilter_Service_Inst [SerialPropPageAddReg] HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" - [Strings] PROVIDER = "marlinfw.org" DRIVER.SVC = "Marlin USB Driver" DESCRIPTION= "Marlin USB Serial" -COMPOSITE = "Marlin USB VCOM" \ No newline at end of file +COMPOSITE = "Marlin USB VCOM" diff --git a/Marlin/src/HAL/NATIVE_SIM/servo_private.h b/Marlin/src/HAL/NATIVE_SIM/servo_private.h index 06be1893f6eb..e0eb30ab2846 100644 --- a/Marlin/src/HAL/NATIVE_SIM/servo_private.h +++ b/Marlin/src/HAL/NATIVE_SIM/servo_private.h @@ -61,7 +61,6 @@ #define INVALID_SERVO 255 // flag indicating an invalid servo index - // Types typedef struct { diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h index c27c84e8c398..39af4d7e6844 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h @@ -31,7 +31,6 @@ * resulted in using about about 25% of the CPU's time. */ - #ifdef __cplusplus extern "C" { #endif diff --git a/Marlin/src/HAL/SAMD21/HAL.cpp b/Marlin/src/HAL/SAMD21/HAL.cpp index 1bc0406ab3f0..3656d97190e6 100644 --- a/Marlin/src/HAL/SAMD21/HAL.cpp +++ b/Marlin/src/HAL/SAMD21/HAL.cpp @@ -40,8 +40,6 @@ DefaultSerial3 MSerial2(false, Serial2); #endif - - #define WDT_CONFIG_PER_7_Val 0x9u #define WDT_CONFIG_PER_Pos 0 #define WDT_CONFIG_PER_7 (WDT_CONFIG_PER_7_Val << WDT_CONFIG_PER_Pos) @@ -165,7 +163,6 @@ void MarlinHAL::adc_init() { ADC->REFCTRL.reg = ADC_REFCTRL_REFSEL_INTVCC1; ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_32| ADC_AVGCTRL_ADJRES(4);; - ADC->CTRLB.reg = ADC_CTRLB_PRESCALER_DIV128 | ADC_CTRLB_RESSEL_16BIT | ADC_CTRLB_FREERUN; diff --git a/Marlin/src/HAL/SAMD21/HAL.h b/Marlin/src/HAL/SAMD21/HAL.h index fe7285954938..95f391fa8678 100644 --- a/Marlin/src/HAL/SAMD21/HAL.h +++ b/Marlin/src/HAL/SAMD21/HAL.h @@ -47,7 +47,6 @@ typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3; extern DefaultSerial2 MSerial0; extern DefaultSerial3 MSerial1; - #define __MSERIAL(X) MSerial##X #define _MSERIAL(X) __MSERIAL(X) #define MSERIAL(X) _MSERIAL(INCREMENT(X)) diff --git a/Marlin/src/HAL/SAMD21/SAMD21.h b/Marlin/src/HAL/SAMD21/SAMD21.h index 8e9d17fc5026..b64c5ce72555 100644 --- a/Marlin/src/HAL/SAMD21/SAMD21.h +++ b/Marlin/src/HAL/SAMD21/SAMD21.h @@ -57,8 +57,6 @@ : (P == 3 && WITHIN(B, 20, 21)) ? 10 + (B) - 20 \ : -1) - - #define A2_AIN 3 #define A3_AIN 4 #define A4_AIN 5 diff --git a/Marlin/src/HAL/SAMD21/Servo.cpp b/Marlin/src/HAL/SAMD21/Servo.cpp index 38b995fc9a05..704d0a2904ce 100644 --- a/Marlin/src/HAL/SAMD21/Servo.cpp +++ b/Marlin/src/HAL/SAMD21/Servo.cpp @@ -55,7 +55,6 @@ #define TIMER_TCCHANNEL(t) ((t) & 1) #define TC_COUNTER_START_VAL 0xFFFF - static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval) FORCE_INLINE static uint16_t getTimerCount() { diff --git a/Marlin/src/HAL/SAMD21/u8g/u8g_com_HAL_samd21_shared_hw_spi.cpp b/Marlin/src/HAL/SAMD21/u8g/u8g_com_HAL_samd21_shared_hw_spi.cpp index 42630a6ce5ca..2e2b0d8f8d22 100644 --- a/Marlin/src/HAL/SAMD21/u8g/u8g_com_HAL_samd21_shared_hw_spi.cpp +++ b/Marlin/src/HAL/SAMD21/u8g/u8g_com_HAL_samd21_shared_hw_spi.cpp @@ -85,7 +85,6 @@ void u8g_SetPILevel(u8g_t *u8g, uint8_t pin_index, uint8_t level) { uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { - switch (msg) { case U8G_COM_MSG_STOP: break; diff --git a/Marlin/src/HAL/SAMD51/Servo.cpp b/Marlin/src/HAL/SAMD51/Servo.cpp index e533eee30155..059955e11aac 100644 --- a/Marlin/src/HAL/SAMD51/Servo.cpp +++ b/Marlin/src/HAL/SAMD51/Servo.cpp @@ -54,7 +54,6 @@ #define TIMER_TCCHANNEL(t) ((t) & 1) #define TC_COUNTER_START_VAL 0xFFFF - static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval) FORCE_INLINE static uint16_t getTimerCount() { diff --git a/Marlin/src/HAL/STM32/inc/SanityCheck.h b/Marlin/src/HAL/STM32/inc/SanityCheck.h index 80d0314dbbd4..8bff51874eb5 100644 --- a/Marlin/src/HAL/STM32/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32/inc/SanityCheck.h @@ -28,7 +28,6 @@ // #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" //#endif - #if ENABLED(SDCARD_EEPROM_EMULATION) && !HAS_MEDIA #undef SDCARD_EEPROM_EMULATION // Avoid additional error noise #if USE_FALLBACK_EEPROM diff --git a/Marlin/src/HAL/STM32F1/HAL_N32.h b/Marlin/src/HAL/STM32F1/HAL_N32.h index 46ec7ba6db9c..7162e2b97147 100644 --- a/Marlin/src/HAL/STM32F1/HAL_N32.h +++ b/Marlin/src/HAL/STM32F1/HAL_N32.h @@ -850,7 +850,6 @@ typedef struct { __IO uint32_t BDCR; /* compatible */ __IO uint32_t CSR; /* compatible */ - __IO uint32_t AHBRSTR; /* Not compatible, ADC reset here settings */ __IO uint32_t CFGR2; /* Not compatible, ADC clock settings here */ __IO uint32_t CFGR3; /* Not compatible, add a new register */ diff --git a/Marlin/src/HAL/STM32F1/SPI.cpp b/Marlin/src/HAL/STM32F1/SPI.cpp index a180684757ee..ab111ddbf01b 100644 --- a/Marlin/src/HAL/STM32F1/SPI.cpp +++ b/Marlin/src/HAL/STM32F1/SPI.cpp @@ -517,7 +517,6 @@ uint8_t SPIClass::dmaSendAsync(const void * transmitBuf, uint16_t length, bool m return b; } - /** * New functions added to manage callbacks. * Victor Perez 2017 diff --git a/Marlin/src/HAL/STM32F1/maple_win_usb_driver/maple_serial.inf b/Marlin/src/HAL/STM32F1/maple_win_usb_driver/maple_serial.inf index c39f4ce0ed5d..0df30d2c42a4 100644 --- a/Marlin/src/HAL/STM32F1/maple_win_usb_driver/maple_serial.inf +++ b/Marlin/src/HAL/STM32F1/maple_win_usb_driver/maple_serial.inf @@ -48,7 +48,6 @@ ServiceBinary=%12%\usbser.sys ; String Definitions ;------------------------------------------------------------------------------ - [Strings] STM = "LeafLabs" MFGNAME = "LeafLabs" diff --git a/Marlin/src/HAL/STM32F1/onboard_sd.h b/Marlin/src/HAL/STM32F1/onboard_sd.h index f8846e95bcaa..be1d1d0a6bdc 100644 --- a/Marlin/src/HAL/STM32F1/onboard_sd.h +++ b/Marlin/src/HAL/STM32F1/onboard_sd.h @@ -47,7 +47,6 @@ typedef enum { RES_PARERR /* 4: Invalid Parameter */ } DRESULT; - #if _DISKIO_ISDIO /* Command structure for iSDIO ioctl command */ typedef struct { diff --git a/Marlin/src/HAL/STM32F1/sdio.h b/Marlin/src/HAL/STM32F1/sdio.h index 2371601e9920..08c884666d8c 100644 --- a/Marlin/src/HAL/STM32F1/sdio.h +++ b/Marlin/src/HAL/STM32F1/sdio.h @@ -60,7 +60,6 @@ #define ACMD41_SD_APP_OP_COND (uint16_t)(SDMMC_ACMD_SD_APP_OP_COND | SDIO_CMD_WAIT_SHORT_RESP) #define ACMD42_SD_APP_SET_CLR_CARD_DETECT (uint16_t)(SDMMC_ACMD_SD_APP_SET_CLR_CARD_DETECT | SDIO_CMD_WAIT_SHORT_RESP) - #define SDMMC_ALLZERO 0x00000000U #define SDMMC_OCR_ERRORBITS 0xFDFFE008U diff --git a/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp index 415c69222986..cda7e7d16cdf 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp @@ -120,7 +120,6 @@ void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI.endTransaction(); } - // Begin SPI transaction, set clock, bit order, data mode void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) { spiConfig = SPISettings(spiClock, bitOrder, dataMode); diff --git a/Marlin/src/HAL/shared/Delay.cpp b/Marlin/src/HAL/shared/Delay.cpp index fd52eb2c6a39..bfcf6bcc42ef 100644 --- a/Marlin/src/HAL/shared/Delay.cpp +++ b/Marlin/src/HAL/shared/Delay.cpp @@ -161,7 +161,6 @@ } #endif // MARLIN_DEV_MODE - #else void calibrate_delay_loop() {} diff --git a/Marlin/src/HAL/shared/backtrace/unwarm.cpp b/Marlin/src/HAL/shared/backtrace/unwarm.cpp index e72a02e487cd..823f54c157b4 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarm.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwarm.cpp @@ -50,7 +50,6 @@ void UnwInvalidateRegisterFile(RegData *regFile) { } while (t < 13); } - /** * Initialize the data used for unwinding. */ @@ -129,7 +128,6 @@ bool UnwReportRetAddr(UnwState * const state, uint32_t addr) { return state->cb->report((void *)state->reportData, &entry); } - /** * Write some register to memory. * This will store some register and meta data onto the virtual stack. diff --git a/Marlin/src/HAL/shared/backtrace/unwarm.h b/Marlin/src/HAL/shared/backtrace/unwarm.h index edae90650e29..72ea0b062767 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarm.h +++ b/Marlin/src/HAL/shared/backtrace/unwarm.h @@ -41,7 +41,6 @@ typedef enum { REG_VAL_ARITHMETIC = 0x80 } RegValOrigin; - /** Type for tracking information about a register. * This stores the register value, as well as other data that helps unwinding. */ @@ -56,7 +55,6 @@ typedef struct { int o; /* (RegValOrigin) */ } RegData; - /** Structure used to track reads and writes to memory. * This structure is used as a hash to store a small number of writes * to memory. @@ -81,7 +79,6 @@ typedef struct { uint8_t tracked[(MEM_HASH_SIZE + 7) / 8]; } MemData; - /** Structure that is used to keep track of unwinding meta-data. * This data is passed between all the unwinding functions. */ diff --git a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp index d478255678cf..f4435c733e06 100644 --- a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp +++ b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp @@ -26,7 +26,6 @@ #if defined(__arm__) || defined(__thumb__) - /* On ARM CPUs exception handling is quite powerful. diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 6fccde8e89e8..2e7ea743273f 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -615,7 +615,6 @@ void unified_bed_leveling::G29() { #endif // UBL_DEVEL_DEBUGGING - // // Load a Mesh from the EEPROM // diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index 9a8e369c6a39..135178456b73 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -27,7 +27,6 @@ //todo: try faster I2C speed; tweak TWI_FREQ (400000L, or faster?); or just TWBR = ((CPU_FREQ / 400000L) - 16) / 2; //todo: consider Marlin-optimized Wire library; i.e. MarlinWire, like MarlinSerial - #include "../inc/MarlinConfig.h" #if ENABLED(I2C_POSITION_ENCODERS) @@ -462,7 +461,6 @@ void I2CPositionEncoder::reset() { TERN_(I2CPE_ERR_ROLLING_AVERAGE, ZERO(err)); } - bool I2CPositionEncodersMgr::I2CPE_anyaxis; uint8_t I2CPositionEncodersMgr::I2CPE_addr, I2CPositionEncodersMgr::I2CPE_idx; diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index b4ef18a9b980..8f2edad158dd 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -263,5 +263,4 @@ void FWRetract::M208_report() { #endif // FWRETRACT_AUTORETRACT - #endif // FWRETRACT diff --git a/Marlin/src/feature/meatpack.h b/Marlin/src/feature/meatpack.h index 37039c3056ed..0de1f792c139 100644 --- a/Marlin/src/feature/meatpack.h +++ b/Marlin/src/feature/meatpack.h @@ -144,7 +144,6 @@ struct MeatpackSerial : public SerialBase > { void flushTX() { CALL_IF_EXISTS(void, &out, flushTX); } SerialFeature features(serial_index_t index) const { return SerialFeature::MeatPack | CALL_IF_EXISTS(SerialFeature, &out, features, index); } - int available(serial_index_t index) { if (charCount) return charCount; // The buffer still has data if (out.available(index) <= 0) return 0; // No data to read diff --git a/Marlin/src/feature/mmu/mmu2-serial-protocol.md b/Marlin/src/feature/mmu/mmu2-serial-protocol.md index 42f30e418d1d..088d41b44693 100644 --- a/Marlin/src/feature/mmu/mmu2-serial-protocol.md +++ b/Marlin/src/feature/mmu/mmu2-serial-protocol.md @@ -28,11 +28,8 @@ Now we are sure MMU is available and ready. If there was a timeout or other comm - *Build number* is an integer value and has to be >=126, or =>132 if 12V mode is enabled - *FINDA status* is 1 if the filament is loaded to the extruder, 0 otherwise - *Build number* is checked against the required value, if it does not match, printer is halted. - - Toolchange ========== @@ -54,7 +51,6 @@ When done, the MMU sends We don't wait for a response here but immediately continue with the next G-code which should be one or more extruder moves to feed the filament into the hotend. - FINDA status ============ @@ -63,8 +59,6 @@ FINDA status *FINDA status* is 1 if the is filament loaded to the extruder, 0 otherwise. This could be used as filament runout sensor if probed regularly. - - Load filament ============= @@ -74,7 +68,6 @@ MMU will feed filament down to the extruder, when done - MMU => 'ok\n' - Unload filament ============= @@ -84,8 +77,6 @@ MMU will retract current filament from the extruder, when done - MMU => 'ok\n' - - Eject filament ============== diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 43c034020ad3..c95c39f27387 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -341,7 +341,6 @@ class FilamentSensorBase { } }; - /********************************* RESPONSE TYPE *********************************/ #if HAS_FILAMENT_RUNOUT_DISTANCE diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index 8908ae6df524..681df2f081e7 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -38,7 +38,6 @@ #define PCT_TO_PWM(X) ((X) * 255 / 100) #define PCT_TO_SERVO(X) ((X) * 180 / 100) - // Laser/Cutter operation mode enum CutterMode : int8_t { CUTTER_MODE_ERROR = -1, diff --git a/Marlin/src/feature/stepper_driver_safety.h b/Marlin/src/feature/stepper_driver_safety.h index 46edf3390d77..ac3d8b64f9f4 100644 --- a/Marlin/src/feature/stepper_driver_safety.h +++ b/Marlin/src/feature/stepper_driver_safety.h @@ -21,7 +21,6 @@ */ #pragma once - #include "../inc/MarlinConfigPre.h" void stepper_driver_backward_check(); diff --git a/Marlin/src/feature/twibus.h b/Marlin/src/feature/twibus.h index 806e2a147a7d..de23abbed53c 100644 --- a/Marlin/src/feature/twibus.h +++ b/Marlin/src/feature/twibus.h @@ -74,7 +74,6 @@ class TWIBus { */ uint8_t buffer[TWIBUS_BUFFER_SIZE]; - public: /** * @brief Target device address diff --git a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp index b05a8e81d9e9..dd1ba06a7832 100644 --- a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp +++ b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp @@ -449,7 +449,6 @@ static const hd44780_charmap_t g_hd44780_charmap_device[] PROGMEM = { {IV('⭢'), 0xC7, 0}, {IV('⭣'), 0xC6, 0}, - {IV('⯆'), 0xF5, 0}, {IV('⯇'), 0xF7, 0}, // ⯅ {IV('⯈'), 0xF6, 0}, @@ -500,7 +499,6 @@ static const hd44780_charmap_t g_hd44780_charmap_device[] PROGMEM = { //{IV(''), 0x9E, 0}, //{IV(''), 0x9F, 0}, - {IV('¼'), 0xF0, 0}, // 00BC {IV('⅓'), 0xF1, 0}, {IV('½'), 0xF2, 0}, // 00BD diff --git a/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp index 666ad2bbc166..c0b9975014d1 100644 --- a/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp @@ -446,7 +446,6 @@ static const TFTGLCD_charmap_t g_TFTGLCD_charmap_device[] PROGMEM = { {IV('⭢'), 0xC7, 0}, {IV('⭣'), 0xC6, 0}, - {IV('⯆'), 0xF5, 0}, {IV('⯇'), 0xF7, 0}, // ⯅ {IV('⯈'), 0xF6, 0}, diff --git a/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h index dc40aba04628..f07064ea7165 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h @@ -103,7 +103,6 @@ class U8GLIB_TFT_320X240_UPSCALE_FROM_128X64 : public U8GLIB { void init(uint8_t cs, uint8_t rs, uint8_t reset=U8G_PIN_NONE) { U8GLIB::init(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset); } }; - extern u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini12864_HAL_2x_hw_spi; class U8GLIB_MINI12864_2X_HAL : public U8GLIB { diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 5d1a3363fb1d..24165019b473 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -376,7 +376,6 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co #define BAR_TALL (STATUS_HEATERS_HEIGHT - 2) - // Draw a heating progress bar, if specified #if ANY(STATUS_HEAT_PERCENT, STATUS_HEAT_POWER) uint8_t tall = 0; diff --git a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp index b3e579e6a44a..5865bb11873b 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp @@ -230,12 +230,10 @@ uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg); } - uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ; u8g_pb_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf}; u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire = { u8g_dev_ssd1306_128x64_2x_2_wire_fn, &u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL }; - ///////////////////////////////////////////////////////////////////////////////////////////// // This routine adds the instruction byte in between the command bytes. This makes the init diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index 63e7b2e2b8b5..6c7066179eb0 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -234,7 +234,6 @@ uint8_t u8g_dev_st7565_64128n_HAL_2x_buf[WIDTH*2] U8G_NOCOMMON ; u8g_pb_t u8g_dev_st7565_64128n_HAL_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_st7565_64128n_HAL_2x_buf}; u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_sw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_SW_SPI_FN }; - U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_hw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_HW_SPI_FN); u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN }; diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index ae1531e9f8df..d5f1be18ec95 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -84,19 +84,19 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = { void clear_graphics_DRAM(u8g_t *u8g, u8g_dev_t *dev) { u8g_SetChipSelect(u8g, dev, 1); u8g_Delay(1); - u8g_SetAddress(u8g, dev, 0); // cmd mode - u8g_WriteByte(u8g, dev, 0x08); //display off, cursor+blink off - u8g_WriteByte(u8g, dev, 0x3E); //extended mode + GDRAM active - for (uint8_t y = 0; y < (LCD_PIXEL_HEIGHT) / 2; ++y) { //clear GDRAM - u8g_WriteByte(u8g, dev, 0x80 | y); //set y - u8g_WriteByte(u8g, dev, 0x80); //set x = 0 - u8g_SetAddress(u8g, dev, 1); /* data mode */ - for (uint8_t i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; ++i) //2x width clears both segments + u8g_SetAddress(u8g, dev, 0); // Cmd mode + u8g_WriteByte(u8g, dev, 0x08); // Display off, cursor+blink off + u8g_WriteByte(u8g, dev, 0x3E); // Extended mode + GDRAM active + for (uint8_t y = 0; y < (LCD_PIXEL_HEIGHT) / 2; ++y) { // Clear GDRAM + u8g_WriteByte(u8g, dev, 0x80 | y); // Set y + u8g_WriteByte(u8g, dev, 0x80); // Set x = 0 + u8g_SetAddress(u8g, dev, 1); // Data mode + for (uint8_t i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; ++i) // 2x width clears both segments u8g_WriteByte(u8g, dev, 0); - u8g_SetAddress(u8g, dev, 0); /* cmd mode */ + u8g_SetAddress(u8g, dev, 0); // Cmd mode } - u8g_WriteByte(u8g, dev, 0x0C); //display on, cursor+blink off + u8g_WriteByte(u8g, dev, 0x0C); // Display on, cursor+blink off u8g_SetChipSelect(u8g, dev, 0); } diff --git a/Marlin/src/lcd/e3v2/common/dwin_api.h b/Marlin/src/lcd/e3v2/common/dwin_api.h index f2392af55cdb..fe2105baea07 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_api.h +++ b/Marlin/src/lcd/e3v2/common/dwin_api.h @@ -162,7 +162,6 @@ inline void dwinDrawBox(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t void dwinFrameAreaMove(uint8_t mode, uint8_t dir, uint16_t dis, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); - /*---------------------------------------- Text related functions ----------------------------------------*/ // Draw a string diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h index 5d3813101455..03f55233e251 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h @@ -525,7 +525,6 @@ const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = { {IV('⭢'), 0xC7, 0}, {IV('⭣'), 0xC6, 0}, - {IV('⯆'), 0xF5, 0}, {IV('⯇'), 0xF7, 0}, // ⯅ {IV('⯈'), 0xF6, 0}, @@ -576,7 +575,6 @@ const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = { //{IV(''), 0x9E, 0}, //{IV(''), 0x9F, 0}, - {IV('¼'), 0xF0, 0}, // 00BC {IV('⅓'), 0xF1, 0}, {IV('½'), 0xF2, 0}, // 00BD diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h index 371066a56900..514e8c7303d6 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h @@ -281,7 +281,6 @@ #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 diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h index 53e57e1c65bb..da2cf96a8725 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h @@ -241,7 +241,6 @@ enum DGUS_ScreenID : uint8_t { DGUS_SCREEN_UNUSED = 255 }; - // Place for status messages. constexpr uint16_t VP_M117 = 0x7020; constexpr uint8_t VP_M117_LEN = 0x20; @@ -299,7 +298,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040; constexpr uint16_t VP_MARLIN_VERSION = 0x1A00; constexpr uint8_t VP_MARLIN_VERSION_LEN = 16; // there is more space on the display, if needed. - constexpr uint16_t VP_SCREENCHANGE_ASK = 0x1500; constexpr uint16_t VP_SCREENCHANGE = 0x1501; // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte. constexpr uint16_t VP_TEMP_ALL_OFF = 0x1502; // Turn all heaters off. Value arbitrary ;)= @@ -515,7 +513,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040; constexpr uint16_t VP_TMC_E1_Current = 0x3442; constexpr uint16_t VP_TMC_Z1_Current = 0x3444; - constexpr uint16_t VP_PrintTime_H = 0x3500; constexpr uint16_t VP_PrintTime_M = 0x3502; constexpr uint16_t VP_PrintTime_S = 0x3504; @@ -591,7 +588,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040; constexpr uint16_t VP_Level_Point_Five_X = 0x4110; constexpr uint16_t VP_Level_Point_Five_Y = 0x4112; - /* H43 Version */ constexpr uint16_t VP_MKS_H43_VERSION = 0x4A00; // MKS H43 V1.0.0 constexpr uint16_t VP_MKS_H43_VERSION_LEN = 16; @@ -630,7 +626,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040; constexpr uint16_t VP_E0_Max_Acc_Speed_Dis = 0x5210; constexpr uint16_t VP_E1_Max_Acc_Speed_Dis = 0x5220; - constexpr uint16_t VP_PrintTime_Dis = 0x5470; constexpr uint16_t VP_E0_Temp_Dis = 0x5310; constexpr uint16_t VP_E1_Temp_Dis = 0x5320; @@ -641,12 +636,10 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040; constexpr uint16_t VP_Min_Ex_Temp_Dis = 0x5380; - constexpr uint16_t VP_X_PARK_POS_Dis = 0x53E0; constexpr uint16_t VP_Y_PARK_POS_Dis = 0x53F0; constexpr uint16_t VP_Z_PARK_POS_Dis = 0x5400; - constexpr uint16_t VP_TravelAcc_Dis = 0x5440; constexpr uint16_t VP_FeedRateMin_Dis = 0x5450; constexpr uint16_t VP_TravelFeeRateMin_Dis = 0x5460; diff --git a/Marlin/src/lcd/extui/dgus_e3s1pro/definition/DGUS_ScreenAddrList.cpp b/Marlin/src/lcd/extui/dgus_e3s1pro/definition/DGUS_ScreenAddrList.cpp index 00083ced8cce..7f2697513ae8 100644 --- a/Marlin/src/lcd/extui/dgus_e3s1pro/definition/DGUS_ScreenAddrList.cpp +++ b/Marlin/src/lcd/extui/dgus_e3s1pro/definition/DGUS_ScreenAddrList.cpp @@ -153,7 +153,6 @@ constexpr DGUS_Addr LIST_CONTROL[] PROGMEM = { DGUS_Addr::END }; - constexpr DGUS_Addr LIST_ADJUST[] PROGMEM = { DGUS_Addr::ADJUST_Icon_Adjust, DGUS_Addr::IO_Icon_ExtruderTemp, diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h index 3e2b5546e918..162c32b9562b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h @@ -22,7 +22,6 @@ #pragma once - /********************************* DL CACHE SLOTS ******************************/ // In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp index fd73ca0a4bf1..df29ac4d2309 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp @@ -38,7 +38,6 @@ void StatisticsScreen::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { char buffer[21]; - cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h index 5168ef76af4a..b219bd88e166 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h @@ -248,7 +248,6 @@ #endif - /* this data is used to patch FT813 displays that use a GT911 as a touch-controller */ #ifdef PATCH_GT911 constexpr PROGMEM unsigned char GT911_data[] = { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp index 7fccb309f56b..dd2e477d9f2c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp @@ -71,7 +71,6 @@ void UIData::set_persistent_data(uint8_t value) { flags.value = value & get_persistent_data_mask(); } - void UIData::enable_touch_sounds(bool enabled) { UIData::flags.bits.touch_start_sound = enabled; UIData::flags.bits.touch_end_sound = enabled; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h index 30b1f8439955..6a1a703e45a3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h @@ -100,7 +100,6 @@ const uint8_t cyrillic_font_widths[] PROGMEM = { 21, // ё }; - /* This is a dump of "font_bitmaps/cyrillic_char_set_bitmap_31.png" * using the tool "bitmap2cpp.py". The tool converts the image into * 16-level grayscale and packs two pixels per byte. The resulting diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp index 9ff738e45c19..c087bf41b58c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp @@ -19,7 +19,6 @@ * location: . * ****************************************************************************/ - #include "../../../../MarlinCore.h" #if ENABLED(TOUCH_UI_FTDI_EVE) #include "language.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp index c7607f71d071..b17ac9c7cbaa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp @@ -26,7 +26,6 @@ #include "screens.h" tiny_timer_t refresh_timer; - /** * DECL_SCREEN_IF_INCLUDED allows for a concise * definition of SCREEN_TABLE: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp index d8407406a1eb..49967be086e9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp @@ -165,7 +165,6 @@ namespace Theme { {ORGAN, NOTE_A4, 4}, {SILENCE, REST, 36}, - {ORGAN, NOTE_C5S, 4}, {ORGAN, NOTE_D5, 2}, {ORGAN, NOTE_E5, 2}, diff --git a/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp b/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp index f16bdde29aae..3254da3a3762 100644 --- a/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp @@ -91,7 +91,6 @@ void FileNavigator::getFiles(uint16_t index) { } lastindex = index; - // Clear currently drawn screen for (int i = 0; i < DISPLAY_FILES; i++) { for (int j = 0; j < 20; j++) diff --git a/Marlin/src/lcd/extui/malyan/malyan.cpp b/Marlin/src/lcd/extui/malyan/malyan.cpp index c2e6bcdb7dd1..4eb5ceaf5f05 100644 --- a/Marlin/src/lcd/extui/malyan/malyan.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan.cpp @@ -106,7 +106,6 @@ void set_lcd_error(FSTR_P const error, FSTR_P const component/*=nullptr*/) { write_to_lcd(F("}")); } - /** * Process an LCD 'C' command. * These are currently all temperature commands diff --git a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp index 2c6dda512167..0554c34a19ac 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp @@ -158,7 +158,6 @@ void SPIFlashStorage::beginWrite(const uint32_t startAddress) { #endif } - void SPIFlashStorage::endWrite() { // Flush remaining data #if HAS_SPI_FLASH_COMPRESSION diff --git a/Marlin/src/lcd/extui/mks_ui/draw_wifi.h b/Marlin/src/lcd/extui/mks_ui/draw_wifi.h index a89bbd67d8c2..18cfd0755c1f 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_wifi.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi.h @@ -25,7 +25,6 @@ extern "C" { #endif - void lv_draw_wifi(); void lv_clear_wifi(); void disp_wifi_state(); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h b/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h index a289a80dc773..6f1499a06833 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h @@ -25,7 +25,6 @@ extern "C" { #endif - void lv_draw_wifi_tips(); void lv_clear_wifi_tips(); diff --git a/Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h index f0b19d4e0275..35c753ad1ac3 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h @@ -154,7 +154,6 @@ #define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_FR "Chargement terminé,\n pour revenir!" #define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_FR "Déchargement terminé,\n pour revenir!" - #define PRE_HEAT_EXT_TEXT_FR "E" #define PRE_HEAT_BED_TEXT_FR "Bed" diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h index 80335b7370f7..d847cfb1933b 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h @@ -40,11 +40,7 @@ void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * co bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data); bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); -void LCD_Clear(uint16_t color); -void tft_set_point(uint16_t x, uint16_t y, uint16_t point); -void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t height); -void LCD_WriteRAM_Prepare(); -void lcd_draw_logo(); +void lcdClear(uint16_t color); void lv_encoder_pin_init(); void lv_update_encoder(); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index 2cb9aa2288ae..c96da22b60d0 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -467,7 +467,6 @@ namespace LanguageNarrow_pl { LSTR MSG_GAMES = _UxGT("Gry"); - LSTR MSG_EDIT_PASSWORD = _UxGT("Zmień hasło"); LSTR MSG_LOGIN_REQUIRED = _UxGT("Wymagane zalogowanie"); LSTR MSG_PASSWORD_SETTINGS = _UxGT("Ustawienia hasła"); diff --git a/Marlin/src/lcd/language/language_test.h b/Marlin/src/lcd/language/language_test.h index 6e160a6b02f7..fa022ef6ee7e 100644 --- a/Marlin/src/lcd/language/language_test.h +++ b/Marlin/src/lcd/language/language_test.h @@ -44,22 +44,18 @@ // Kanji (an other Japanese symbol set) uses far more than two codepages. So currently I don't see a chance to map the Unicodes. Its not // impossible to have a close to direct mapping but will need giant conversion tables and fonts (we don't want to have in a embedded system). - // Select the better font for full graphic displays. //#define DISPLAY_CHARSET_ISO10646_1 //#define DISPLAY_CHARSET_ISO10646_5 //#define DISPLAY_CHARSET_ISO10646_GREEK //#define DISPLAY_CHARSET_ISO10646_KANA - - // next 5 lines select variants in this file only #define DISPLAYTEST //#define WEST //#define CYRIL //#define KANA - // TESTSTRINGS #define STRG_ASCII_2 _UxGT(" !\"#$%&'()*+,-./") diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index cc20c8955f24..150739b1748a 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -638,7 +638,6 @@ namespace LanguageNarrow_uk { LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Не забудь зберегти!"); LSTR MSG_PASSWORD_REMOVED = _UxGT("Пароль видалений"); - // // Filament Change screens show up to 2 lines on a 3-line display // diff --git a/Marlin/src/lcd/menu/game/invaders.cpp b/Marlin/src/lcd/menu/game/invaders.cpp index 1cb3e5bf3fcb..588523854f94 100644 --- a/Marlin/src/lcd/menu/game/invaders.cpp +++ b/Marlin/src/lcd/menu/game/invaders.cpp @@ -193,7 +193,6 @@ inline void reset_invaders() { reset_bullets(); } - inline void spawn_ufo() { idat.ufov = random(0, 2) ? 1 : -1; idat.ufox = idat.ufov > 0 ? -(UFO_W) : LCD_PIXEL_WIDTH - 1; diff --git a/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp b/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp index 40012d7501fe..1c2c7fd21a0a 100644 --- a/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp @@ -45,7 +45,6 @@ extern const uint8_t Helvetica_Symbols_19[45] = { 8,7,7,9,0,11,60,102,195,195,195,102,60, }; - // Helvetica, capital 'A' height: 19px extern const uint8_t Helvetica_19[7298] = { 129,19,32,0,255,0,24,251, // unifont_t diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/LICENSE-OFL-1.1 b/Marlin/src/lcd/tft/fontdata/Unifont/LICENSE-OFL-1.1 index 84a393463d81..6f3809cc48e6 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/LICENSE-OFL-1.1 +++ b/Marlin/src/lcd/tft/fontdata/Unifont/LICENSE-OFL-1.1 @@ -1,7 +1,6 @@ The SIL Open Font License version 1.1 is copied below, and is also available with a FAQ at http://scripts.sil.org/OFL. - ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp index ad1a53c4556f..edf326cb979e 100644 --- a/Marlin/src/lcd/tft/tft_string.cpp +++ b/Marlin/src/lcd/tft/tft_string.cpp @@ -40,7 +40,6 @@ unifont_t *TFT_String::font_header; uint16_t TFT_String::extra_count; #endif - uint16_t TFT_String::data[]; uint16_t TFT_String::span; uint8_t TFT_String::length; diff --git a/Marlin/src/lcd/tft/ui_color_ui.cpp b/Marlin/src/lcd/tft/ui_color_ui.cpp index d6f3d2eff7fa..4febd29865d4 100644 --- a/Marlin/src/lcd/tft/ui_color_ui.cpp +++ b/Marlin/src/lcd/tft/ui_color_ui.cpp @@ -279,7 +279,6 @@ void MarlinUI::draw_status_screen() { tft.add_text(Z_VALUE_X - offset, Z_VALUE_Y, nhz ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string); #endif - #if ENABLED(LCD_SHOW_E_TOTAL) && defined(E_MARK_X) && defined(E_MARK_Y) && defined(E_VALUE_X) && defined(E_VALUE_Y) tft.add_text(E_MARK_X, E_MARK_Y, COLOR_AXIS_HOMED, "E"); if (printingIsActive()) { diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp index 13c8d60d1c83..a1766b067605 100644 --- a/Marlin/src/lcd/tft/ui_common.cpp +++ b/Marlin/src/lcd/tft/ui_common.cpp @@ -265,7 +265,6 @@ void drawBtn(const int x, const int y, const char *label, intptr_t data, const M TERN_(TOUCH_SCREEN, if (enabled) touch.add_control(BUTTON, x, y, width, height, data)); } - // // lcdprint.h functions // diff --git a/Marlin/src/lcd/tft_io/ili9328.h b/Marlin/src/lcd/tft_io/ili9328.h index 823835f4483c..591a4ec2edf0 100644 --- a/Marlin/src/lcd/tft_io/ili9328.h +++ b/Marlin/src/lcd/tft_io/ili9328.h @@ -65,7 +65,6 @@ #define ILI9328_ETMOD_DATA (ILI9328_ETMOD_ORIENTATION) | (ILI9328_ETMOD_COLOR) - #define ILI9328_RDDID 0x00 // ID code - 0x9328 #define ILI9328_DRVCTL 0x01 // Driver Output Control #define ILI9328_LCDCTL 0x02 // LCD Driving Wave Control @@ -128,7 +127,6 @@ #define ILI9328_RDOTP 0xA2 // OTP VCM Status and Enable #define ILI9328_OTPPKEY 0xA5 // OTP Programming ID Key - static const uint16_t ili9328_init[] = { DATASIZE_16BIT, ESC_REG(ILI9328_DRVCTL), ILI9328_DRVCTL_DATA, diff --git a/Marlin/src/lcd/tft_io/ili9341.h b/Marlin/src/lcd/tft_io/ili9341.h index 4488287430bd..d3a3483e9cad 100644 --- a/Marlin/src/lcd/tft_io/ili9341.h +++ b/Marlin/src/lcd/tft_io/ili9341.h @@ -136,7 +136,6 @@ #define ILI9341_IFCTL 0xF6 // Interface Control #define ILI9341_PUMPRCTL 0xF7 // Pump ratio control - static const uint16_t ili9341_init[] = { DATASIZE_8BIT, ESC_REG(ILI9341_SWRESET), ESC_DELAY(100), diff --git a/Marlin/src/lcd/tft_io/r65105.h b/Marlin/src/lcd/tft_io/r65105.h index 4cc8c999426e..70443a0e045b 100644 --- a/Marlin/src/lcd/tft_io/r65105.h +++ b/Marlin/src/lcd/tft_io/r65105.h @@ -67,7 +67,6 @@ #define R61505_ETMOD_DATA (R61505_ETMOD_ORIENTATION) | (R61505_ETMOD_COLOR) - #define R61505_RDDID 0x00 // ID code - 0x1505 #define R61505_DRVCTL 0x01 // Driver Output Control #define R61505_LCDCTL 0x02 // LCD Driving Wave Control @@ -129,7 +128,6 @@ #define R61505_OSC_CTRL 0xA4 // Oscillation Control - static const uint16_t r61505_init[] = { DATASIZE_16BIT, ESC_REG(R61505_DRVCTL), R61505_DRVCTL_DATA, diff --git a/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp b/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp index 073a7ed0b6ec..3d4d3fcd3fdb 100644 --- a/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp +++ b/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp @@ -142,7 +142,6 @@ HSD_sink_res heatshrink_decoder_sink(heatshrink_decoder *hsd, return HSDR_SINK_OK; } - /***************** * Decompression * *****************/ diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index b76f11b9849c..c6b093644755 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -380,7 +380,6 @@ void report_current_position_projected() { #endif // CARTESIAN - void home_if_needed(const bool keeplev/*=false*/) { if (!all_axes_trusted()) gcode.home_all_axes(keeplev); } diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 42eee677cbc6..856e70e5821a 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -125,7 +125,6 @@ enum BlockFlagBit { // Direct stepping page OPTARG(DIRECT_STEPPING, BLOCK_BIT_PAGE) - // Sync the fan speeds from the block OPTARG(LASER_SYNCHRONOUS_M106_M107, BLOCK_BIT_SYNC_FANS) @@ -454,7 +453,6 @@ class Planner { static uint16_t cleaning_buffer_counter; // A counter to disable queuing of blocks static uint8_t delay_before_delivering; // This counter delays delivery of blocks when queue becomes empty to allow the opportunity of merging blocks - #if ENABLED(DISTINCT_E_FACTORS) static uint8_t last_extruder; // Respond to extruder change #endif diff --git a/Marlin/src/pins/pinsDebug.h b/Marlin/src/pins/pinsDebug.h index 9181a5b9da29..c2735d27b8db 100644 --- a/Marlin/src/pins/pinsDebug.h +++ b/Marlin/src/pins/pinsDebug.h @@ -81,7 +81,6 @@ #define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(NAME, COUNTER, true) #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false) - typedef struct { PGM_P const name; pin_t pin; diff --git a/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h b/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h index 9c635706202c..476375203c6b 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h +++ b/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h @@ -48,7 +48,6 @@ * Once installed select the SANGUINO board and then select the CPU. */ - #define BOARD_INFO_NAME "Gen6 Deluxe" #include "pins_GEN6.h" diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 94c1b02e0e58..f878118d2f0d 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -1295,7 +1295,6 @@ static void print2u(const uint8_t v) { * \param[in] fatDate The date field from a directory entry. */ - /** * %Print a directory date field. * @@ -1312,7 +1311,6 @@ void SdBaseFile::printFatDate(const uint16_t fatDate) { print2u(FAT_DAY(fatDate)); } - /** * %Print a directory time field. * diff --git a/Marlin/src/sd/SdBaseFile.h b/Marlin/src/sd/SdBaseFile.h index b806a3cd7021..dc31e8492d2c 100644 --- a/Marlin/src/sd/SdBaseFile.h +++ b/Marlin/src/sd/SdBaseFile.h @@ -67,7 +67,6 @@ uint8_t const LS_DATE = 1, // ls() flag to print modify date LS_SIZE = 2, // ls() flag to print file size LS_R = 4; // ls() flag for recursive list of subdirectories - // flags for timestamp uint8_t const T_ACCESS = 1, // Set the file's last access date T_CREATE = 2, // Set the file's creation date and time diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h index 2b6e1be52274..16b8c092cc67 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h @@ -201,8 +201,6 @@ typedef struct { uint16_t wLength; // 6 Depends on bRequest } __attribute__((packed)) SETUP_PKT, *PSETUP_PKT; - - // Base class for incoming data parser class USBReadParser { diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp index 1aeef1703fec..551fb274d781 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp @@ -796,7 +796,6 @@ uint8_t BulkOnly::RequestSense(uint8_t lun, uint16_t size, uint8_t *buf) { return Transaction(&cbw, size, buf); } - //////////////////////////////////////////////////////////////////////////////// // USB code //////////////////////////////////////////////////////////////////////////////// @@ -1148,7 +1147,6 @@ uint8_t BulkOnly::HandleSCSIError(uint8_t status) { } // switch } - //////////////////////////////////////////////////////////////////////////////// // Debugging code //////////////////////////////////////////////////////////////////////////////// diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h index 99c628f888d3..f4d2af517655 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h @@ -79,7 +79,6 @@ #define HID_DESCRIPTOR_HID 0x21 - /* OTG SET FEATURE Constants */ #define OTG_FEATURE_B_HNP_ENABLE 3 // SET FEATURE OTG - Enable B device to perform HNP #define OTG_FEATURE_A_HNP_SUPPORT 4 // SET FEATURE OTG - A device supports HNP @@ -92,7 +91,6 @@ #define USB_TRANSFER_TYPE_INTERRUPT 0x03 // Endpoint is an interrupt endpoint. #define bmUSB_TRANSFER_TYPE 0x03 // bit mask to separate transfer type from ISO attributes - /* Standard Feature Selectors for CLEAR_FEATURE Requests */ #define USB_FEATURE_ENDPOINT_STALL 0 // Endpoint recipient #define USB_FEATURE_DEVICE_REMOTE_WAKEUP 1 // Device recipient diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt index 378786f940f3..f543bbaa6421 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt @@ -5,14 +5,12 @@ The lib-uhs3/ folder contains a subset of the files from the USB Host Shield https://github.com/felis/UHS30 - ==== LICENSE SUMMARY ==== Source Path: Repository: License: ------------ ----------- -------- usb_flashdrive/lib github.com/felis/UHS30 GPLv2 or later - ==== MARLIN INTEGRATION WORK ==== All additional work done to integrate USB into Marlin was performed by diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h index b35e53686e8a..c94e7ab990d9 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h @@ -27,7 +27,6 @@ e-mail : support@circuitsathome.com #ifndef __UHS_BULK_STORAGE_H__ #define __UHS_BULK_STORAGE_H__ - //////////////////////////////////////////////////////////////////////////////// // Define any of these options at the top of your sketch to override // the defaults contained herewith. Do NOT do modifications here. @@ -201,7 +200,6 @@ class UHS_Bulk_Storage : public UHS_USBInterface { uint8_t SCSITransaction6(SCSI_CDB6_t *cdb, uint16_t buf_size, void *buf, uint8_t dir); uint8_t SCSITransaction10(SCSI_CDB10_t *cdb, uint16_t buf_size, void *buf, uint8_t dir); - // Configure and internal methods, these should never be called by a user's sketch. uint8_t Start(); bool OKtoEnumerate(ENUMERATION_INFO *ei); @@ -211,12 +209,10 @@ class UHS_Bulk_Storage : public UHS_USBInterface { return bAddress; }; - void Poll(); void DriverDefaults(); - private: void Reset(); void CheckMedia(); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h index 37ba681c5c7b..06deb7a0ae8b 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h @@ -41,9 +41,7 @@ e-mail : support@circuitsathome.com #endif //////////////////////////////////////////////////////////////////////////////// - // Interface code - //////////////////////////////////////////////////////////////////////////////// /** @@ -298,9 +296,7 @@ uint8_t UHS_NI UHS_Bulk_Storage::Write(uint8_t lun, uint32_t addr, uint16_t bsiz // Only developer serviceable parts below! //////////////////////////////////////////////////////////////////////////////// - // Main driver code - //////////////////////////////////////////////////////////////////////////////// UHS_NI UHS_Bulk_Storage::UHS_Bulk_Storage(UHS_USB_HOST_BASE *p) { @@ -637,11 +633,7 @@ void UHS_NI UHS_Bulk_Storage::Poll() { } //////////////////////////////////////////////////////////////////////////////// - - // SCSI code - - //////////////////////////////////////////////////////////////////////////////// /** @@ -794,13 +786,8 @@ uint8_t UHS_NI UHS_Bulk_Storage::RequestSense(uint8_t lun, uint16_t size, uint8_ return v; } - //////////////////////////////////////////////////////////////////////////////// - - // USB code - - //////////////////////////////////////////////////////////////////////////////// /** @@ -954,7 +941,6 @@ uint8_t UHS_NI UHS_Bulk_Storage::HandleUsbError(uint8_t error, uint8_t index) { if(index != epDataInIndex) return UHS_BULK_ERR_WRITE_STALL; return UHS_BULK_ERR_STALL; - case UHS_HOST_ERROR_TOGERR: // Handle a very super rare corner case, where toggles become de-synched. // I have only ran into one device that has this firmware bug, and this is @@ -1171,13 +1157,8 @@ uint8_t UHS_NI UHS_Bulk_Storage::HandleSCSIError(uint8_t status) { } // switch } - //////////////////////////////////////////////////////////////////////////////// - - // Debugging code - - //////////////////////////////////////////////////////////////////////////////// /** diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h index 58d7ba200cb5..9ec18fbf4122 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h @@ -59,7 +59,6 @@ e-mail : support@circuitsathome.com // D6-5 Type (0- standard, 1 - class, 2 - vendor, 3 - reserved) // D4-0 Recipient (0 - device, 1 - interface, 2 - endpoint, 3 - other, 4..31 - reserved) - // TO-DO: Use the python script to generate these. // TO-DO: Add _all_ subclasses here. // USB Device Classes, Subclasses and Protocols @@ -165,7 +164,6 @@ e-mail : support@circuitsathome.com //////////////////////////////////////////////////////////////////////////////// - /* USB state machine states */ #define UHS_USB_HOST_STATE_MASK 0xF0U @@ -324,7 +322,6 @@ typedef struct { // 8 bytes total } __attribute__((packed)) SETUP_PKT, *PSETUP_PKT; - // little endian :-) 8 8 8 8 16 16 #define mkSETUP_PKT8(bmReqType, bRequest, wValLo, wValHi, wInd, total) ((uint64_t)(((uint64_t)(bmReqType)))|(((uint64_t)(bRequest))<<8)|(((uint64_t)(wValLo))<<16)|(((uint64_t)(wValHi))<<24)|(((uint64_t)(wInd))<<32)|(((uint64_t)(total)<<48))) #define mkSETUP_PKT16(bmReqType, bRequest, wVal, wInd, total) ((uint64_t)(((uint64_t)(bmReqType)))|(((uint64_t)(bRequest))<<8)|(((uint64_t)(wVal ))<<16) |(((uint64_t)(wInd))<<32)|(((uint64_t)(total)<<48))) diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h index 4d9d35bd6da0..3b47bbd892eb 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h @@ -29,8 +29,6 @@ e-mail : support@circuitsathome.com #else #define __ADDRESS_H__ - - /* NAK powers. To save space in endpoint data structure, amount of retries before giving up and returning 0x4 is stored in */ /* bmNakPower as a power of 2. The actual nak_limit is then calculated as nak_limit = ( 2^bmNakPower - 1) */ #define UHS_USB_NAK_MAX_POWER 14 // NAK binary order maximum value @@ -192,7 +190,6 @@ class AddressPool { return (!index) ? NULL : &thePool[index]; }; - // Allocates new address uint8_t UHS_NI AllocAddress(uint8_t parent, bool is_hub = false, uint8_t port = 1) { diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h index f78a3bb8f0fa..d87b40fea299 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h @@ -47,7 +47,6 @@ UHS_EpInfo* UHS_USB_HOST_BASE::getEpInfoEntry(uint8_t addr, uint8_t ep) { if(!p || !p->epinfo) return NULL; - UHS_EpInfo *pep; for(uint8_t j = 0; j < UHS_HOST_MAX_INTERFACE_DRIVERS; j++) { pep = (UHS_EpInfo *)(p->epinfo[j]); @@ -311,7 +310,6 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe return rcode; } - #if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE ei.address = addrPool.AllocAddress(parent, false, port); @@ -1111,7 +1109,6 @@ uint8_t UHS_USB_HOST_BASE::enumerateInterface(ENUMERATION_INFO *ei) { return devConfigIndex; }; - //////////////////////////////////////////////////////////////////////////////// // Vendor Specific Interface Class //////////////////////////////////////////////////////////////////////////////// @@ -1168,7 +1165,6 @@ uint8_t UHS_NI UHS_VSI::SetInterface(ENUMERATION_INFO *ei) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// - #if 0 /* TO-DO: Move this silliness to a NONE driver. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h index bb2a87cf0382..6e9bb8b7835b 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h @@ -31,7 +31,6 @@ e-mail : support@circuitsathome.com * Universal Arduino(tm) "IDE" fixups. */ - // Just in case... #ifndef SERIAL_PORT_MONITOR #define SERIAL_PORT_MONITOR Serial @@ -57,7 +56,6 @@ e-mail : support@circuitsathome.com #endif #endif - #ifndef UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE #ifndef UHS_BIG_FLASH @@ -160,7 +158,6 @@ e-mail : support@circuitsathome.com #define UHS_KIO_SETBIT_ATOMIC(r, m) (*(uint32_t *)UHS_KIO_BITBAND_ADDR((r), BITNR((m)))) = 1 #define UHS_KIO_CLRBIT_ATOMIC(r, m) (*(uint32_t *)UHS_KIO_BITBAND_ADDR((r), BITNR((m)))) = 0 - #define VALUE_BETWEEN(v,l,h) (((v)>(l)) && ((v)<(h))) #define VALUE_WITHIN(v,l,h) (((v)>=(l)) && ((v)<=(h))) #define output_pgm_message(wa,fp,mp,el) wa = &mp, fp((char *)pgm_read_pointer(wa), el) diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h index 4fc9b94079ab..bb464d7adf82 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h @@ -167,8 +167,6 @@ extern "C" { #error no STDIO #endif // defined(ARDUINO_ARCH_PIC32) - - #ifdef __AVR__ // The only wierdo in the bunch... void UHS_AVR_printf_HELPER_init() { diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h index edf673a4fbe7..af8917e14dbb 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h @@ -91,6 +91,4 @@ template void D_PrintBin(NOTUSED(T val), NOTUSED(int lvl)) { #endif } - - #endif // __PRINTHEX_H__ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h index c516599d6b3f..03bf1c1c07ec 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h @@ -55,7 +55,6 @@ e-mail : support@circuitsathome.com // //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// // DEBUGGING //////////////////////////////////////////////////////////////////////////////// diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h index 6486482d961a..013be2a9d46f 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h @@ -97,7 +97,6 @@ e-mail : support@circuitsathome.com #define USB_SETUP_RECIPIENT_PORT 0x04 // Wireless USB 1.0 #define USB_SETUP_RECIPIENT_RPIPE 0x05 // Wireless USB 1.0 - /* USB descriptors */ #define USB_DESCRIPTOR_DEVICE 0x01 // bDescriptorType for a Device Descriptor. #define USB_DESCRIPTOR_CONFIGURATION 0x02 // bDescriptorType for a Configuration Descriptor. @@ -123,7 +122,6 @@ e-mail : support@circuitsathome.com #define USB_HID_DESCRIPTOR 0x21 - // Conventional codes for class-specific descriptors. "Common Class" Spec (3.11) #define USB_DESCRIPTOR_CS_DEVICE 0x21 #define USB_DESCRIPTOR_CS_CONFIG 0x22 @@ -131,8 +129,6 @@ e-mail : support@circuitsathome.com #define USB_DESCRIPTOR_CS_INTERFACE 0x24 #define USB_DESCRIPTOR_CS_ENDPOINT 0x25 - - /* USB Endpoint Transfer Types */ #define USB_TRANSFER_TYPE_CONTROL 0x00 // Endpoint is a control endpoint. #define USB_TRANSFER_TYPE_ISOCHRONOUS 0x01 // Endpoint is an isochronous endpoint. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h index 79c06a492b97..eb4f35eb136f 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h @@ -27,7 +27,6 @@ e-mail : support@circuitsathome.com #include "UHS_max3421e.h" #include - #ifndef SPI_HAS_TRANSACTION #error "Your SPI library installation is too old." #else @@ -58,8 +57,6 @@ e-mail : support@circuitsathome.com #define USB_HOST_SHIELD_USE_ISR 1 #endif - - #if !USB_HOST_SHIELD_USE_ISR #error NOISR Polled mode _NOT SUPPORTED YET_ @@ -180,8 +177,6 @@ e-mail : support@circuitsathome.com #endif #endif - - #ifdef NO_AUTO_SPEED // Ugly details section... // MAX3421E characteristics @@ -466,7 +461,6 @@ public UHS_USB_HOST_BASE interrupts(); }; - int16_t UHS_NI Init(int16_t mseconds); int16_t UHS_NI Init() { diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h index 57352a351873..f126a6fcef74 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h @@ -28,7 +28,6 @@ #error digitalPinToInterrupt not defined, complain to your board maintainer. #endif - #if USB_HOST_SHIELD_USE_ISR // allow two slots. this makes the maximum allowed shield count TWO @@ -47,7 +46,6 @@ } #endif - void UHS_NI MAX3421E_HOST::resume_host() { // Used on MCU that lack control of IRQ priority (AVR). // Resumes ISRs. @@ -875,7 +873,6 @@ void UHS_NI MAX3421E_HOST::ISRbottom() { DDSB(); } - /* USB main task. Services the MAX3421e */ #if !USB_HOST_SHIELD_USE_ISR void UHS_NI MAX3421E_HOST::ISRTask() {} diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h index eeaa4f81d9fe..1318ea8b287f 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h @@ -126,12 +126,10 @@ AJK_IIF(AJK_BITAND(AJK_IS_COMPARABLE(x))(AJK_IS_COMPARABLE(y)) ) \ #define AJK_EQUAL(x, y) AJK_COMPL(AJK_NOT_EQUAL(x, y)) - #define AJK_COMMA() , #define AJK_COMMA_IF(n) AJK_IF(n)(AJK_COMMA, AJK_EAT)() - #define AJK_COMMA_VAR(AJK_count, AJK_v) AJK_COMMA_IF(AJK_count) AJK_v ## AJK_count #define AJK_MAKE_LIST(AJK_v, AJK_count) AJK_EVAL(AJK_REPEAT(AJK_count, AJK_COMMA_VAR, AJK_v)) diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h index f86054cad8a4..f50b3bd4c1e8 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h @@ -29,8 +29,6 @@ #define SWI_MAXIMUM_ALLOWED 4 #endif - - #if defined(__arm__) || defined(ARDUINO_ARCH_PIC32) static char dyn_SWI_initied = 0; static dyn_SWI* dyn_SWI_LIST[SWI_MAXIMUM_ALLOWED]; @@ -79,7 +77,6 @@ void softISR() { // TO-DO: Perhaps limit to 8, and inline this? // - // Make a working copy, while clearing the queue. noInterrupts(); #ifdef ARDUINO_ARCH_PIC32 @@ -117,7 +114,6 @@ void softISR() { #define DDSB() __DSB() #endif - #ifdef __arm__ #ifndef interruptsStatus #define interruptsStatus() __interruptsStatus() diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h index 07f4ae054dcf..652b43fd2e36 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h @@ -22,7 +22,6 @@ #ifndef DYN_SWI_H #define DYN_SWI_H - #if defined(__arm__) || defined(ARDUINO_ARCH_PIC32) #ifdef ARDUINO_ARCH_PIC32 #include @@ -135,7 +134,6 @@ extern "C" #error Do not know how to relocate IRQ vectors or perform SWI #endif // SWI_IRQ_NUM - #ifndef SWI_IRQ_NUM #error SWI_IRQ_NUM not defined #else From 70d942a18483e28d7306c0edd4280ff354cf4350 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 30 Jan 2024 06:06:23 +0000 Subject: [PATCH 174/236] [cron] Bump distribution date (2024-01-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 5519a1a6426b..6b3eac583b4c 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 "2024-01-29" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 d80ddf931797..e878c24631e7 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 "2024-01-29" + #define STRING_DISTRIBUTION_DATE "2024-01-30" #endif /** From 610ea0a9d30f1bc566eacda7ceab7976e228957d Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:56:46 +1300 Subject: [PATCH 175/236] =?UTF-8?q?=F0=9F=94=A8=20No=20strlcpy=20in=20Wind?= =?UTF-8?q?ows=20(#26748)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/native.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/ini/native.ini b/ini/native.ini index 86608ff3d71a..ba5ddbc4cc01 100644 --- a/ini/native.ini +++ b/ini/native.ini @@ -140,5 +140,4 @@ build_src_flags = ${simulator_common.build_src_flags} -fpermissive build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp - -DHAS_LIBBSD build_type = debug From 0266e7fe535cbdd2a10850fd0fd71f1ae2617db2 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:58:06 -0800 Subject: [PATCH 176/236] =?UTF-8?q?=F0=9F=93=9D=20Biqu=20=3D>=20BIQU=20(#2?= =?UTF-8?q?6735)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1a72572e231b..fd9aa53a9471 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 @@ -23,7 +23,7 @@ #include "env_validate.h" -#define DEFAULT_MACHINE_NAME "Biqu BX" +#define DEFAULT_MACHINE_NAME "BIQU BX" // Onboard I2C EEPROM #define I2C_EEPROM From 1c6cfc3ffeac8fdf2cd6d61529ad864578a4803f Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:00:02 -0800 Subject: [PATCH 177/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20I/J/K=20chopper=20?= =?UTF-8?q?timing=20(#26736)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #19112 --- Marlin/src/module/stepper/trinamic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/stepper/trinamic.h b/Marlin/src/module/stepper/trinamic.h index a9832945a5ab..3ae784be9718 100644 --- a/Marlin/src/module/stepper/trinamic.h +++ b/Marlin/src/module/stepper/trinamic.h @@ -248,7 +248,7 @@ void reset_trinamic_drivers(); static constexpr chopper_timing_t chopper_timing_I = CHOPPER_TIMING_I; #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define I_ENABLE_INIT() NOOP - #define I_ENABLE_WRITE(STATE) stepperI.toff((STATE)==I_ENABLE_ON ? chopper_timing.toff : 0) + #define I_ENABLE_WRITE(STATE) stepperI.toff((STATE)==I_ENABLE_ON ? chopper_timing_I.toff : 0) #define I_ENABLE_READ() stepperI.isEnabled() #endif #if AXIS_HAS_DEDGE(I) @@ -262,7 +262,7 @@ void reset_trinamic_drivers(); static constexpr chopper_timing_t chopper_timing_J = CHOPPER_TIMING_J; #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define J_ENABLE_INIT() NOOP - #define J_ENABLE_WRITE(STATE) stepperJ.toff((STATE)==J_ENABLE_ON ? chopper_timing.toff : 0) + #define J_ENABLE_WRITE(STATE) stepperJ.toff((STATE)==J_ENABLE_ON ? chopper_timing_J.toff : 0) #define J_ENABLE_READ() stepperJ.isEnabled() #endif #if AXIS_HAS_DEDGE(J) @@ -276,7 +276,7 @@ void reset_trinamic_drivers(); static constexpr chopper_timing_t chopper_timing_K = CHOPPER_TIMING_K; #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define K_ENABLE_INIT() NOOP - #define K_ENABLE_WRITE(STATE) stepperK.toff((STATE)==K_ENABLE_ON ? chopper_timing.toff : 0) + #define K_ENABLE_WRITE(STATE) stepperK.toff((STATE)==K_ENABLE_ON ? chopper_timing_K.toff : 0) #define K_ENABLE_READ() stepperK.isEnabled() #endif #if AXIS_HAS_DEDGE(K) From ef04680cc556fb5aa8637fb767f7ce11be30ca2a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 31 Jan 2024 06:06:35 +0000 Subject: [PATCH 178/236] [cron] Bump distribution date (2024-01-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 6b3eac583b4c..662a13db99c7 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 "2024-01-30" +//#define STRING_DISTRIBUTION_DATE "2024-01-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 e878c24631e7..d201a014cc6d 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 "2024-01-30" + #define STRING_DISTRIBUTION_DATE "2024-01-31" #endif /** From f9d5ee04b4930fa7b876c278e80072060463f55c Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu, 1 Feb 2024 07:33:42 +1300 Subject: [PATCH 179/236] =?UTF-8?q?=F0=9F=A9=B9=20Patch=20STM32=20serial?= =?UTF-8?q?=20UUID=20(#26737)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26715 Co-authored-by: Scott Lahteine --- Marlin/src/feature/tmc_util.cpp | 2 +- Marlin/src/gcode/host/M115.cpp | 15 +++++---- Marlin/src/libs/hex_print.cpp | 58 +++++++++++++-------------------- Marlin/src/libs/hex_print.h | 9 ++--- 4 files changed, 36 insertions(+), 48 deletions(-) diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index bff6872e4da8..421f9b0c22e1 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -763,7 +763,7 @@ SERIAL_CHAR('\t'); st.printLabel(); SERIAL_CHAR('\t'); - print_hex_long(drv_status, ':'); + print_hex_long(drv_status, ':', true); if (drv_status == 0xFFFFFFFF || drv_status == 0) SERIAL_ECHOPGM("\t Bad response!"); SERIAL_EOL(); break; diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index d99737a261c6..b2f3496a6807 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -88,14 +88,15 @@ void GcodeSuite::M115() { * This code should work on all STM32-based boards. */ #if ENABLED(STM32_UID_SHORT_FORM) - uint32_t * const UID = (uint32_t*)UID_BASE; - SERIAL_ECHO(hex_long(UID[0]), hex_long(UID[1]), hex_long(UID[2])); + const uint32_t * const UID = (uint32_t*)UID_BASE; + for (uint8_t i = 0; i < 3; i++) print_hex_long(UID[i]); #else - uint16_t * const UID = (uint16_t*)UID_BASE; - SERIAL_ECHO( - F("CEDE2A2F-"), hex_word(UID[0]), C('-'), hex_word(UID[1]), C('-'), hex_word(UID[2]), C('-'), - hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5]) - ); + const uint16_t * const UID = (uint16_t*)UID_BASE; // Little-endian! + SERIAL_ECHO(F("CEDE2A2F-")); + for (uint8_t i = 1; i <= 6; i++) { + print_hex_word(UID[(i % 2) ? i : i - 2]); // 1111-0000-3333-222255554444 + if (i <= 3) SERIAL_ECHO(C('-')); + } #endif #endif diff --git a/Marlin/src/libs/hex_print.cpp b/Marlin/src/libs/hex_print.cpp index b9edc38c7778..9a354011e841 100644 --- a/Marlin/src/libs/hex_print.cpp +++ b/Marlin/src/libs/hex_print.cpp @@ -27,57 +27,43 @@ #include "hex_print.h" #include "../core/serial.h" -#ifdef CPU_32_BIT - constexpr int byte_start = 4; - static char _hex[] = "0x00000000"; -#else - constexpr int byte_start = 0; - static char _hex[] = "0x0000"; -#endif +static char _hex[] = "0x00000000"; // 0:adr32 2:long 4:adr16 6:word 8:byte -char* hex_byte(const uint8_t b) { - _hex[byte_start + 4] = hex_nybble(b >> 4); - _hex[byte_start + 5] = hex_nybble(b); - return &_hex[byte_start + 4]; +inline void __hex_byte(const uint8_t b, const uint8_t o=8) { + _hex[o + 0] = hex_nybble(b >> 4); + _hex[o + 1] = hex_nybble(b); } - -inline void __hex_word(const uint16_t w) { - _hex[byte_start + 2] = hex_nybble(w >> 12); - _hex[byte_start + 3] = hex_nybble(w >> 8); - _hex[byte_start + 4] = hex_nybble(w >> 4); - _hex[byte_start + 5] = hex_nybble(w); +inline void __hex_word(const uint16_t w, const uint8_t o=6) { + __hex_byte(w >> 8, o + 0); + __hex_byte(w , o + 2); } - -char* _hex_word(const uint16_t w) { - __hex_word(w); - return &_hex[byte_start + 2]; +inline void __hex_long(const uint32_t w) { + __hex_word(w >> 16, 2); + __hex_word(w , 6); } -char* _hex_long(const uintptr_t l) { - _hex[2] = hex_nybble(l >> 28); - _hex[3] = hex_nybble(l >> 24); - _hex[4] = hex_nybble(l >> 20); - _hex[5] = hex_nybble(l >> 16); - __hex_word((uint16_t)(l & 0xFFFF)); - return &_hex[2]; -} +char* hex_byte(const uint8_t b) { __hex_byte(b); return &_hex[8]; } +char* _hex_word(const uint16_t w) { __hex_word(w); return &_hex[6]; } +char* _hex_long(const uint32_t l) { __hex_long(l); return &_hex[2]; } -char* hex_address(const void * const w) { +char* hex_address(const void * const a) { #ifdef CPU_32_BIT - (void)hex_long((uintptr_t)w); + (void)_hex_long((uintptr_t)a); + return _hex; #else - (void)hex_word((uintptr_t)w); + _hex[4] = '0'; _hex[5] = 'x'; + (void)_hex_word((uintptr_t)a); + return &_hex[4]; #endif - return _hex; } void print_hex_nybble(const uint8_t n) { SERIAL_CHAR(hex_nybble(n)); } void print_hex_byte(const uint8_t b) { SERIAL_ECHO(hex_byte(b)); } -void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); } +void print_hex_word(const uint16_t w) { SERIAL_ECHO(_hex_word(w)); } void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); } -void print_hex_long(const uint32_t w, const char delimiter/*='\0'*/) { - SERIAL_ECHOPGM("0x"); +void print_hex_long(const uint32_t w, const char delimiter/*='\0'*/, const bool prefix/*=false*/) { + if (prefix) SERIAL_ECHOPGM("0x"); for (int B = 24; B >= 8; B -= 8) { print_hex_byte(w >> B); if (delimiter) SERIAL_CHAR(delimiter); diff --git a/Marlin/src/libs/hex_print.h b/Marlin/src/libs/hex_print.h index 4a5cac2b6c1c..bd1f7ce24d53 100644 --- a/Marlin/src/libs/hex_print.h +++ b/Marlin/src/libs/hex_print.h @@ -30,16 +30,17 @@ constexpr char hex_nybble(const uint8_t n) { return (n & 0xF) + ((n & 0xF) < 10 ? '0' : 'A' - 10); } -char* hex_byte(const uint8_t b); char* _hex_word(const uint16_t w); -char* hex_address(const void * const w); -char* _hex_long(const uintptr_t l); +char* _hex_long(const uint32_t l); +char* hex_byte(const uint8_t b); template char* hex_word(T w) { return _hex_word((uint16_t)w); } template char* hex_long(T w) { return _hex_long((uint32_t)w); } +char* hex_address(const void * const w); + void print_hex_nybble(const uint8_t n); void print_hex_byte(const uint8_t b); void print_hex_word(const uint16_t w); void print_hex_address(const void * const w); -void print_hex_long(const uint32_t w, const char delimiter='\0'); +void print_hex_long(const uint32_t w, const char delimiter='\0', const bool prefix=false); From d62f45bdc17f36ceb6105345df9ce2946369da10 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 1 Feb 2024 00:21:39 +0000 Subject: [PATCH 180/236] [cron] Bump distribution date (2024-02-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 662a13db99c7..ea96fb52ecd0 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 "2024-01-31" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 d201a014cc6d..10b529f98eaa 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 "2024-01-31" + #define STRING_DISTRIBUTION_DATE "2024-02-01" #endif /** From 5a87bea7622207b78503cc171a0544ee6bd9d6a2 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Wed, 31 Jan 2024 20:24:08 -0500 Subject: [PATCH 181/236] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20repeating=20"Power?= =?UTF-8?q?=20Off"=20message=20(#26755)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/power.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index e908c8292fd6..a9655029fbeb 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -102,12 +102,12 @@ void Power::power_on() { * Processes any PSU_POWEROFF_GCODE and makes a PS_OFF_SOUND if enabled. */ void Power::power_off() { - SERIAL_ECHOLNPGM(STR_POWEROFF); - TERN_(HAS_SUICIDE, suicide()); if (!psu_on) return; + SERIAL_ECHOLNPGM(STR_POWEROFF); + #ifdef PSU_POWEROFF_GCODE gcode.process_subcommands_now(F(PSU_POWEROFF_GCODE)); #endif From 9a5cfb3f26315822c7ae8ea043525c0e30ac08ac Mon Sep 17 00:00:00 2001 From: Abdullah YILMAZ Date: Thu, 1 Feb 2024 05:11:08 +0300 Subject: [PATCH 182/236] =?UTF-8?q?=F0=9F=8C=90=20Turkish=20language=20upd?= =?UTF-8?q?ate=20(#26739)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_tr.h | 92 +++++++++++++++------------ 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 86c5f6701c4b..86c39b344eb7 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -26,6 +26,14 @@ * * LCD Menu Messages * See also https://marlinfw.org/docs/development/lcd_language.html + * + * 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 '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 */ #define DISPLAY_CHARSET_ISO10646_TR @@ -102,21 +110,21 @@ namespace LanguageNarrow_tr { LSTR MSG_SELECT_ORIGIN = _UxGT("Başlangıç Seç"); LSTR MSG_LAST_VALUE_SP = _UxGT("Son değer "); - LSTR MSG_PREHEAT_1 = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL; - LSTR MSG_PREHEAT_1_H = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL " ~"; - LSTR MSG_PREHEAT_1_END = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Nozul"); - LSTR MSG_PREHEAT_1_END_E = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Nozul ~"); - LSTR MSG_PREHEAT_1_ALL = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Tüm"); - LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Tabla"); - LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Ayar"); - - LSTR MSG_PREHEAT_M = _UxGT("ÖnIsıtma $"); - LSTR MSG_PREHEAT_M_H = _UxGT("ÖnIsıtma $ ~"); - LSTR MSG_PREHEAT_M_END = _UxGT("ÖnIsıtma $ Nozul"); - LSTR MSG_PREHEAT_M_END_E = _UxGT("ÖnIsıtma $ Nozul ~"); - LSTR MSG_PREHEAT_M_ALL = _UxGT("ÖnIsıtma $ Tüm"); - LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("ÖnIsıtma $ Tabla"); - LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("ÖnIsıtma $ Ayar"); + LSTR MSG_PREHEAT_1 = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL; // Çalışma gerekli Hata + LSTR MSG_PREHEAT_1_H = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL " ~"; // Çalışma gerekli Hata + LSTR MSG_PREHEAT_1_END = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Nozul"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_1_END_E = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Nozul ~"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_1_ALL = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Tüm"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Tabla"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("ÖnIsıtma ") PREHEAT_1_LABEL _UxGT(" Ayar"); // Çalışma gerekli Hata + + LSTR MSG_PREHEAT_M = _UxGT("ÖnIsıtma $"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_M_H = _UxGT("ÖnIsıtma $ ~"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_M_END = _UxGT("ÖnIsıtma $ Nozul"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_M_END_E = _UxGT("ÖnIsıtma $ Nozul ~"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_M_ALL = _UxGT("ÖnIsıtma $ Tüm"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("ÖnIsıtma $ Tabla"); // Çalışma gerekli Hata + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("ÖnIsıtma $ Ayar"); // Çalışma gerekli Hata LSTR MSG_PREHEAT_HOTEND = _UxGT("Nozul Ön Isıtma"); LSTR MSG_PREHEAT_CUSTOM = _UxGT("Özel Ön Isıtma"); @@ -197,8 +205,8 @@ namespace LanguageNarrow_tr { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Ölçüm"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Tablayı Kaldır & Ölç"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Sonrakine Git"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL'yi Etkinleştir"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL'yi Etkisizleştir"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL'i Aktifleştir"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL'i Pasifleştir"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Tabla Sıcaklığı"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Tabla Sıcaklığı"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nozul Sıcaklığı"); @@ -213,8 +221,8 @@ namespace LanguageNarrow_tr { LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Soğuk Mesh Oluştur"); LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Mesh Yükseklik Ayarı"); LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Yükseklik miktarı"); - LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Doğrulama Mesh"); - LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Doğrulama Mesh ($)"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Mesh Doğrulama"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Mesh Doğrulama ($)"); LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Özel Mesh Doğrulama"); LSTR MSG_G26_HEATING_BED = _UxGT("G26 Isıtma Tablası"); LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Isıtma Memesi"); @@ -230,25 +238,25 @@ namespace LanguageNarrow_tr { LSTR MSG_UBL_MESH_LEVEL = _UxGT("Mesh Seviyesi"); LSTR MSG_UBL_SIDE_POINTS = _UxGT("Yan Noktalar"); LSTR MSG_UBL_MAP_TYPE = _UxGT("Haritalama Türü"); - LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Mesh Çıkış Haritası"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Mesh Çikis Haritası"); // Çalışma gerekli Hata LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host için Çıktı"); LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV için Çıktı"); LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Yedekleme Kapalı"); LSTR MSG_UBL_INFO_UBL = _UxGT("UBL Çıkış Bilgisi"); LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Dolgu Miktarı"); LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manuel Dolgu"); - LSTR MSG_UBL_SMART_FILLIN = _UxGT("Akıllı Dogu"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Akıllı Dolgu"); LSTR MSG_UBL_FILLIN_MESH = _UxGT("Mesh Dolgu"); LSTR MSG_UBL_MESH_FILLED = _UxGT("Eksikler Dolduruldu"); LSTR MSG_UBL_MESH_INVALID = _UxGT("Geçersiz Mesh"); - LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Tümünü Geçersiz Kıl"); - LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Yakını Geçersiz Kıl"); - LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Tümünü İnce Ayarla"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Tumunu Gecersiz Kil"); // Çalışma gerekli Hata + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Yakini Gecersiz Kil"); // Çalışma gerekli Hata + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Tumunu İnce Ayarla"); // Çalışma gerekli Hata LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Yakını İnce Ayarla"); LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Depolama"); LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Bellek Yuvası"); LSTR MSG_UBL_LOAD_MESH = _UxGT("Tabla Mesh Yükle"); - LSTR MSG_UBL_SAVE_MESH = _UxGT("Tabla Mesh Kayıt Et"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Tabla Mesh Kaydet"); LSTR MSG_UBL_INVALID_SLOT = _UxGT("Önce Mesh Yuvası Seç"); LSTR MSG_MESH_LOADED = _UxGT("Mesh %i yüklendi"); LSTR MSG_MESH_SAVED = _UxGT("Mesh %i kayıtlandı"); @@ -260,11 +268,11 @@ namespace LanguageNarrow_tr { LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Ofset Durduruldu"); LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Adım Adım UBL"); LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Soğuk Mesh Oluştur"); - LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Akıllı Dogu"); - LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Doğrulama Mesh"); - LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Tümünü İnce Ayarla"); - LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Doğrulama Mesh"); - LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Tümünü İnce Ayarla"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Akıllı Dolgu"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Mesh Dogrulama"); // Çalışma gerekli Hata + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Tumunu ince Ayarla"); // Çalışma gerekli Hata + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Mesh Dogrulama"); // Çalışma gerekli Hata + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Tumunu ince Ayarla"); // Çalışma gerekli Hata LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Tabla Mesh Kaydet"); LSTR MSG_LED_CONTROL = _UxGT("LED Kontrolü"); @@ -335,8 +343,8 @@ namespace LanguageNarrow_tr { LSTR MSG_AUTOTEMP = _UxGT("Oto. Sıcaklık"); LSTR MSG_LCD_ON = _UxGT("Açık"); LSTR MSG_LCD_OFF = _UxGT("Kapalı"); - LSTR MSG_PID_AUTOTUNE = _UxGT("PID Kalibrasyon"); - LSTR MSG_PID_AUTOTUNE_E = _UxGT("Kalibrasyon * PID"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Kalibrasyonu"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("* PID Kalibrasyonu"); LSTR MSG_PID_CYCLE = _UxGT("PID Döngüleri"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID ayarı yapıldı"); LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Kalibrasyon başarısız!"); @@ -346,13 +354,13 @@ namespace LanguageNarrow_tr { LSTR MSG_PID_BAD_HEATER_ID = _UxGT("Kalibrasyon başarısız! Kötü ekstruder."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Kalibrasyon başarısız! Sıcaklık çok yüksek."); LSTR MSG_PID_TIMEOUT = _UxGT("Kalibrasyon başarısız! Zaman aşımı."); - LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Isı kaybı test ediliyor"); + LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Isı kaybı testi"); LSTR MSG_MPC_HEATING_PAST_200 = _UxGT(">200C Isıtma"); LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Ortam ısısına soğutma"); - LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Otomatik Ayarı"); - LSTR MSG_MPC_EDIT = _UxGT("Düzenle * MPC"); + LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Kalibrasyonu"); + LSTR MSG_MPC_EDIT = _UxGT("* MPC Düzenle"); LSTR MSG_MPC_POWER = _UxGT("Isıtıcı Gücü"); - LSTR MSG_MPC_POWER_E = _UxGT("Güç *"); + LSTR MSG_MPC_POWER_E = _UxGT("* Gücü"); LSTR MSG_MPC_BLOCK_HEAT_CAPACITY = _UxGT("Isı Kapasitesi"); LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Isı Kap. *"); LSTR MSG_SENSOR_RESPONSIVENESS = _UxGT("Sensör Hassasiyeti"); @@ -390,8 +398,8 @@ namespace LanguageNarrow_tr { LSTR MSG_A_RETRACT = _UxGT("G.Çekme Hızı"); LSTR MSG_A_TRAVEL = _UxGT("Gezinme Hızı"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Biçimleme @ aktif"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Biçimleme @ pasif"); + LSTR MSG_SHAPING_ENABLE = _UxGT("@ Biçimlemeyi Aç"); + LSTR MSG_SHAPING_DISABLE = _UxGT("@ Biçimlemeyi Kapat"); LSTR MSG_SHAPING_FREQ = _UxGT("@ frekans"); LSTR MSG_SHAPING_ZETA = _UxGT("@ sönümleme"); LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frekansı"); @@ -458,7 +466,7 @@ namespace LanguageNarrow_tr { LSTR MSG_CURRENT = _UxGT("Akım"); LSTR MSG_VOLTAGE = _UxGT("Voltaj"); LSTR MSG_POWER = _UxGT("Güç"); - LSTR MSG_START_PRINT = _UxGT("Yaz. Başlat"); + LSTR MSG_START_PRINT = _UxGT("Yazdırmayı Başlat"); LSTR MSG_BUTTON_NEXT = _UxGT("İleri"); LSTR MSG_BUTTON_INIT = _UxGT("Başlat"); LSTR MSG_BUTTON_STOP = _UxGT("Durdur"); @@ -576,9 +584,9 @@ namespace LanguageNarrow_tr { LSTR MSG_HOME_FIRST = _UxGT("Önce %s Sıfırla"); LSTR MSG_ZPROBE_SETTINGS = _UxGT("Prob Ayarları"); LSTR MSG_ZPROBE_OFFSETS = _UxGT("Prob Ofsetleri"); - LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofset"); - LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Prob Ofset"); - LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Prob Ofset"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofseti"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Prob Ofseti"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Prob Ofseti"); LSTR MSG_ZPROBE_MARGIN = _UxGT("Prob Payı"); LSTR MSG_Z_FEED_RATE = _UxGT("Z İlerleme Hızı"); LSTR MSG_ENABLE_HS_MODE = _UxGT("HS modunu aç"); From 4c5d7831c11c859e5e378d1ff588cb8fe20eb58a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 2 Feb 2024 00:20:22 +0000 Subject: [PATCH 183/236] [cron] Bump distribution date (2024-02-02) --- 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 ea96fb52ecd0..693c5c2e686f 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 "2024-02-01" +//#define STRING_DISTRIBUTION_DATE "2024-02-02" /** * 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 10b529f98eaa..7e3a6d2a73e6 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 "2024-02-01" + #define STRING_DISTRIBUTION_DATE "2024-02-02" #endif /** From c476e62a6f32bc4d197dc31a8587d53376505f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davide=20Rombol=C3=A0?= Date: Fri, 2 Feb 2024 02:31:39 +0100 Subject: [PATCH 184/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20STM32=20HW=20Seria?= =?UTF-8?q?l=20(#26531)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26328 --- Marlin/src/HAL/STM32/HardwareSerial.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/HAL/STM32/HardwareSerial.cpp b/Marlin/src/HAL/STM32/HardwareSerial.cpp index a6f97f356e2e..0625b5f56fad 100644 --- a/Marlin/src/HAL/STM32/HardwareSerial.cpp +++ b/Marlin/src/HAL/STM32/HardwareSerial.cpp @@ -126,7 +126,7 @@ void serialEvent2() __attribute__((weak)); #endif #ifdef USING_HW_SERIAL3 - HAL_HardwareSerial Serial3(USART3); + HAL_HardwareSerial HSerial3(USART3); void serialEvent3() __attribute__((weak)); #endif #ifdef USING_HW_SERIAL4 @@ -147,9 +147,9 @@ #endif #ifdef USING_HW_SERIAL6 #ifdef USART6 - HAL_HardwareSerial HSerial5(USART6); + HAL_HardwareSerial HSerial6(USART6); #else - HAL_HardwareSerial HSerial5(UART6); + HAL_HardwareSerial HSerial6(UART6); #endif void serialEvent5() __attribute__((weak)); #endif From 9e21330d7ae8b4979fee10099294e9e61c939613 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 3 Feb 2024 00:20:49 +0000 Subject: [PATCH 185/236] [cron] Bump distribution date (2024-02-03) --- 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 693c5c2e686f..69ad9d3d60b8 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 "2024-02-02" +//#define STRING_DISTRIBUTION_DATE "2024-02-03" /** * 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 7e3a6d2a73e6..9d22376571e9 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 "2024-02-02" + #define STRING_DISTRIBUTION_DATE "2024-02-03" #endif /** From e6837b2b8dd70e5a282fff1508e01215ff85c14d Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 3 Feb 2024 15:19:19 -0800 Subject: [PATCH 186/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20STM32=20HW=20Seria?= =?UTF-8?q?l=206=20(#26763)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26328 --- Marlin/src/HAL/STM32/HardwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/HAL/STM32/HardwareSerial.cpp b/Marlin/src/HAL/STM32/HardwareSerial.cpp index 0625b5f56fad..2a389447b78f 100644 --- a/Marlin/src/HAL/STM32/HardwareSerial.cpp +++ b/Marlin/src/HAL/STM32/HardwareSerial.cpp @@ -151,7 +151,7 @@ #else HAL_HardwareSerial HSerial6(UART6); #endif - void serialEvent5() __attribute__((weak)); + void serialEvent6() __attribute__((weak)); #endif // Constructors //////////////////////////////////////////////////////////////// From 7f4792e47c909cef2b46a11a0a8a80cf6858b80d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 4 Feb 2024 00:22:42 +0000 Subject: [PATCH 187/236] [cron] Bump distribution date (2024-02-04) --- 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 69ad9d3d60b8..388173bd4f6f 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 "2024-02-03" +//#define STRING_DISTRIBUTION_DATE "2024-02-04" /** * 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 9d22376571e9..902e4471079f 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 "2024-02-03" + #define STRING_DISTRIBUTION_DATE "2024-02-04" #endif /** From 755b661c2d9e3beb2ba6b7602715d43891ecff3a Mon Sep 17 00:00:00 2001 From: Taylor Talkington Date: Sun, 4 Feb 2024 10:03:08 -0500 Subject: [PATCH 188/236] =?UTF-8?q?=F0=9F=94=A7=20Fix=20USE=5FZ=5FMIN=20co?= =?UTF-8?q?nditions=20(#26762)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 9 ++++++--- Marlin/src/inc/SanityCheck.h | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a1ef4a4fe0b7..6a24268895c0 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1957,8 +1957,9 @@ * Currently this must be distinct, but we can add a mechanism to use the same pin for sensorless * or switches wired to the same pin, or for the single SPI stall state on the axis. */ -#define _USE_STOP(A,N,M,C) ((ANY(A##_HOME_TO_##M, A##N##_SAFETY_STOP) || (C+0)) && PIN_EXISTS(A##N##_##M) && !A##_SPI_SENSORLESS) -#define _HAS_STATE(A,N,M) (USE_##A##N##_##M || (ANY(A##_HOME_TO_##M, A##N##_SAFETY_STOP) && A##_SPI_SENSORLESS)) +#define _ANY_STOP(A,N,M) ANY(A##_HOME_TO_##M, A##N##_SAFETY_STOP) +#define _USE_STOP(A,N,M,C) ((_ANY_STOP(A,N,M) || (C+0)) && PIN_EXISTS(A##N##_##M) && !A##_SPI_SENSORLESS) +#define _HAS_STATE(A,N,M) (USE_##A##N##_##M || (_ANY_STOP(A,N,M) && A##_SPI_SENSORLESS)) #if _USE_STOP(X,,MIN,) #define USE_X_MIN 1 @@ -1992,7 +1993,7 @@ #define HAS_Y_STATE 1 #endif -#if _USE_STOP(Z,,MIN,ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) +#if _USE_STOP(Z,,MIN,ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) && (DISABLED(USE_PROBE_FOR_Z_HOMING) || ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) #define USE_Z_MIN 1 #endif #if _USE_STOP(Z,,MAX,) @@ -2199,7 +2200,9 @@ #define HAS_Z_PROBE_STATE 1 #endif +#undef _ANY_STOP #undef _USE_STOP +#undef _HAS_STATE /** * Set ENDSTOPPULLUPS for active endstop switches diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 27629c5a7da0..a5ba460f7f60 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2384,8 +2384,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #error "Y_MIN_PIN, Y_STOP_PIN, or Y_SPI_SENSORLESS is required for Y axis homing." #elif Y_HOME_TO_MAX && !HAS_Y_MAX_STATE #error "Y_MAX_PIN, Y_STOP_PIN, or Y_SPI_SENSORLESS is required for Y axis homing." - #elif Z_HOME_TO_MIN && !HAS_Z_MIN_STATE - #error "Z_MIN_PIN, Z_STOP_PIN, or Z_SPI_SENSORLESS is required for Z axis homing." + #elif Z_HOME_TO_MIN && NONE(HAS_Z_MIN_STATE, USE_PROBE_FOR_Z_HOMING) + #error "Z_MIN_PIN, Z_STOP_PIN, Z_SPI_SENSORLESS, or USE_PROBE_FOR_Z_HOMING is required for Z axis homing." #elif Z_HOME_TO_MAX && !HAS_Z_MAX_STATE #error "Z_MAX_PIN, Z_STOP_PIN, or Z_SPI_SENSORLESS is required for Z axis homing." #elif I_HOME_TO_MIN && !HAS_I_MIN_STATE From 9364cbb4b53a5ef77cf2b843ba228afffb4c1725 Mon Sep 17 00:00:00 2001 From: Smokey Pell Date: Sun, 4 Feb 2024 09:37:32 -0600 Subject: [PATCH 189/236] =?UTF-8?q?=F0=9F=9A=B8=20Tronxy=20V10=20w/=20TFT?= =?UTF-8?q?=5FTRONXY=5FX5SA=20+=20MKS=5FROBIN=5FTFT43=20(#26747)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 138 +++++----- Marlin/src/HAL/STM32/tft/tft_fsmc.h | 64 +++-- Marlin/src/core/boards.h | 2 +- Marlin/src/pins/pins.h | 8 +- .../pins/stm32f4/pins_TRONXY_CXY_446_V10.h | 256 +++++++++++++++++ Marlin/src/pins/stm32f4/pins_TRONXY_V10.h | 257 ------------------ .../PlatformIO/scripts/tronxy_cxy_446_v10.py | 41 +++ ini/renamed.ini | 3 + ini/stm32f4.ini | 34 ++- 9 files changed, 437 insertions(+), 366 deletions(-) create mode 100644 Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h delete mode 100644 Marlin/src/pins/stm32f4/pins_TRONXY_V10.h create mode 100644 buildroot/share/PlatformIO/scripts/tronxy_cxy_446_v10.py diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index 8e4f97d0a32e..4dffe8b4fcc4 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -37,50 +37,61 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD; void TFT_FSMC::init() { uint32_t controllerAddress; - FSMC_NORSRAM_TimingTypeDef timing, extTiming; + FMC_OR_FSMC(NORSRAM_TimingTypeDef) timing, extTiming; uint32_t nsBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), pinMap_FSMC_CS); // Perform the SRAM1 memory initialization sequence - SRAMx.Instance = FSMC_NORSRAM_DEVICE; - SRAMx.Extended = FSMC_NORSRAM_EXTENDED_DEVICE; + SRAMx.Instance = FMC_OR_FSMC(NORSRAM_DEVICE); + SRAMx.Extended = FMC_OR_FSMC(NORSRAM_EXTENDED_DEVICE); + // SRAMx.Init SRAMx.Init.NSBank = nsBank; - SRAMx.Init.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE; - SRAMx.Init.MemoryType = FSMC_MEMORY_TYPE_SRAM; - SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FSMC_8BIT, FSMC_NORSRAM_MEM_BUS_WIDTH_8, FSMC_NORSRAM_MEM_BUS_WIDTH_16); - SRAMx.Init.BurstAccessMode = FSMC_BURST_ACCESS_MODE_DISABLE; - SRAMx.Init.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW; - SRAMx.Init.WrapMode = FSMC_WRAP_MODE_DISABLE; - SRAMx.Init.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS; - SRAMx.Init.WriteOperation = FSMC_WRITE_OPERATION_ENABLE; - SRAMx.Init.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE; - SRAMx.Init.ExtendedMode = FSMC_EXTENDED_MODE_ENABLE; - SRAMx.Init.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE; - SRAMx.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE; - #ifdef STM32F4xx - SRAMx.Init.PageSize = FSMC_PAGE_SIZE_NONE; + SRAMx.Init.DataAddressMux = FMC_OR_FSMC(DATA_ADDRESS_MUX_DISABLE); + SRAMx.Init.MemoryType = FMC_OR_FSMC(MEMORY_TYPE_SRAM); + #ifdef STM32F446xx + SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FMC_8BIT, FMC_NORSRAM_MEM_BUS_WIDTH_8, FMC_NORSRAM_MEM_BUS_WIDTH_16); + #else + SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FSMC_8BIT, FSMC_NORSRAM_MEM_BUS_WIDTH_8, FSMC_NORSRAM_MEM_BUS_WIDTH_16); + #endif + SRAMx.Init.BurstAccessMode = FMC_OR_FSMC(BURST_ACCESS_MODE_DISABLE); + SRAMx.Init.WaitSignalPolarity = FMC_OR_FSMC(WAIT_SIGNAL_POLARITY_LOW); + SRAMx.Init.WrapMode = FMC_OR_FSMC(WRAP_MODE_DISABLE); + SRAMx.Init.WaitSignalActive = FMC_OR_FSMC(WAIT_TIMING_BEFORE_WS); + SRAMx.Init.WriteOperation = FMC_OR_FSMC(WRITE_OPERATION_ENABLE); + SRAMx.Init.WaitSignal = FMC_OR_FSMC(WAIT_SIGNAL_DISABLE); + SRAMx.Init.ExtendedMode = FMC_OR_FSMC(EXTENDED_MODE_ENABLE); + SRAMx.Init.AsynchronousWait = FMC_OR_FSMC(ASYNCHRONOUS_WAIT_DISABLE); + SRAMx.Init.WriteBurst = FMC_OR_FSMC(WRITE_BURST_DISABLE); + #if defined(STM32F446xx) || defined(STM32F4xx) + SRAMx.Init.PageSize = FMC_OR_FSMC(PAGE_SIZE_NONE); #endif + // Read Timing - relatively slow to ensure ID information is correctly read from TFT controller - // Can be decreases from 15-15-24 to 4-4-8 with risk of stability loss - timing.AddressSetupTime = 15; - timing.AddressHoldTime = 15; - timing.DataSetupTime = 24; - timing.BusTurnAroundDuration = 0; - timing.CLKDivision = 16; - timing.DataLatency = 17; - timing.AccessMode = FSMC_ACCESS_MODE_A; + // Can be decreased from 15-15-24 to 4-4-8 with risk of stability loss + timing.AddressSetupTime = 15; + timing.AddressHoldTime = 15; + timing.DataSetupTime = 24; + timing.BusTurnAroundDuration = 0; + timing.CLKDivision = 16; + timing.DataLatency = 17; + timing.AccessMode = FMC_OR_FSMC(ACCESS_MODE_A); + // Write Timing // 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; - extTiming.BusTurnAroundDuration = 0; - extTiming.CLKDivision = 16; - extTiming.DataLatency = 17; - extTiming.AccessMode = FSMC_ACCESS_MODE_A; - - __HAL_RCC_FSMC_CLK_ENABLE(); + extTiming.AddressSetupTime = 8; + extTiming.AddressHoldTime = 15; + extTiming.DataSetupTime = 8; + extTiming.BusTurnAroundDuration = 0; + extTiming.CLKDivision = 16; + extTiming.DataLatency = 17; + extTiming.AccessMode = FMC_OR_FSMC(ACCESS_MODE_A); + + #ifdef STM32F446xx + __HAL_RCC_FMC_CLK_ENABLE(); + #else + __HAL_RCC_FSMC_CLK_ENABLE(); + #endif for (uint16_t i = 0; pinMap_FSMC[i].pin != NC; i++) pinmap_pinout(pinMap_FSMC[i].pin, pinMap_FSMC); @@ -90,9 +101,9 @@ void TFT_FSMC::init() { controllerAddress = FSMC_BANK1_1; #ifdef PF0 switch (nsBank) { - case FSMC_NORSRAM_BANK2: controllerAddress = FSMC_BANK1_2 ; break; - case FSMC_NORSRAM_BANK3: controllerAddress = FSMC_BANK1_3 ; break; - case FSMC_NORSRAM_BANK4: controllerAddress = FSMC_BANK1_4 ; break; + case FMC_OR_FSMC(NORSRAM_BANK2): controllerAddress = FSMC_BANK1_2; break; + case FMC_OR_FSMC(NORSRAM_BANK3): controllerAddress = FSMC_BANK1_3; break; + case FMC_OR_FSMC(NORSRAM_BANK4): controllerAddress = FSMC_BANK1_4; break; } #endif @@ -100,49 +111,44 @@ void TFT_FSMC::init() { HAL_SRAM_Init(&SRAMx, &timing, &extTiming); + __HAL_RCC_DMA2_CLK_ENABLE(); + #ifdef STM32F1xx - __HAL_RCC_DMA1_CLK_ENABLE(); - DMAtx.Instance = DMA1_Channel1; + DMAtx.Instance = DMA2_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; - DMAtx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - DMAtx.Init.MemBurst = DMA_MBURST_SINGLE; - DMAtx.Init.PeriphBurst = DMA_PBURST_SINGLE; + DMAtx.Instance = DMA2_Stream0; + DMAtx.Init.Channel = DMA_CHANNEL_0; + DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; + DMAtx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; + DMAtx.Init.MemBurst = DMA_MBURST_SINGLE; + DMAtx.Init.PeriphBurst = DMA_PBURST_SINGLE; #endif - DMAtx.Init.Direction = DMA_MEMORY_TO_MEMORY; - DMAtx.Init.MemInc = DMA_MINC_DISABLE; - DMAtx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD; - DMAtx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD; - DMAtx.Init.Mode = DMA_NORMAL; - DMAtx.Init.Priority = DMA_PRIORITY_HIGH; + DMAtx.Init.Direction = DMA_MEMORY_TO_MEMORY; + DMAtx.Init.MemInc = DMA_MINC_DISABLE; + DMAtx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD; + DMAtx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD; + DMAtx.Init.Mode = DMA_NORMAL; + DMAtx.Init.Priority = DMA_PRIORITY_HIGH; LCD = (LCD_CONTROLLER_TypeDef *)controllerAddress; } uint32_t TFT_FSMC::getID() { - uint32_t id; writeReg(0); - id = LCD->RAM; - - if (id == 0) - id = readID(LCD_READ_ID); - if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) - id = readID(LCD_READ_ID4); + uint32_t id = LCD->RAM; + if (id == 0) id = readID(LCD_READ_ID); + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) id = readID(LCD_READ_ID4); return id; } -uint32_t TFT_FSMC::readID(const tft_data_t inReg) { - uint32_t id; +uint32_t TFT_FSMC::readID(tft_data_t inReg) { writeReg(inReg); - id = LCD->RAM; // dummy read + uint32_t id = LCD->RAM; // dummy read id = inReg << 24; id |= (LCD->RAM & 0x00FF) << 16; id |= (LCD->RAM & 0x00FF) << 8; - id |= LCD->RAM & 0x00FF; + id |= (LCD->RAM & 0x00FF); return id; } @@ -155,7 +161,9 @@ bool TFT_FSMC::isBusy() { #define __IS_DMA_CONFIGURED(__HANDLE__) ((__HANDLE__)->Instance->PAR != 0) #endif - if (!__IS_DMA_CONFIGURED(&DMAtx)) return false; + #ifdef __IS_DMA_CONFIGURED + if (!__IS_DMA_CONFIGURED(&DMAtx)) return false; + #endif // Check if DMA transfer error or transfer complete flags are set if ((__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TE_FLAG_INDEX(&DMAtx)) == 0) && (__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TC_FLAG_INDEX(&DMAtx)) == 0)) return true; @@ -174,8 +182,6 @@ 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_fsmc.h b/Marlin/src/HAL/STM32/tft/tft_fsmc.h index 1776cbdb0f65..2647923e8ee3 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.h +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.h @@ -28,11 +28,7 @@ #elif defined(STM32F4xx) #include "stm32f4xx_hal.h" #else - #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." + #error "FSMC/FMC TFT is currently only supported on STM32F1 and STM32F4 hardware." #endif #ifndef LCD_READ_ID @@ -55,6 +51,12 @@ typedef struct { __IO tft_data_t RAM; } LCD_CONTROLLER_TypeDef; +#ifdef STM32F446xx + #define FMC_OR_FSMC(N) _CAT(FMC_, N) +#else + #define FMC_OR_FSMC(N) _CAT(FSMC_, N) +#endif + class TFT_FSMC { private: static SRAM_HandleTypeDef SRAMx; @@ -62,7 +64,7 @@ class TFT_FSMC { static LCD_CONTROLLER_TypeDef *LCD; - static uint32_t readID(const tft_data_t reg); + static uint32_t readID(tft_data_t inReg); static void transmit(tft_data_t data) { LCD->RAM = data; __DSB(); } static void transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count); static void transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count); @@ -94,7 +96,11 @@ class TFT_FSMC { #ifdef STM32F1xx #define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE) #elif defined(STM32F4xx) - #define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FSMC) + #ifdef STM32F446xx + #define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FMC) + #else + #define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FSMC) + #endif #define FSMC_BANK1_1 0x60000000U #define FSMC_BANK1_2 0x64000000U #define FSMC_BANK1_3 0x68000000U @@ -104,35 +110,35 @@ class TFT_FSMC { #endif const PinMap pinMap_FSMC[] = { - {PD_14, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D00 - {PD_15, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D01 - {PD_0, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D02 - {PD_1, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D03 - {PE_7, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D04 - {PE_8, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D05 - {PE_9, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D06 - {PE_10, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D07 + {PD_14, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D00 + {PD_15, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D01 + {PD_0, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D02 + {PD_1, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D03 + {PE_7, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D04 + {PE_8, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D05 + {PE_9, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D06 + {PE_10, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D07 #if DISABLED(TFT_INTERFACE_FSMC_8BIT) - {PE_11, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D08 - {PE_12, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D09 - {PE_13, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D10 - {PE_14, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D11 - {PE_15, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D12 - {PD_8, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D13 - {PD_9, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D14 - {PD_10, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D15 + {PE_11, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D08 + {PE_12, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D09 + {PE_13, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D10 + {PE_14, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D11 + {PE_15, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D12 + {PD_8, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D13 + {PD_9, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D14 + {PD_10, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D15 #endif - {PD_4, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_NOE - {PD_5, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_NWE + {PD_4, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_NOE + {PD_5, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_NWE {NC, NP, 0} }; const PinMap pinMap_FSMC_CS[] = { - {PD_7, (void *)FSMC_NORSRAM_BANK1, FSMC_PIN_DATA}, // FSMC_NE1 + {PD_7, (void *)FMC_OR_FSMC(NORSRAM_BANK1), FSMC_PIN_DATA}, // FSMC_NE1 #ifdef PF0 - {PG_9, (void *)FSMC_NORSRAM_BANK2, FSMC_PIN_DATA}, // FSMC_NE2 - {PG_10, (void *)FSMC_NORSRAM_BANK3, FSMC_PIN_DATA}, // FSMC_NE3 - {PG_12, (void *)FSMC_NORSRAM_BANK4, FSMC_PIN_DATA}, // FSMC_NE4 + {PG_9, (void *)FMC_OR_FSMC(NORSRAM_BANK2), FSMC_PIN_DATA}, // FSMC_NE2 + {PG_10, (void *)FMC_OR_FSMC(NORSRAM_BANK3), FSMC_PIN_DATA}, // FSMC_NE3 + {PG_12, (void *)FMC_OR_FSMC(NORSRAM_BANK4), FSMC_PIN_DATA}, // FSMC_NE4 #endif {NC, NP, 0} }; diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 0895bb46a08f..1dfcabdefb86 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -459,7 +459,7 @@ #define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG) #define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG) #define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE) -#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE) +#define BOARD_TRONXY_CXY_446_V10 5245 // TRONXY CXY-446-V10-220413/CXY-V6-191121 (STM32F446ZE) #define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1 #define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6. #define BOARD_I3DBEEZ9_V1 5248 // I3DBEEZ9 V1 (STM32F407ZG) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index af32d8c11968..53d31c016819 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -806,8 +806,8 @@ #include "stm32f4/pins_FYSETC_SPIDER_KING407.h" // STM32F4 env:FYSETC_SPIDER_KING407 #elif MB(MKS_SKIPR_V1) #include "stm32f4/pins_MKS_SKIPR_V1_0.h" // STM32F4 env:mks_skipr_v1 env:mks_skipr_v1_nobootloader -#elif MB(TRONXY_V10) - #include "stm32f4/pins_TRONXY_V10.h" // STM32F4 env:STM32F446_tronxy +#elif MB(TRONXY_CXY_446_V10) + #include "stm32f4/pins_TRONXY_CXY_446_V10.h" // STM32F4 env:TRONXY_CXY_446_V10 env:TRONXY_CXY_446_V10_usb_flash_drive #elif MB(CREALITY_F401RE) #include "stm32f4/pins_CREALITY_F401.h" // STM32F4 env:STM32F401RE_creality #elif MB(BLACKPILL_CUSTOM) @@ -956,6 +956,7 @@ #define BOARD_LINUX_RAMPS 99926 #define BOARD_BTT_MANTA_M4P_V1_0 99927 #define BOARD_VAKE403D 99928 + #define BOARD_TRONXY_V10 99929 #if MB(MKS_13) #error "BOARD_MKS_13 is now BOARD_MKS_GEN_13. Please update your configuration." @@ -1015,6 +1016,8 @@ #error "BOARD_LINUX_RAMPS is now BOARD_SIMULATED. Please update your configuration." #elif MB(BTT_MANTA_M4P_V1_0) #error "BOARD_BTT_MANTA_M4P_V1_0 is now BOARD_BTT_MANTA_M4P_V2_1. Please update your configuration." + #elif MB(TRONXY_V10) + #error "BOARD_TRONXY_V10 is now BOARD_TRONXY_CXY_446_V10. Please update your configuration." #elif MB(VAKE403D) #error "BOARD_VAKE403D is no longer supported in Marlin." #elif defined(MOTHERBOARD) @@ -1053,6 +1056,7 @@ #undef BOARD_LINUX_RAMPS #undef BOARD_BTT_MANTA_M4P_V1_0 #undef BOARD_VAKE403D + #undef BOARD_TRONXY_V10 #endif diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h new file mode 100644 index 000000000000..00bf9de93401 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h @@ -0,0 +1,256 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ + +/** + * BOARD_TRONXY_CXY_446_V10 + * + * CXY-V6-191121 / CXY-446-V10-220413 + */ + +#pragma once + +#include "env_validate.h" + +#if EXTRUDERS > 2 || E_STEPPERS > 2 || NUM_RUNOUT_SENSORS > 2 + #error "TRONXY CXY 446 V10 only supports 2 Extruders / E steppers / Filament Runout sensors." +#endif + +#define BOARD_INFO_NAME "BOARD_TRONXY_CXY_446_V10" +#define DEFAULT_MACHINE_NAME "TRONXY CXY 446 V10" + +#define STEP_TIMER 6 +#define TEMP_TIMER 14 + +// +// EEPROM +// +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + //#define FLASH_EEPROM_EMULATION + #undef NO_EEPROM_SELECTED +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) + #define EEPROM_PAGE_SIZE (0x800U) // 2K, but will use 2x more (4K) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE +#else + #define MARLIN_EEPROM_SIZE 0x800 // 2K (FT24C16A) +#endif + +// +// SPI Flash +// +#define SPI_FLASH // W25Q16 +#if ENABLED(SPI_FLASH) + #define SPI_FLASH_SIZE 0x1000000 // 16MB + #define SPI_FLASH_CS_PIN PG15 + #define SPI_FLASH_MOSI_PIN PB5 + #define SPI_FLASH_MISO_PIN PB4 + #define SPI_FLASH_SCK_PIN PB3 +#endif + +// +// SD Card / Flash Drive +// +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive Support + +// +// SD Card +// +#define ONBOARD_SDIO +#define SD_DETECT_PIN -1 +#define SDIO_CLOCK 4500000 +#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 + +// +// Limit Switches +// +#define X_STOP_PIN PC15 +#define Y_STOP_PIN PC14 + +#if ENABLED(FIX_MOUNTED_PROBE) + #define Z_STOP_PIN PE3 +#else + #define Z_STOP_PIN PC13 +#endif + +// +// Filament Sensors +// +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define FIL_RUNOUT_PIN PE6 + #define FIL_RUNOUT2_PIN PF12 +#endif + +// +// Steppers +// +#define X_ENABLE_PIN PF0 +#define X_STEP_PIN PE5 +#define X_DIR_PIN PF1 + +#define Y_ENABLE_PIN PF5 +#define Y_STEP_PIN PF9 +#define Y_DIR_PIN PF3 + +#define Z_ENABLE_PIN PA5 +#define Z_STEP_PIN PA6 +#define Z_DIR_PIN PF15 + +#define E0_ENABLE_PIN PF14 +#define E0_STEP_PIN PB1 +#define E0_DIR_PIN PF13 + +#define E1_ENABLE_PIN PG5 +#define E1_STEP_PIN PD12 +#define E1_DIR_PIN PG4 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC3 +#define TEMP_1_PIN PC0 +#define TEMP_BED_PIN PC2 + +// +// Heaters +// +#define HEATER_0_PIN PG7 // Hotend #1 Heater +#define HEATER_1_PIN PA15 // Hotend #2 Heater +#define HEATER_BED_PIN PE2 + +// +// Fans +// +#define FAN_SOFT_PWM_REQUIRED + +#define FAN0_PIN PG0 // Part Cooling Fan #1 +#define FAN1_PIN PB6 // Part Cooling Fan #2 +#define FAN2_PIN PG9 // Extruder/Hotend #1 Heatsink Fan +#define FAN3_PIN PF10 // Extruder/Hotend #2 Heatsink Fan +#define CONTROLLER_FAN_PIN PD7 + +// +// Laser / Servos +// +#define SPINDLE_LASER_ENA_PIN PB11 // WiFi Module TXD (Pin5) +#define SPINDLE_LASER_PWM_PIN PB10 // WiFi Module RXD (Pin4) + +// +// NOTE: The PWM pin definition const PinMap PinMap_PWM[] in PeripheralPins.c must be augmented here. +// See PWM_PIN(x) definition for details. +// + +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + #define TOUCH_CS_PIN PD11 + #define TOUCH_SCK_PIN PB13 + #define TOUCH_MISO_PIN PB14 + #define TOUCH_MOSI_PIN PB15 + + #define TFT_RESET_PIN PB12 + #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 FSMC_CS_PIN PG12 + #define FSMC_RS_PIN PG2 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + + #if ENABLED(TFT_LVGL_UI) + #define HAS_SPI_FLASH_FONT 1 + #define HAS_GCODE_PREVIEW 1 + #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 + #define HAS_LANG_SELECT_SCREEN 1 + #define HAS_BAK_VIEW_IN_FLASH 0 + #define HAS_LOGO_IN_FLASH 0 + #elif ANY(TFT_CLASSIC_UI, TFT_COLOR_UI) + //#define TFT_DRIVER ILI9488 + #define TFT_BUFFER_WORDS 14400 + #endif + + // Touch Screen calibration + #if ENABLED(TFT_TRONXY_X5SA) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17181 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11434 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 501 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -9 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + #endif + + #if ENABLED(MKS_ROBIN_TFT43) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X 17184 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 10604 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X -31 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -29 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + #endif +#else + #error "TRONXY CXY 446 V10 only supports TFT with FSMC interface." +#endif + +// +// Power Loss +// +#if ENABLED(PSU_CONTROL) + #define PS_ON_PIN PG10 + #define POWER_LOSS_PIN PE1 +#endif + +// +// Misc. Functions +// +//#define LED_PIN PG10 +#define BEEPER_PIN PA8 diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h deleted file mode 100644 index 97580bf618f9..000000000000 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#pragma once - -#include "env_validate.h" - -#if HOTENDS > 3 || E_STEPPERS > 3 - #error "Tronxy V10 supports up to 3 hotends / E steppers." -#endif - -#define BOARD_INFO_NAME "Tronxy V10" -#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME - -#define STEP_TIMER 6 -#define TEMP_TIMER 14 - -// -// Servos -// -//#define SERVO0_PIN PB10 - -// -// EEPROM -// -#if NO_EEPROM_SELECTED - #undef NO_EEPROM_SELECTED - #if TRONXY_UI > 0 - #define EEPROM_AT24CXX - #else - #define FLASH_EEPROM_EMULATION - #endif -#endif - -#if ENABLED(FLASH_EEPROM_EMULATION) - // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) - #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) - #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) - #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE -#else - #if ENABLED(EEPROM_AT24CXX) - #define AT24CXX_SCL PB8 - #define AT24CXX_SDA PB9 - #define AT24CXX_WP PB7 - #else - #define I2C_EEPROM // AT24C32 - #endif - #define MARLIN_EEPROM_SIZE 0x1000 // 4K -#endif - -// -// SPI Flash -// -//#define SPI_FLASH -#if ENABLED(SPI_FLASH) - #define SPI_FLASH_SIZE 0x200000 // 2MB - #define SPI_FLASH_CS_PIN PG15 // SPI2 - #define SPI_FLASH_SCK_PIN PB3 - #define SPI_FLASH_MISO_PIN PB4 - #define SPI_FLASH_MOSI_PIN PB5 -#endif - -// -// Limit Switches -// -#define X_MIN_PIN PC15 -#define X_MAX_PIN PB0 -#define Y_STOP_PIN PC14 - -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PE3 -#endif - -#if ENABLED(DUAL_Z_ENDSTOP_PROBE) - #if NUM_Z_STEPPERS > 1 && Z_HOME_TO_MAX // Swap Z1/Z2 for dual Z with max homing - #define Z_MIN_PIN PF11 - #define Z_MAX_PIN PC13 - #else - #define Z_MIN_PIN PC13 - #define Z_MAX_PIN PF11 - #endif -#else - #ifndef Z_STOP_PIN - #define Z_STOP_PIN PC13 - #endif -#endif -// -// Filament Sensors -// -#ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN PE6 // MT_DET -#endif -#ifndef FIL_RUNOUT2_PIN - #define FIL_RUNOUT2_PIN PF12 -#endif - -// -// Steppers -// -#define X_ENABLE_PIN PF0 -#define X_STEP_PIN PE5 -#define X_DIR_PIN PF1 - -#define Y_ENABLE_PIN PF5 -#define Y_STEP_PIN PF9 -#define Y_DIR_PIN PF3 - -#define Z_ENABLE_PIN PA5 -#define Z_STEP_PIN PA6 -#define Z_DIR_PIN PF15 - -#define E0_ENABLE_PIN PF14 -#define E0_STEP_PIN PB1 -#define E0_DIR_PIN PF13 - -#define E1_ENABLE_PIN PG5 -#define E1_STEP_PIN PD12 -#define E1_DIR_PIN PG4 - -#define E2_ENABLE_PIN PF7 -#define E2_STEP_PIN PF6 -#define E2_DIR_PIN PF4 - -// -// Temperature Sensors -// -#define TEMP_0_PIN PC3 // TH1 -#define TEMP_BED_PIN PC2 // TB1 - -// -// Heaters / Fans -// -#define HEATER_0_PIN PG7 // HEATER1 -#define HEATER_BED_PIN PE2 // HOT BED -//#define HEATER_BED_INVERTING true - -#define FAN0_PIN PG0 // FAN0 -#define FAN1_PIN PB6 // FAN1 -#define FAN2_PIN PG9 // FAN2 -#define FAN3_PIN PF10 // FAN3 -#define CONTROLLER_FAN_PIN PD7 // BOARD FAN -#define FAN_SOFT_PWM_REQUIRED - -// -// Laser / Spindle -// -#if HAS_CUTTER - #define SPINDLE_LASER_ENA_PIN PB11 // wifi:TX - #if ENABLED(SPINDLE_LASER_USE_PWM) - #define SPINDLE_LASER_PWM_PIN PB10 // wifi:RX-TIM2_CH3 - // The PWM pin definition const PinMap PinMap_PWM[] in PeripheralPins.c must be compounded here - // See PWM_PIN(x) definition for details - #endif -#endif - -// -// Misc -// -#define BEEPER_PIN PA8 - -//#define LED_PIN PG10 -#define PS_ON_PIN PG10 // Temporarily switch the machine with LED simulation - -#if ENABLED(TRONXY_BACKUP_POWER) - #define POWER_LOSS_PIN PF11 // Configure as drop-down input -#else - #define POWER_LOSS_PIN PE1 // Output of LM393 comparator, configured as pullup -#endif -//#define POWER_LM393_PIN PE0 // +V for the LM393 comparator, configured as output high - -#if ENABLED(TFT_TRONXY_X5SA) - #error "TFT_TRONXY_X5SA is not yet supported." -#endif - -#if 0 - -// -// TFT with FSMC interface -// -#if HAS_FSMC_TFT - #define TFT_RESET_PIN PB12 - #define TFT_BACKLIGHT_PIN PG8 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - - #define TFT_CS_PIN PG12 - #define TFT_RS_PIN PG2 - - //#define TFT_WIDTH 480 - //#define TFT_HEIGHT 320 - //#define TFT_PIXEL_OFFSET_X 48 - //#define TFT_PIXEL_OFFSET_Y 32 - //#define TFT_DRIVER ILI9488 - //#define TFT_BUFFER_WORDS 14400 - - #if NEED_TOUCH_PINS - #define TOUCH_CS_PIN PD11 // SPI1_NSS - #define TOUCH_SCK_PIN PB13 // SPI1_SCK - #define TOUCH_MISO_PIN PB14 // SPI1_MISO - #define TOUCH_MOSI_PIN PB15 // SPI1_MOSI - #endif - - #if (LCD_CHIP_INDEX == 1 && (TRONXY_UI == 1 || TRONXY_UI == 2)) || LCD_CHIP_INDEX == 3 - #define TOUCH_CALIBRATION_X -17181 - #define TOUCH_CALIBRATION_Y 11434 - #define TOUCH_OFFSET_X 501 - #define TOUCH_OFFSET_Y -9 - #elif LCD_CHIP_INDEX == 1 && TRONXY_UI == 4 - #define TOUCH_CALIBRATION_X 11166 - #define TOUCH_CALIBRATION_Y 17162 - #define TOUCH_OFFSET_X -10 - #define TOUCH_OFFSET_Y -16 - #elif LCD_CHIP_INDEX == 4 && TRONXY_UI == 3 - //#define TOUCH_CALIBRATION_X 8781 - //#define TOUCH_CALIBRATION_Y 11773 - //#define TOUCH_OFFSET_X -17 - //#define TOUCH_OFFSET_Y -16 - // Upside-down - #define TOUCH_CALIBRATION_X -8553 - #define TOUCH_CALIBRATION_Y -11667 - #define TOUCH_OFFSET_X 253 - #define TOUCH_OFFSET_Y 331 - #elif LCD_CHIP_INDEX == 2 - #define TOUCH_CALIBRATION_X 17184 - #define TOUCH_CALIBRATION_Y 10604 - #define TOUCH_OFFSET_X -31 - #define TOUCH_OFFSET_Y -29 - #endif -#endif - -#endif - -// -// SD Card -// -#define ONBOARD_SDIO -#define SD_DETECT_PIN -1 // PF0, but not connected -#define SDIO_CLOCK 4500000 -#define SDIO_READ_RETRIES 16 diff --git a/buildroot/share/PlatformIO/scripts/tronxy_cxy_446_v10.py b/buildroot/share/PlatformIO/scripts/tronxy_cxy_446_v10.py new file mode 100644 index 000000000000..f3cb94a0620e --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/tronxy_cxy_446_v10.py @@ -0,0 +1,41 @@ +# +# tronxy_cxy_446_v10.py +# Build customizations for env:TRONXY_CXY_446_V10 +# +import pioutil +if pioutil.is_pio_build(): + + import marlin, os + + from SCons.Script import DefaultEnvironment + + env = DefaultEnvironment() + + # Check whether the "update" folder exists + outpath = "update" + if not os.path.exists(outpath): os.makedirs(outpath) + + # Build "fmw_tronxy.hex" and place in "update" folder + def output_target_hex(): + tar_hex = f"{outpath}/fmw_tronxy.hex" + env.AddPostAction( + "$BUILD_DIR/${PROGNAME}.elf", + env.VerboseAction(" ".join([ + "$OBJCOPY", "-O", "ihex", "-R", ".eeprom", + "$BUILD_DIR/${PROGNAME}.elf", tar_hex + ]), "Building %s" % tar_hex) + ) + + # Build "fmw_tronxy.bin" and place in "update" folder + def output_target_bin(): + tar_bin = f"{outpath}/fmw_tronxy.bin" + env.AddPostAction( + "$BUILD_DIR/${PROGNAME}.elf", + env.VerboseAction(" ".join([ + "$OBJCOPY", "-O", "binary", "-R", ".eeprom", + "$BUILD_DIR/${PROGNAME}.elf", tar_bin + ]), "Building %s" % tar_bin) + ) + + output_target_hex() + output_target_bin() diff --git a/ini/renamed.ini b/ini/renamed.ini index 84f6acd7fab9..85f2df286273 100644 --- a/ini/renamed.ini +++ b/ini/renamed.ini @@ -95,3 +95,6 @@ extends = renamed [env:STM32F407ZE_btt_USB] ;=> STM32F407ZE_btt_usb_flash_drive extends = renamed + +[env:STM32F446_tronxy] ;=> TRONXY_CXY_446_V10 +extends = renamed diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 2ba5742f4fec..fb8e9109cfd8 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -812,17 +812,29 @@ upload_protocol = dfu upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE" # -# STM32F446ZET6 ARM Cortex-M4 -# -[env:STM32F446_tronxy] -extends = stm32_variant -board = marlin_STM32F446ZET_tronxy -board_build.offset = 0x10000 -board_build.rename = fmw_tronxy.bin -build_flags = ${stm32_variant.build_flags} - -DSTM32F4xx -build_unflags = ${stm32_variant.build_unflags} -fno-rtti - -DUSBCON -DUSBD_USE_CDC +# TRONXY_CXY_446_V10 (STM32F446ZET6 ARM Cortex-M4) +# +[env:TRONXY_CXY_446_V10] +extends = stm32_variant +board = marlin_STM32F446ZET_tronxy +board_build.ldscript = buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/ldscript.ld +board_build.offset = 0x10000 +board_build.rename = fmw_tronxy.bin +build_flags = ${stm32_variant.build_flags} + -DSTM32F4xx -DUSE_USB_HS + -DUSE_USB_HS_IN_FS +build_unflags = ${stm32_variant.build_unflags} -fno-rtti + -fno-threadsafe-statics -fno-exceptions + -DUSBD_USE_CDC -DUSBCON +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/tronxy_cxy_446_v10.py + +# +# TRONXY_CXY_446_V10 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support +# +[env:TRONXY_CXY_446_V10_usb_flash_drive] +extends = env:TRONXY_CXY_446_V10 +platform_packages = ${stm_flash_drive.platform_packages} # # Blackpill From 1dee4d92c61b14458cd394d1f609f0dc80282092 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 4 Feb 2024 12:09:08 -0600 Subject: [PATCH 190/236] =?UTF-8?q?=F0=9F=94=A7=20TOUCH=5FIDLE=5FSLEEP=5FM?= =?UTF-8?q?INS=20=3D>=20DISPLAY=5FSLEEP=5FMINUTES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow up to #26517 --- Marlin/Configuration.h | 1 - Marlin/Configuration_adv.h | 28 +++++------ Marlin/src/inc/Changes.h | 4 +- Marlin/src/inc/Conditionals_LCD.h | 3 -- Marlin/src/inc/Conditionals_adv.h | 2 +- Marlin/src/inc/SanityCheck.h | 22 ++++----- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 2 +- .../dogm/u8g_dev_tft_upscale_from_128x64.cpp | 34 +++++++------- Marlin/src/lcd/marlinui.cpp | 47 ++++++------------- Marlin/src/lcd/marlinui.h | 18 +++---- Marlin/src/lcd/menu/menu.cpp | 3 ++ Marlin/src/lcd/menu/menu_media.cpp | 1 - Marlin/src/lcd/tft/touch.cpp | 18 ++++--- Marlin/src/lcd/tft/touch.h | 3 +- Marlin/src/lcd/tft/ui_color_ui.cpp | 2 +- Marlin/src/lcd/tft/ui_common.cpp | 4 +- Marlin/src/lcd/tft/ui_common.h | 6 +-- Marlin/src/lcd/touch/touch_buttons.cpp | 21 ++++++--- Marlin/src/lcd/touch/touch_buttons.h | 3 +- Marlin/src/module/settings.cpp | 2 +- Marlin/src/module/temperature.cpp | 8 ++-- 21 files changed, 106 insertions(+), 126 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9a0cd1addc3c..87908d1821c0 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3414,7 +3414,6 @@ #define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus //#define DISABLE_ENCODER // Disable the click encoder, if any - //#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S. #define TOUCH_SCREEN_CALIBRATION diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 49eea39180f7..558fd70a9e8d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1970,17 +1970,6 @@ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. //#define USE_SMALL_INFOFONT - /** - * Graphical Display Sleep - * - * The U8G library provides sleep / wake functions for SH1106, SSD1306, - * SSD1309, and some other DOGM displays. - * Enable this option to save energy and prevent OLED pixel burn-in. - * Adds the menu item Configuration > LCD Timeout (m) to set a wait period - * from 0 (disabled) to 99 minutes. - */ - //#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen. Set with M255 S. - /** * ST7920-based LCDs can emulate a 16 x 4 character display using * the ST7920 character-generator for very fast screen updates. @@ -2229,13 +2218,20 @@ //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan #endif -// -// LCD Backlight Timeout -// Requires a display with a controllable backlight -// +/** + * Display Sleep + * Enable this option to save energy and prevent OLED pixel burn-in. + */ +//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen + +/** + * LCD Backlight Timeout + * Requires a display with a controllable backlight + */ //#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight + #if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS) - #define EDITABLE_DISPLAY_TIMEOUT // Edit timeout with M255 S and a menu item + #define EDITABLE_DISPLAY_TIMEOUT // Edit sleep / backlight timeout with M255 S and a menu item #endif // diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 47f23babb25a..6156326f6926 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -600,7 +600,9 @@ #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)." + #error "TOUCH_IDLE_SLEEP (seconds) is now DISPLAY_SLEEP_MINUTES (minutes)." +#elif defined(TOUCH_IDLE_SLEEP_MINS) + #error "TOUCH_IDLE_SLEEP_MINS is now DISPLAY_SLEEP_MINUTES." #elif defined(LCD_BACKLIGHT_TIMEOUT) #error "LCD_BACKLIGHT_TIMEOUT (seconds) is now LCD_BACKLIGHT_TIMEOUT_MINS (minutes)." #elif defined(LCD_SET_PROGRESS_MANUALLY) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index bff742a5bcb7..af2ea772c3db 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1850,9 +1850,6 @@ // This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046' #if ENABLED(TOUCH_SCREEN) - #if TOUCH_IDLE_SLEEP_MINS - #define HAS_TOUCH_SLEEP 1 - #endif #if NONE(TFT_TOUCH_DEVICE_GT911, TFT_TOUCH_DEVICE_XPT2046) #define TFT_TOUCH_DEVICE_XPT2046 // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 379600d91574..93acd89aa981 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -912,7 +912,7 @@ #if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, HAS_MEDIA) #define HAS_LEDS_OFF_FLAG 1 #endif -#if defined(DISPLAY_SLEEP_MINUTES) || defined(TOUCH_IDLE_SLEEP_MINS) +#ifdef DISPLAY_SLEEP_MINUTES #define HAS_DISPLAY_SLEEP 1 #endif #ifdef LCD_BACKLIGHT_TIMEOUT_MINS diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a5ba460f7f60..0736e96629d6 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2785,6 +2785,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #if HAS_BACKLIGHT_TIMEOUT #if !HAS_ENCODER_ACTION && DISABLED(HAS_DWIN_E3V2) #error "LCD_BACKLIGHT_TIMEOUT_MINS requires an LCD with encoder or keypad." + #elif HAS_DISPLAY_SLEEP + #error "LCD_BACKLIGHT_TIMEOUT_MINS and DISPLAY_SLEEP_MINUTES are not currently supported at the same time." #elif ENABLED(NEOPIXEL_BKGD_INDEX_FIRST) #if PIN_EXISTS(LCD_BACKLIGHT) #error "LCD_BACKLIGHT_PIN and NEOPIXEL_BKGD_INDEX_FIRST are not supported at the same time." @@ -2794,6 +2796,15 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #elif !PIN_EXISTS(LCD_BACKLIGHT) && DISABLED(HAS_DWIN_E3V2) #error "LCD_BACKLIGHT_TIMEOUT_MINS requires LCD_BACKLIGHT_PIN, NEOPIXEL_BKGD_INDEX_FIRST, or an Ender-3 V2 DWIN LCD." #endif +#elif HAS_DISPLAY_SLEEP + #if NONE(TOUCH_SCREEN, HAS_MARLINUI_U8GLIB) || ANY(IS_U8GLIB_LM6059_AF, IS_U8GLIB_ST7565_64128, REPRAPWORLD_GRAPHICAL_LCD, FYSETC_MINI_12864, CR10_STOCKDISPLAY, MINIPANEL) + #error "DISPLAY_SLEEP_MINUTES is not supported by your display." + #undef HAS_DISPLAY_SLEEP + #elif !WITHIN(DISPLAY_SLEEP_MINUTES, 0, 255) + #error "DISPLAY_SLEEP_MINUTES must be between 0 and 255." + #elif DISABLED(EDITABLE_DISPLAY_TIMEOUT) && DISPLAY_SLEEP_MINUTES == 0 + #error "DISPLAY_SLEEP_MINUTES must be greater than 0 with EDITABLE_DISPLAY_TIMEOUT disabled." + #endif #endif // Startup Tune requirements @@ -2806,17 +2817,6 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #endif #endif -/** - * Display Sleep is not supported by these common displays - */ -#if HAS_DISPLAY_SLEEP - #if ANY(IS_U8GLIB_LM6059_AF, IS_U8GLIB_ST7565_64128, REPRAPWORLD_GRAPHICAL_LCD, FYSETC_MINI_12864, CR10_STOCKDISPLAY, MINIPANEL) - #error "DISPLAY_SLEEP_MINUTES is not supported by your display." - #elif !WITHIN(DISPLAY_SLEEP_MINUTES, 0, 255) - #error "DISPLAY_SLEEP_MINUTES must be between 0 and 255." - #endif -#endif - /** * Some boards forbid the use of -1 Native USB */ diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 08e197ebb503..cfff78ad40fe 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -377,7 +377,7 @@ void MarlinUI::draw_kill_screen() { void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #if HAS_DISPLAY_SLEEP - void MarlinUI::sleep_display(const bool sleep) { sleep ? u8g.sleepOn() : u8g.sleepOff(); } + void MarlinUI::sleep_display(const bool sleep/*=true*/) { sleep ? u8g.sleepOn() : u8g.sleepOff(); } #endif #if HAS_LCD_BRIGHTNESS 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 c6aff38dc9b5..51bbee78b9df 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 @@ -78,10 +78,6 @@ TFT_IO tftio; #include "../marlinui.h" #endif -#if HAS_TOUCH_BUTTONS && HAS_TOUCH_SLEEP - #define HAS_TOUCH_BUTTONS_SLEEP 1 -#endif - #include "../touch/touch_buttons.h" #include "../scaled_tft.h" @@ -389,25 +385,29 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u case U8G_DEV_MSG_PAGE_FIRST: { page = 0; - #if HAS_TOUCH_BUTTONS_SLEEP - static bool sleepCleared; - if (touchBt.isSleeping()) { - if (!sleepCleared) { - sleepCleared = true; - u8g_upscale_clear_lcd(u8g, dev, buffer); - TERN_(HAS_TOUCH_BUTTONS, redrawTouchButtons = true); + #if HAS_TOUCH_BUTTONS + #if HAS_DISPLAY_SLEEP + static bool sleepCleared; + if (touchBt.isSleeping()) { + if (!sleepCleared) { + sleepCleared = true; + u8g_upscale_clear_lcd(u8g, dev, buffer); + redrawTouchButtons = true; + } + break; } - break; - } - else - sleepCleared = false; + else + sleepCleared = false; + #endif + drawTouchButtons(u8g, dev); #endif - TERN_(HAS_TOUCH_BUTTONS, drawTouchButtons(u8g, dev)); setWindow(u8g, dev, TFT_PIXEL_OFFSET_X, TFT_PIXEL_OFFSET_Y, X_HI, Y_HI); } break; case U8G_DEV_MSG_PAGE_NEXT: - if (TERN0(HAS_TOUCH_BUTTONS_SLEEP, touchBt.isSleeping())) break; + #if HAS_TOUCH_BUTTONS && HAS_DISPLAY_SLEEP + if (touchBt.isSleeping()) break; + #endif if (++page > (HEIGHT / PAGE_HEIGHT)) return 1; for (uint8_t y = 0; y < PAGE_HEIGHT; ++y) { diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 23cb0a70580b..313131d87aba 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -214,14 +214,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; millis_t MarlinUI::screen_timeout_ms = 0; void MarlinUI::refresh_screen_timeout() { - screen_timeout_ms = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0; - sleep_display(false); + screen_timeout_ms = sleep_timeout_minutes ? millis() + MIN_TO_MS(sleep_timeout_minutes) : 0; + wake_display(); } - #if !HAS_TOUCH_SLEEP && !HAS_MARLINUI_U8GLIB // without DOGM (COLOR_UI) - void MarlinUI::sleep_display(const bool sleep) {} // if unimplemented - #endif - #endif void MarlinUI::init() { @@ -766,25 +762,9 @@ void MarlinUI::init() { draw_kill_screen(); } - #if HAS_TOUCH_SLEEP - #if HAS_TOUCH_BUTTONS - #include "touch/touch_buttons.h" - #else - #include "tft/touch.h" - #endif - // Wake up a sleeping TFT - void MarlinUI::wakeup_screen() { - TERN(HAS_TOUCH_BUTTONS, touchBt.wakeUp(), touch.wakeUp()); - } - #if HAS_DISPLAY_SLEEP && !HAS_MARLINUI_U8GLIB // without DOGM (COLOR_UI) - void MarlinUI::sleep_display(const bool sleep) { - if (!sleep) wakeup_screen(); // relay extra wake up events - } - #endif - #endif - void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { - TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up the TFT with most buttons + wake_display(); // Wake the screen for any click sound + TERN_(HAS_MARLINUI_MENU, refresh()); #if HAS_ENCODER_ACTION @@ -1063,7 +1043,7 @@ void MarlinUI::init() { abs_diff = epps; // Treat as a full step size encoderDiff = (encoderDiff < 0 ? -1 : 1) * abs_diff; // ...in the spin direction. } - TERN_(HAS_TOUCH_SLEEP, if (lastEncoderDiff != encoderDiff) wakeup_screen()); + if (lastEncoderDiff != encoderDiff) wake_display(); lastEncoderDiff = encoderDiff; #endif @@ -1448,14 +1428,14 @@ void MarlinUI::init() { #endif // HAS_ENCODER_ACTION +#endif // HAS_WIRED_LCD + +void MarlinUI::completion_feedback(const bool good/*=true*/) { + wake_display(); // Wake the screen for all audio feedback #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(); - } + if (good) OKAY_BUZZ(); else ERR_BUZZ(); #endif - -#endif // HAS_WIRED_LCD +} void MarlinUI::host_notify_P(PGM_P const pstr) { TERN_(HOST_STATUS_NOTIFICATIONS, hostui.notify_P(pstr)); @@ -1574,7 +1554,7 @@ void MarlinUI::host_notify(const char * const cstr) { */ void MarlinUI::_set_alert(const char * const ustr, const int8_t level, const bool pgm) { pgm ? set_status_and_level_P(ustr, level) : set_status_and_level(ustr, level); - TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); + wake_display(); TERN_(HAS_MARLINUI_MENU, return_to_status()); } @@ -1722,7 +1702,8 @@ void MarlinUI::host_notify(const char * const cstr) { defer_status_screen(); #endif - TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); + wake_display(); + TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_open(PROMPT_PAUSE_RESUME, F("UI Pause"), F("Resume"))); LCD_MESSAGE(MSG_PRINT_PAUSED); diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index d578826e4970..04f4aea24ff7 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -292,9 +292,11 @@ class MarlinUI { static constexpr uint8_t sleep_timeout_max = 99; static millis_t screen_timeout_ms; static void refresh_screen_timeout(); - static void sleep_display(const bool sleep=true); #endif + static void sleep_display(const bool=true) IF_DISABLED(HAS_DISPLAY_SLEEP, {}); + static void wake_display() { sleep_display(false); } + #if HAS_DWIN_E3V2_BASIC static void refresh(); #else @@ -582,16 +584,7 @@ class MarlinUI { static void pause_filament_display(const millis_t ms=millis()) { next_filament_display = ms + 5000UL; } #endif - #if HAS_TOUCH_SLEEP - static void wakeup_screen(); - #endif - static void quick_feedback(const bool clear_buttons=true); - #if HAS_SOUND - static void completion_feedback(const bool good=true); - #else - static void completion_feedback(const bool=true) { TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); } - #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) static void draw_hotend_status(const uint8_t row, const uint8_t extruder); @@ -604,7 +597,7 @@ class MarlinUI { static void status_screen(); - #endif + #endif // HAS_WIRED_LCD #if HAS_MARLINUI_U8GLIB static bool drawing_screen, first_page; @@ -635,9 +628,10 @@ class MarlinUI { #if !HAS_WIRED_LCD static void quick_feedback(const bool=true) {} - static void completion_feedback(const bool=true) {} #endif + static void completion_feedback(const bool good=true); + #if HAS_MEDIA #if ALL(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 1c77d9a0923c..e98c9b48c04a 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -168,6 +168,9 @@ void MenuEditItemBase::goto_edit_screen( */ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, const uint8_t top/*=0*/, const uint8_t items/*=0*/) { if (currentScreen != screen) { + + wake_display(); + thermalManager.set_menu_cold_override(false); TERN_(IS_DWIN_MARLINUI, did_first_redraw = false); diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index daa396601f2d..42ff2b1f2634 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -48,7 +48,6 @@ void lcd_sd_updir() { goto_screen(menu_media, sd_encoder_position, sd_top_line, sd_items); sd_encoder_position = 0xFFFF; defer_status_screen(); - TERN_(HAS_TOUCH_SLEEP, ui.wakeup_screen()); } #endif diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index d325355002f5..8ebfc9140982 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -38,6 +38,8 @@ #include "tft.h" +Touch touch; + bool Touch::enabled = true; int16_t Touch::x, Touch::y; touch_control_t Touch::controls[]; @@ -48,7 +50,7 @@ millis_t Touch::next_touch_ms = 0, Touch::repeat_delay, Touch::touch_time; TouchControlType Touch::touch_control_type = NONE; -#if HAS_TOUCH_SLEEP +#if HAS_DISPLAY_SLEEP millis_t Touch::next_sleep_ms; // = 0 #endif #if HAS_RESUME_CONTINUE @@ -59,7 +61,7 @@ void Touch::init() { TERN_(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration_reset()); reset(); io.init(); - TERN_(HAS_TOUCH_SLEEP, wakeUp()); + TERN_(HAS_DISPLAY_SLEEP, wakeUp()); enable(); } @@ -278,7 +280,7 @@ bool Touch::get_point(int16_t * const x, int16_t * const y) { #endif #endif - #if HAS_TOUCH_SLEEP + #if HAS_DISPLAY_SLEEP if (is_touched) wakeUp(); else if (!isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen()) @@ -288,7 +290,7 @@ bool Touch::get_point(int16_t * const x, int16_t * const y) { return is_touched; } -#if HAS_TOUCH_SLEEP +#if HAS_DISPLAY_SLEEP void Touch::sleepTimeout() { #if HAS_LCD_BRIGHTNESS @@ -308,12 +310,14 @@ bool Touch::get_point(int16_t * const x, int16_t * const y) { next_touch_ms = millis() + 100; safe_delay(20); } - next_sleep_ms = millis() + MIN_TO_MS(ui.sleep_timeout_minutes); + next_sleep_ms = ui.sleep_timeout_minutes ? millis() + MIN_TO_MS(ui.sleep_timeout_minutes) : 0; } -#endif // HAS_TOUCH_SLEEP + void MarlinUI::sleep_display(const bool sleep/*=true*/) { + if (!sleep) touch.wakeUp(); + } -Touch touch; +#endif // HAS_DISPLAY_SLEEP bool MarlinUI::touch_pressed() { return touch.is_clicked(); diff --git a/Marlin/src/lcd/tft/touch.h b/Marlin/src/lcd/tft/touch.h index 93f9327a15b3..efbd427c31dc 100644 --- a/Marlin/src/lcd/tft/touch.h +++ b/Marlin/src/lcd/tft/touch.h @@ -71,7 +71,6 @@ typedef struct __attribute__((__packed__)) { #define UBL_REPEAT_DELAY 125 #define FREE_MOVE_RANGE 32 -#define TSLP_PREINIT 0 #define TSLP_SLEEPING 1 class Touch { @@ -105,7 +104,7 @@ class Touch { } static void disable() { enabled = false; } static void enable() { enabled = true; } - #if HAS_TOUCH_SLEEP + #if HAS_DISPLAY_SLEEP static millis_t next_sleep_ms; static bool isSleeping() { return next_sleep_ms == TSLP_SLEEPING; } static void sleepTimeout(); diff --git a/Marlin/src/lcd/tft/ui_color_ui.cpp b/Marlin/src/lcd/tft/ui_color_ui.cpp index 4febd29865d4..279ea9715a19 100644 --- a/Marlin/src/lcd/tft/ui_color_ui.cpp +++ b/Marlin/src/lcd/tft/ui_color_ui.cpp @@ -47,7 +47,7 @@ void MarlinUI::tft_idle() { #if ENABLED(TOUCH_SCREEN) - if (TERN0(HAS_TOUCH_SLEEP, lcd_sleep_task())) return; + if (TERN0(HAS_DISPLAY_SLEEP, lcd_sleep_task())) return; if (draw_menu_navigation) { add_control(NAVIGATION_PAGE_UP_X, NAVIGATION_PAGE_UP_Y, PAGE_UP, imgPageUp, encoderTopLine > 0); add_control(NAVIGATION_PAGE_DOWN_X, NAVIGATION_PAGE_DOWN_Y, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items); diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp index a1766b067605..944be77ab5c9 100644 --- a/Marlin/src/lcd/tft/ui_common.cpp +++ b/Marlin/src/lcd/tft/ui_common.cpp @@ -188,7 +188,7 @@ void moveAxis(const AxisEnum axis, const int8_t direction) { #endif -#if HAS_TOUCH_SLEEP +#if ALL(TOUCH_SCREEN, HAS_DISPLAY_SLEEP) bool lcd_sleep_task() { static bool sleepCleared; @@ -207,7 +207,7 @@ void moveAxis(const AxisEnum axis, const int8_t direction) { return false; } -#endif // HAS_TOUCH_SLEEP +#endif void text_line(const uint16_t y, uint16_t color) { tft.canvas(0, y, TFT_WIDTH, MENU_ITEM_HEIGHT); diff --git a/Marlin/src/lcd/tft/ui_common.h b/Marlin/src/lcd/tft/ui_common.h index 8229ab36abfa..3a67768f352f 100644 --- a/Marlin/src/lcd/tft/ui_common.h +++ b/Marlin/src/lcd/tft/ui_common.h @@ -104,9 +104,9 @@ void disable_steppers(); #if HAS_EXTRUDERS void e_select(); #endif -#endif -#if HAS_TOUCH_SLEEP - bool lcd_sleep_task(); + #if HAS_DISPLAY_SLEEP + bool lcd_sleep_task(); + #endif #endif void draw_heater_status(uint16_t x, uint16_t y, const int8_t heater); diff --git a/Marlin/src/lcd/touch/touch_buttons.cpp b/Marlin/src/lcd/touch/touch_buttons.cpp index 652a043714d8..f6f4c66e77a4 100644 --- a/Marlin/src/lcd/touch/touch_buttons.cpp +++ b/Marlin/src/lcd/touch/touch_buttons.cpp @@ -37,7 +37,7 @@ #error "Unknown Touch Screen Type." #endif -#if HAS_TOUCH_SLEEP +#if HAS_DISPLAY_SLEEP millis_t TouchButtons::next_sleep_ms; #endif @@ -58,7 +58,9 @@ TouchButtons touchBt; void TouchButtons::init() { touchIO.init(); - TERN_(HAS_TOUCH_SLEEP, next_sleep_ms = millis() + SEC_TO_MS(ui.sleep_timeout_minutes * 60)); + #if HAS_DISPLAY_SLEEP + next_sleep_ms = ui.sleep_timeout_minutes ? millis() + MIN_TO_MS(ui.sleep_timeout_minutes) : 0; + #endif } uint8_t TouchButtons::read_buttons() { @@ -70,10 +72,10 @@ uint8_t TouchButtons::read_buttons() { const bool is_touched = TOUCH_PORTRAIT == _TOUCH_ORIENTATION ? touchIO.getRawPoint(&y, &x) : touchIO.getRawPoint(&x, &y); - #if HAS_TOUCH_SLEEP + #if HAS_DISPLAY_SLEEP if (is_touched) wakeUp(); - else if (!isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen()) + else if (next_sleep_ms && !isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen()) sleepTimeout(); #endif @@ -129,7 +131,7 @@ uint8_t TouchButtons::read_buttons() { return 0; } -#if HAS_TOUCH_SLEEP +#if HAS_DISPLAY_SLEEP void TouchButtons::sleepTimeout() { #if HAS_LCD_BRIGHTNESS @@ -139,6 +141,7 @@ uint8_t TouchButtons::read_buttons() { #endif next_sleep_ms = TSLP_SLEEPING; } + void TouchButtons::wakeUp() { if (isSleeping()) { #if HAS_LCD_BRIGHTNESS @@ -147,9 +150,13 @@ uint8_t TouchButtons::read_buttons() { WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif } - next_sleep_ms = millis() + MIN_TO_MS(ui.sleep_timeout_minutes); + next_sleep_ms = ui.sleep_timeout_minutes ? millis() + MIN_TO_MS(ui.sleep_timeout_minutes) : 0; + } + + void MarlinUI::sleep_display(const bool sleep/*=true*/) { + if (!sleep) touchBt.wakeUp(); } -#endif // HAS_TOUCH_SLEEP +#endif // HAS_DISPLAY_SLEEP #endif // HAS_TOUCH_BUTTONS diff --git a/Marlin/src/lcd/touch/touch_buttons.h b/Marlin/src/lcd/touch/touch_buttons.h index 39768f2594b7..bfb86c6b6f4a 100644 --- a/Marlin/src/lcd/touch/touch_buttons.h +++ b/Marlin/src/lcd/touch/touch_buttons.h @@ -53,14 +53,13 @@ #define BUTTON_Y_HI (TFT_HEIGHT) - BUTTON_SPACING #define BUTTON_Y_LO BUTTON_Y_HI - BUTTON_HEIGHT -#define TSLP_PREINIT 0 #define TSLP_SLEEPING 1 class TouchButtons { public: static void init(); static uint8_t read_buttons(); - #if HAS_TOUCH_SLEEP + #if HAS_DISPLAY_SLEEP static millis_t next_sleep_ms; static bool isSleeping() { return next_sleep_ms == TSLP_SLEEPING; } static void sleepTimeout(); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 2dc48ebbf0ad..b382f80d5149 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -3468,7 +3468,7 @@ void MarlinSettings::reset() { #if HAS_BACKLIGHT_TIMEOUT ui.backlight_timeout_minutes = LCD_BACKLIGHT_TIMEOUT_MINS; #elif HAS_DISPLAY_SLEEP - ui.sleep_timeout_minutes = TERN(TOUCH_SCREEN, TOUCH_IDLE_SLEEP_MINS, DISPLAY_SLEEP_MINUTES); + ui.sleep_timeout_minutes = DISPLAY_SLEEP_MINUTES; #endif #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 4ff62d017262..5ac26794a403 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -854,11 +854,11 @@ volatile bool Temperature::raw_temps_ready = false; #endif } // every 2 seconds - // Timeout after MAX_CYCLE_TIME_PID_AUTOTUNE minutes since the last undershoot/overshoot cycle - #ifndef MAX_CYCLE_TIME_PID_AUTOTUNE - #define MAX_CYCLE_TIME_PID_AUTOTUNE 20L + // Timeout after PID_AUTOTUNE_MAX_CYCLE_MINS minutes since the last undershoot/overshoot cycle + #ifndef PID_AUTOTUNE_MAX_CYCLE_MINS + #define PID_AUTOTUNE_MAX_CYCLE_MINS 20L #endif - if ((ms - _MIN(t1, t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) { + if ((ms - _MIN(t1, t2)) > MIN_TO_MS(PID_AUTOTUNE_MAX_CYCLE_MINS)) { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_TUNING_TIMEOUT)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT)); From d9396929aab56121698d4acde1b04add1574f43d Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:13:03 -0800 Subject: [PATCH 191/236] =?UTF-8?q?=F0=9F=A9=B9=20Update=20BTT=20GTR=20v1.?= =?UTF-8?q?0=20DIAG=20jumper/pin=20(#26764)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 3 ++- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 519bb7651a67..a44b83439b8d 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -681,7 +681,8 @@ #if !USE_SENSORLESS #if ENABLED(USES_DIAG_JUMPERS) && DISABLED(DIAG_JUMPERS_REMOVED) #warning "Motherboard DIAG jumpers must be removed when SENSORLESS_HOMING is disabled. (Define DIAG_JUMPERS_REMOVED to suppress this warning.)" - #elif ENABLED(USES_DIAG_PINS) && DISABLED(DIAG_PINS_REMOVED) + #endif + #if ENABLED(USES_DIAG_PINS) && DISABLED(DIAG_PINS_REMOVED) #warning "Driver DIAG pins must be physically removed unless SENSORLESS_HOMING is enabled. (See https://bit.ly/2ZPRlt0) (Define DIAG_PINS_REMOVED to suppress this warning.)" #endif #endif 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 2830fc3b74dc..cd5755539bfc 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -31,7 +31,7 @@ #define BOARD_INFO_NAME "BTT GTR V1.0" -#define USES_DIAG_JUMPERS +#define USES_DIAG_PINS // DIAG jumpers rendered useless due to a board design error #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support #define M5_EXTENDER // The M5 extender is attached @@ -106,6 +106,7 @@ // Pins on the extender // #if ENABLED(M5_EXTENDER) + #define USES_DIAG_JUMPERS // DIAG jumpers work on M5 extender #ifndef X2_STOP_PIN #define X2_STOP_PIN PI4 // M5 M1_STOP #endif From 5003681414eac2f2953ff4430148d23d80036d62 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:14:49 -0800 Subject: [PATCH 192/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20HOTEND=5FIDLE=5FTI?= =?UTF-8?q?MEOUT=20with=20no=20heated=20bed=20(#26746)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/hotend_idle.h | 4 +++- Marlin/src/lcd/menu/menu_configuration.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/hotend_idle.h b/Marlin/src/feature/hotend_idle.h index a4229153c966..d215e27bc564 100644 --- a/Marlin/src/feature/hotend_idle.h +++ b/Marlin/src/feature/hotend_idle.h @@ -32,7 +32,9 @@ typedef struct { timeout = HOTEND_IDLE_TIMEOUT_SEC; trigger = HOTEND_IDLE_MIN_TRIGGER; nozzle_target = HOTEND_IDLE_NOZZLE_TARGET; - bed_target = HOTEND_IDLE_BED_TARGET; + #if HAS_HEATED_BED + bed_target = HOTEND_IDLE_BED_TARGET; + #endif } } hotend_idle_settings_t; diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 6a992b8f2fd6..bd5ed492a17f 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -265,7 +265,9 @@ void menu_advanced_settings(); EDIT_ITEM(int3, MSG_TIMEOUT, &c.timeout, 0, 999); EDIT_ITEM(int3, MSG_TEMPERATURE, &c.trigger, 0, thermalManager.hotend_max_target(0)); EDIT_ITEM(int3, MSG_HOTEND_IDLE_NOZZLE_TARGET, &c.nozzle_target, 0, thermalManager.hotend_max_target(0)); - EDIT_ITEM(int3, MSG_HOTEND_IDLE_BED_TARGET, &c.bed_target, 0, BED_MAX_TARGET); + #if HAS_HEATED_BED + EDIT_ITEM(int3, MSG_HOTEND_IDLE_BED_TARGET, &c.bed_target, 0, BED_MAX_TARGET); + #endif END_MENU(); } From ec46a5953956a5e7f3d213439a1fd2bea793860e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 4 Feb 2024 16:06:43 -0600 Subject: [PATCH 193/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fix?= =?UTF-8?q?=20uncrustify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/extras/uncrustify.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/share/extras/uncrustify.cfg b/buildroot/share/extras/uncrustify.cfg index f332d2daf416..73ccadc5e37e 100644 --- a/buildroot/share/extras/uncrustify.cfg +++ b/buildroot/share/extras/uncrustify.cfg @@ -1014,7 +1014,7 @@ sp_cmt_cpp_region = ignore # ignore/add/remove/force/not_defined # If true, space added with sp_cmt_cpp_start will be added after Doxygen # sequences like '///', '///<', '//!' and '//!<'. -sp_cmt_cpp_doxygen = force # true/false +sp_cmt_cpp_doxygen = true # true/false # If true, space added with sp_cmt_cpp_start will be added after Qt translator # or meta-data comments like '//:', '//=', and '//~'. From b12340b1d57288945633ad926136ab2c27d25c12 Mon Sep 17 00:00:00 2001 From: Robherc <68039049+robherc@users.noreply.github.com> Date: Sun, 4 Feb 2024 17:10:11 -0500 Subject: [PATCH 194/236] =?UTF-8?q?=F0=9F=94=A7=20Fix=20extraneous=20DIAG?= =?UTF-8?q?=20warnings=20(#26694)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/drivers.h | 15 +++++++++------ Marlin/src/inc/Warnings.cpp | 2 +- ini/features.ini | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index fce8a5a9b275..5bb246ce9e3e 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -120,6 +120,10 @@ #define HAS_TMC220x 1 #endif +#if HAS_DRIVER(TMC26X) + #define HAS_TMC26X 1 +#endif + #define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE(A,TMC2130) || AXIS_DRIVER_TYPE(A,TMC2160) \ || AXIS_DRIVER_TYPE(A,TMC2208) || AXIS_DRIVER_TYPE(A,TMC2209) \ || AXIS_DRIVER_TYPE(A,TMC2660) \ @@ -184,10 +188,9 @@ #if ANY_AXIS_HAS(SPI) #define HAS_TMC_SPI 1 #endif - -// -// TMC26XX Stepper Drivers -// -#if HAS_DRIVER(TMC26X) - #define HAS_TMC26X 1 +#if HAS_STALLGUARD || HAS_DRIVER(TMC2160_STANDALONE) || HAS_DRIVER(TMC2130_STANDALONE) \ + || HAS_DRIVER(TMC2209_STANDALONE) || HAS_DRIVER(TMC26X) \ + || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \ + || HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE) + #define HAS_DIAG_PINS 1 #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index a44b83439b8d..c2c0e63a5240 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -678,7 +678,7 @@ // // Warn users of potential endstop/DIAG pin conflicts to prevent homing issues when not using sensorless homing // -#if !USE_SENSORLESS +#if !USE_SENSORLESS && HAS_DIAG_PINS #if ENABLED(USES_DIAG_JUMPERS) && DISABLED(DIAG_JUMPERS_REMOVED) #warning "Motherboard DIAG jumpers must be removed when SENSORLESS_HOMING is disabled. (Define DIAG_JUMPERS_REMOVED to suppress this warning.)" #endif diff --git a/ini/features.ini b/ini/features.ini index 4baa2566f04d..6a808390be3f 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -28,7 +28,7 @@ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub HAS_MOTOR_CURRENT_(I2C|DAC|SPI|PWM) = build_src_filter=+ HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster build_src_filter=+ -HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/a7d7c92a13.zip +HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/0.1.2.zip build_src_filter=+ LIB_INTERNAL_MAX31865 = build_src_filter=+ NEOPIXEL_LED = adafruit/Adafruit NeoPixel@~1.8.0 From d8e73d30362e17523bd50133344f7782fdf1be5e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 5 Feb 2024 00:21:40 +0000 Subject: [PATCH 195/236] [cron] Bump distribution date (2024-02-05) --- 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 388173bd4f6f..d7d6f6658c80 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 "2024-02-04" +//#define STRING_DISTRIBUTION_DATE "2024-02-05" /** * 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 902e4471079f..7729811138e3 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 "2024-02-04" + #define STRING_DISTRIBUTION_DATE "2024-02-05" #endif /** From e61a84a717cc80d4583278fdbdeff72becf3d9b5 Mon Sep 17 00:00:00 2001 From: Scott Mikutsky Date: Tue, 6 Feb 2024 00:37:29 -0500 Subject: [PATCH 196/236] =?UTF-8?q?=F0=9F=9A=B8=20Keep=20Filament=20Change?= =?UTF-8?q?=20near=20the=20top=20(#26172)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_main.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 3daeb285a17a..7277045baf6b 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -332,14 +332,14 @@ void menu_main() { SUBMENU(MSG_MOTION, menu_motion); } - #if ALL(ADVANCED_PAUSE_FEATURE, DISABLE_ENCODER) - FILAMENT_CHANGE_ITEM(); - #endif - #if HAS_CUTTER SUBMENU(MSG_CUTTER(MENU), STICKY_SCREEN(menu_spindle_laser)); #endif + #if ENABLED(ADVANCED_PAUSE_FEATURE) + FILAMENT_CHANGE_ITEM(); + #endif + #if HAS_TEMPERATURE SUBMENU(MSG_TEMPERATURE, menu_temperature); #endif @@ -503,10 +503,6 @@ void menu_main() { }); #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) && DISABLED(DISABLE_ENCODER) - FILAMENT_CHANGE_ITEM(); - #endif - END_MENU(); } From 3dd22349a9c9daa7039e86c9a617efe063283beb Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 6 Feb 2024 06:06:16 +0000 Subject: [PATCH 197/236] [cron] Bump distribution date (2024-02-06) --- 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 d7d6f6658c80..efaf7ed11877 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 "2024-02-05" +//#define STRING_DISTRIBUTION_DATE "2024-02-06" /** * 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 7729811138e3..1a406a97dda3 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 "2024-02-05" + #define STRING_DISTRIBUTION_DATE "2024-02-06" #endif /** From 005d6879d998ccd900d1a311185f7069541dc623 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:33:54 +1300 Subject: [PATCH 198/236] =?UTF-8?q?=F0=9F=94=A7=20Restore=20probe=20XY=20e?= =?UTF-8?q?dit=20defaults,=20remove=20arbitrary=20Z=20limit=20(#26774)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 8 ++++---- Marlin/src/inc/SanityCheck.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6a24268895c0..c64bde0bc04c 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2961,16 +2961,16 @@ #endif #if HAS_BED_PROBE #ifndef PROBE_OFFSET_XMIN - #define PROBE_OFFSET_XMIN -50 + #define PROBE_OFFSET_XMIN -(X_BED_SIZE) #endif #ifndef PROBE_OFFSET_XMAX - #define PROBE_OFFSET_XMAX 50 + #define PROBE_OFFSET_XMAX X_BED_SIZE #endif #ifndef PROBE_OFFSET_YMIN - #define PROBE_OFFSET_YMIN -50 + #define PROBE_OFFSET_YMIN -(Y_BED_SIZE) #endif #ifndef PROBE_OFFSET_YMAX - #define PROBE_OFFSET_YMAX 50 + #define PROBE_OFFSET_YMAX Y_BED_SIZE #endif #if ALL(ENDSTOPPULLUPS, USE_Z_MIN_PROBE) #define ENDSTOPPULLUP_ZMIN_PROBE diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 0736e96629d6..973f17927078 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1463,8 +1463,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i PROBE_OFFSET_ASSERT("PROBE_OFFSET_YMIN", PROBE_OFFSET_YMIN, -(Y_BED_SIZE), Y_BED_SIZE); PROBE_OFFSET_ASSERT("PROBE_OFFSET_YMAX", PROBE_OFFSET_YMAX, -(Y_BED_SIZE), Y_BED_SIZE); #endif - PROBE_OFFSET_ASSERT("PROBE_OFFSET_ZMIN", PROBE_OFFSET_ZMIN, -20, 20); - PROBE_OFFSET_ASSERT("PROBE_OFFSET_ZMAX", PROBE_OFFSET_ZMAX, -20, 20); + PROBE_OFFSET_ASSERT("PROBE_OFFSET_ZMIN", PROBE_OFFSET_ZMIN, -(Z_MAX_POS), Z_MAX_POS); + PROBE_OFFSET_ASSERT("PROBE_OFFSET_ZMAX", PROBE_OFFSET_ZMAX, -(Z_MAX_POS), Z_MAX_POS); /** * Check for improper NOZZLE_AS_PROBE or NOZZLE_TO_PROBE_OFFSET From 2c8e7bd5a58c338bad5111891497e8cb35f2fed6 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 7 Feb 2024 12:07:15 +0000 Subject: [PATCH 199/236] [cron] Bump distribution date (2024-02-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 efaf7ed11877..adb949adcc07 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 "2024-02-06" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 1a406a97dda3..f5fee4f67e10 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 "2024-02-06" + #define STRING_DISTRIBUTION_DATE "2024-02-07" #endif /** From a3211253a05f6f0380fa3bee8eb32b2f02c7bd3a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2024 13:58:01 -0600 Subject: [PATCH 200/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20FTDI=20Eve=20Touch?= =?UTF-8?q?=20UI=20M84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index dcf4789593b7..137ddc59cff5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -113,9 +113,9 @@ bool MainMenu::onTouchEnd(uint8_t tag) { case 4: GOTO_SCREEN(MoveAxisScreen); break; case 5: injectCommands(F("M84 E" - TERN_(DISABLE_INACTIVE_X, " X") - TERN_(DISABLE_INACTIVE_Y, " Y") - TERN_(DISABLE_INACTIVE_Z, " Z") + TERN_(DISABLE_IDLE_X, " X") + TERN_(DISABLE_IDLE_Y, " Y") + TERN_(DISABLE_IDLE_Z, " Z") )); break; case 6: GOTO_SCREEN(TemperatureScreen); break; From a3c78c45101fd13066eae944ba4dcdfcec3e57f4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2024 14:00:29 -0600 Subject: [PATCH 201/236] =?UTF-8?q?=F0=9F=8E=A8=20Delete=20old=20FTDI=20Ev?= =?UTF-8?q?e=20bootscreen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/bootscreen_logo_portrait.h | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h deleted file mode 100644 index 169a306afcaa..000000000000 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * 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. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -/** - * This file was auto-generated using "svg2cpp.pl" - * - * The encoding consists of x,y pairs with the min and max scaled to - * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the - * start of a new closed path. - */ -#pragma once - -constexpr float x_min = 0.000000, x_max = 272.000000, - y_min = 0.000000, y_max = 480.000000; - -const PROGMEM uint16_t logo_green[] = {0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA}; -const PROGMEM uint16_t logo_mark[] = {0xDB9F, 0xAC0C, 0xDA6F, 0xAC2D, 0xD970, 0xAC91, 0xD8C0, 0xAD23, 0xD885, 0xADCF, 0xD8C0, 0xAE7A, 0xD970, 0xAF0C, 0xDA6F, 0xAF6F, 0xDB9F, 0xAF8F, 0xDCCE, 0xAF6F, 0xDDD0, 0xAF0C, 0xDE7D, 0xAE7B, 0xDEB9, 0xADCF, 0xDE7D, 0xAD22, 0xDDD0, 0xAC91, 0xDCCE, 0xAC2D, 0xFFFF, 0xDB9F, 0xABC3, 0xDCFE, 0xABEA, 0xDE28, 0xAC5E, 0xDEF1, 0xAD06, 0xDF36, 0xADCF, 0xDEF1, 0xAE95, 0xDE28, 0xAF3E, 0xDCFE, 0xAFB1, 0xDB9F, 0xAFD8, 0xDA3F, 0xAFB1, 0xD916, 0xAF3E, 0xD849, 0xAE95, 0xD808, 0xADCF, 0xD849, 0xAD06, 0xD916, 0xAC5E, 0xDA3F, 0xABEA, 0xFFFF, 0xDB7D, 0xACE6, 0xDAE4, 0xACE6, 0xDAE4, 0xADA9, 0xDB7D, 0xADA9, 0xDC3B, 0xAD94, 0xDC71, 0xAD48, 0xDC3B, 0xACFD, 0xFFFF, 0xDB85, 0xAC9E, 0xDCCB, 0xACC8, 0xDD37, 0xAD47, 0xDCF6, 0xADAC, 0xDC3E, 0xADDE, 0xDC85, 0xADFF, 0xDCE8, 0xAE4E, 0xDD92, 0xAEEA, 0xDCBD, 0xAEEA, 0xDC1E, 0xAE58, 0xDBA7, 0xAE03, 0xDB36, 0xADEF, 0xDAE4, 0xADEF, 0xDAE4, 0xAEEA, 0xDA26, 0xAEEA, 0xDA26, 0xAC9E}; -const PROGMEM uint16_t logo_type[] = {0xD8D5, 0xA520, 0xD8A5, 0xA563, 0xD82E, 0xA57F, 0xD348, 0xA57F, 0xD2D1, 0xA598, 0xD2A0, 0xA5D9, 0xD2A0, 0xAF7A, 0xD274, 0xAFBE, 0xD202, 0xAFDA, 0xCD37, 0xAFDA, 0xCCBF, 0xAFBE, 0xCC8F, 0xAF7A, 0xCC8F, 0xA5D9, 0xCC63, 0xA598, 0xCBF1, 0xA57F, 0xC70B, 0xA57F, 0xC694, 0xA563, 0xC664, 0xA520, 0xC664, 0xA28C, 0xC70B, 0xA22C, 0xD82E, 0xA22C, 0xD8A5, 0xA248, 0xD8D5, 0xA28C, 0xFFFF, 0xB138, 0xAC8C, 0xB952, 0xAC8C, 0xB952, 0xA57F, 0xB138, 0xA57F, 0xFFFF, 0xBF27, 0xA421, 0xBF57, 0xA476, 0xBF6D, 0xA4D0, 0xBF6D, 0xAD36, 0xBF57, 0xAD90, 0xBF27, 0xADE6, 0xBBFA, 0xAFB2, 0xBB60, 0xAFCF, 0xBABD, 0xAFDA, 0xAFCE, 0xAFDA, 0xAF30, 0xAFCF, 0xAE9A, 0xAFB2, 0xAB6E, 0xADE6, 0xAB39, 0xAD90, 0xAB28, 0xAD36, 0xAB28, 0xA4D0, 0xAB39, 0xA476, 0xAB6E, 0xA421, 0xAE9A, 0xA255, 0xAF30, 0xA239, 0xAFCE, 0xA22C, 0xBABD, 0xA22C, 0xBB60, 0xA239, 0xBBFA, 0xA255, 0xFFFF, 0x93A4, 0xACDC, 0x9CEA, 0xACDC, 0x9CEA, 0xAA34, 0x93A4, 0xAA34, 0x93A4, 0xACDC, 0xFFFF, 0x93A4, 0xA796, 0x9CEA, 0xA796, 0x9CEA, 0xA525, 0x93A4, 0xA525, 0xFFFF, 0xA227, 0xA421, 0xA258, 0xA478, 0xA26E, 0xA4D5, 0xA26E, 0xA700, 0xA24F, 0xA757, 0xA204, 0xA7A5, 0xA089, 0xA8B8, 0xA061, 0xA903, 0xA092, 0xA949, 0xA1FC, 0xAA43, 0xA24B, 0xAA91, 0xA26E, 0xAAE8, 0xA26E, 0xAD36, 0xA258, 0xAD90, 0xA227, 0xADE6, 0x9EFC, 0xAFB2, 0x9E61, 0xAFCF, 0x9DBE, 0xAFDA, 0x8ED0, 0xAFDA, 0x8E28, 0xAF7A, 0x8E28, 0xA28C, 0x8E59, 0xA248, 0x8ED0, 0xA22C, 0x9DBE, 0xA22C, 0x9E61, 0xA239, 0x9EFC, 0xA255, 0xFFFF, 0x853C, 0xA502, 0x8517, 0xA557, 0x84C9, 0xA5A2, 0x7994, 0xACC8, 0x8494, 0xACC8, 0x850A, 0xACE4, 0x853C, 0xAD27, 0x853C, 0xAF7A, 0x850A, 0xAFBE, 0x8494, 0xAFDA, 0x7371, 0xAFDA, 0x72C9, 0xAF7A, 0x72C9, 0xAD09, 0x72E8, 0xACB2, 0x7333, 0xAC64, 0x7EA5, 0xA53E, 0x73A6, 0xA53E, 0x732F, 0xA522, 0x72FE, 0xA4DF, 0x72FE, 0xA28C, 0x732F, 0xA248, 0x73A6, 0xA22C, 0x8494, 0xA22C, 0x850A, 0xA248, 0x853C, 0xA28C, 0xFFFF, 0x6B68, 0xAC87, 0x6BDB, 0xACA3, 0x6C07, 0xACE6, 0x6C07, 0xAF7A, 0x6BDB, 0xAFBE, 0x6B68, 0xAFDA, 0x5C84, 0xAFDA, 0x5BDC, 0xAF7A, 0x5BDC, 0xA28C, 0x5C84, 0xA22C, 0x6146, 0xA22C, 0x61EE, 0xA28C, 0x61EE, 0xAC2D, 0x621E, 0xAC6E, 0x6295, 0xAC87, 0xFFFF, 0x52C6, 0xA248, 0x52F7, 0xA28C, 0x52F7, 0xAD45, 0x52EE, 0xAD45, 0x52DC, 0xAD9B, 0x52B1, 0xADE6, 0x4F85, 0xAFB2, 0x4EEA, 0xAFCF, 0x4E47, 0xAFDA, 0x4359, 0xAFDA, 0x42BA, 0xAFCF, 0x4224, 0xAFB2, 0x3EF8, 0xADE6, 0x3EC3, 0xAD90, 0x3EB2, 0xAD36, 0x3EB2, 0xA28C, 0x3EE2, 0xA248, 0x3F5A, 0xA22C, 0x441B, 0xA22C, 0x4493, 0xA248, 0x44C3, 0xA28C, 0x44C3, 0xAC2D, 0x44F4, 0xAC71, 0x456B, 0xAC8C, 0x4C3E, 0xAC8C, 0x4CB1, 0xAC71, 0x4CDD, 0xAC2D, 0x4CDD, 0xA28C, 0x4D0D, 0xA248, 0x4D85, 0xA22C, 0x524F, 0xA22C, 0xFFFF, 0x3748, 0xAC87, 0x37BB, 0xACA3, 0x37E7, 0xACE6, 0x37E7, 0xAF7A, 0x37BB, 0xAFBE, 0x3748, 0xAFDA, 0x2864, 0xAFDA, 0x27BC, 0xAF7A, 0x27BC, 0xA28C, 0x2864, 0xA22C, 0x2D26, 0xA22C, 0x2DCD, 0xA28C, 0x2DCD, 0xAC2D, 0x2DFE, 0xAC6E, 0x2E75, 0xAC87}; -const PROGMEM uint16_t logo_black[] = {0x8048, 0x527A, 0x8ADE, 0x5CDE, 0x75B2, 0x5CDE, 0xFFFF, 0x8048, 0x4FF6, 0x71D9, 0x5E20, 0x8EB8, 0x5E20, 0x8048, 0x4FF6, 0xFFFF, 0x4436, 0x8D8E, 0x4ECC, 0x97F2, 0x39A0, 0x97F2, 0xFFFF, 0x4436, 0x8B0A, 0x35C8, 0x9934, 0x52A5, 0x9934, 0xFFFF, 0xBC3D, 0x8D8E, 0xC6D4, 0x97F2, 0xB1A7, 0x97F2, 0xFFFF, 0xBC3D, 0x8B0A, 0xADCE, 0x9934, 0xCAAC, 0x9934, 0xFFFF, 0x8045, 0x6778, 0x7F6D, 0x67A7, 0x7E9D, 0x689F, 0x7D49, 0x69EA, 0x7B41, 0x6A81, 0x7908, 0x6A3A, 0x7726, 0x692C, 0x75EA, 0x685A, 0x7505, 0x684C, 0x744A, 0x6899, 0x73F5, 0x69A8, 0x7345, 0x6B1A, 0x7193, 0x6BF8, 0x6F4D, 0x6C08, 0x6CFA, 0x6B45, 0x6B61, 0x6AA3, 0x6A7D, 0x6AB7, 0x69EB, 0x6B1D, 0x6A1D, 0x6C34, 0x6A22, 0x6DB8, 0x68E5, 0x6ECD, 0x66B9, 0x6F33, 0x6417, 0x6EC5, 0x6239, 0x6E5C, 0x6165, 0x6E91, 0x6108, 0x6F09, 0x61C1, 0x7018, 0x6282, 0x7196, 0x61CF, 0x72D1, 0x5FE5, 0x7384, 0x5D38, 0x7380, 0x5B4B, 0x7365, 0x5A97, 0x73B7, 0x5A74, 0x7438, 0x5B90, 0x7520, 0x5CE8, 0x7671, 0x5CCB, 0x77BB, 0x5B43, 0x78B0, 0x58B6, 0x7914, 0x56D7, 0x7944, 0x564F, 0x79AD, 0x5667, 0x7A2F, 0x57DA, 0x7AE3, 0x59B7, 0x7BF3, 0x5A31, 0x7D37, 0x5927, 0x7E5D, 0x56E0, 0x7F1E, 0x5529, 0x7F93, 0x54D7, 0x800D, 0x5529, 0x8087, 0x56E0, 0x80FD, 0x5926, 0x81BE, 0x5A30, 0x82E5, 0x59B5, 0x8428, 0x57D8, 0x8538, 0x5664, 0x85EB, 0x564C, 0x866D, 0x56D4, 0x86D7, 0x58B2, 0x8708, 0x5B3F, 0x876B, 0x5CC6, 0x8860, 0x5CE3, 0x89AA, 0x5B8B, 0x8AFC, 0x5A6D, 0x8BE3, 0x5A91, 0x8C65, 0x5B44, 0x8CB7, 0x5D32, 0x8C9C, 0x5FDE, 0x8C98, 0x61C7, 0x8D4B, 0x627A, 0x8E87, 0x61B9, 0x9005, 0x60FF, 0x9114, 0x615C, 0x918B, 0x622F, 0x91C0, 0x640E, 0x9158, 0x66B0, 0x90EA, 0x68DC, 0x9150, 0x6A18, 0x9266, 0x6A12, 0x93E9, 0x69E0, 0x9501, 0x6A72, 0x9567, 0x6B56, 0x957B, 0x6CEE, 0x94D9, 0x6F43, 0x9417, 0x7188, 0x9428, 0x7339, 0x9506, 0x73E9, 0x9678, 0x743E, 0x9787, 0x74F8, 0x97D4, 0x75DD, 0x97C6, 0x771A, 0x96F4, 0x78FB, 0x95E6, 0x7B35, 0x95A1, 0x7D3D, 0x9637, 0x7E91, 0x9782, 0x7F60, 0x987A, 0x8038, 0x98AA, 0x810F, 0x987B, 0x81DF, 0x9782, 0x8333, 0x9638, 0x853B, 0x95A1, 0x8775, 0x95E7, 0x8956, 0x96F5, 0x8A92, 0x97C8, 0x8B78, 0x97D6, 0x8C32, 0x9789, 0x8C88, 0x967A, 0x8D37, 0x9508, 0x8EE9, 0x942A, 0x912F, 0x941A, 0x9383, 0x94DD, 0x951B, 0x957F, 0x95FF, 0x956B, 0x9690, 0x9505, 0x9660, 0x93ED, 0x9659, 0x926A, 0x9797, 0x9154, 0x99C3, 0x90EF, 0x9C65, 0x915D, 0x9E43, 0x91C6, 0x9F17, 0x9191, 0x9F74, 0x9119, 0x9EBB, 0x900A, 0x9DFA, 0x8E8C, 0x9EAE, 0x8D51, 0xA098, 0x8C9E, 0xA345, 0x8CA2, 0xA531, 0x8CBE, 0xA5E5, 0x8C6B, 0xA609, 0x8BEA, 0xA4EC, 0x8B02, 0xA394, 0x89B1, 0xA3B2, 0x8867, 0xA53A, 0x8772, 0xA7C6, 0x870E, 0xA9A5, 0x86DE, 0xAA2D, 0x8675, 0xAA14, 0x85F2, 0xA8A2, 0x853F, 0xA6C5, 0x842E, 0xA64B, 0x82EB, 0xA755, 0x81C5, 0xA99C, 0x8104, 0xAB52, 0x808F, 0xABA6, 0x8015, 0xAB52, 0x7F9B, 0xA99C, 0x7F25, 0xA755, 0x7E64, 0xA64C, 0x7D3E, 0xA6C7, 0x7BFA, 0xA8A5, 0x7AEA, 0xAA18, 0x7A37, 0xAA31, 0x79B5, 0xA9A9, 0x794B, 0xA7CA, 0x791B, 0xA53C, 0x78B7, 0xA3B6, 0x77C1, 0xA39A, 0x7677, 0xA4F1, 0x7526, 0xA60E, 0x743F, 0xA5EB, 0x73BD, 0xA538, 0x736B, 0xA34B, 0x7387, 0xA09E, 0x738A, 0x9EB4, 0x72D6, 0x9E02, 0x719B, 0x9EC4, 0x701D, 0x9F7E, 0x6F0E, 0x9F20, 0x6E96, 0x9E4E, 0x6E61, 0x9C6E, 0x6ECA, 0x99CB, 0x6F37, 0x97A0, 0x6ED2, 0x9664, 0x6DBC, 0x966B, 0x6C38, 0x969B, 0x6B21, 0x960B, 0x6ABB, 0x9526, 0x6AA6, 0x938E, 0x6B48, 0x913B, 0x6C0B, 0x8EF4, 0x6BFA, 0x8D43, 0x6B1D, 0x8C94, 0x69AA, 0x8C3F, 0x689B, 0x8B85, 0x684D, 0x8A9E, 0x685C, 0x8962, 0x692E, 0x8781, 0x6A3C, 0x8546, 0x6A82, 0x833F, 0x69EA, 0x81EC, 0x68A0, 0x811C, 0x67A8, 0x8045, 0x6778, 0x8045, 0x6778, 0xFFFF, 0x8047, 0x6AA0, 0x81C8, 0x6AFA, 0x8268, 0x6BD5, 0x81C8, 0x6CAF, 0x8047, 0x6D09, 0x7EC6, 0x6CAF, 0x7E27, 0x6BD5, 0x7EC6, 0x6AFA, 0x8047, 0x6AA0, 0x8047, 0x6AA0, 0xFFFF, 0x803E, 0x6E19, 0x867C, 0x6E71, 0x8C65, 0x6F75, 0x91D7, 0x711B, 0x96AD, 0x735B, 0x9ABC, 0x762C, 0x9DA2, 0x794C, 0x9F5F, 0x7CA2, 0x9FF3, 0x8011, 0x9F5E, 0x8380, 0x9DA1, 0x86D5, 0x9ABA, 0x89F6, 0x96AB, 0x8CC7, 0x91D6, 0x8F08, 0x8C65, 0x90AD, 0x867C, 0x91B1, 0x803D, 0x9209, 0x7A00, 0x91B1, 0x7416, 0x90AD, 0x6EA6, 0x8F08, 0x69D0, 0x8CC7, 0x65D6, 0x8A0A, 0x62EE, 0x86F4, 0x6125, 0x839B, 0x6089, 0x8011, 0x6124, 0x7C88, 0x62ED, 0x792E, 0x65D6, 0x7619, 0x69CF, 0x735B, 0x6EA5, 0x711B, 0x7416, 0x6F75, 0x7A00, 0x6E71, 0x803E, 0x6E19, 0x803E, 0x6E19, 0xFFFF, 0x803E, 0x6EB2, 0x7A5A, 0x6F04, 0x74B2, 0x6FF8, 0x6F4B, 0x7194, 0x6A8F, 0x73C7, 0x66A2, 0x7681, 0x63D5, 0x7986, 0x6226, 0x7CBF, 0x6197, 0x8011, 0x6226, 0x8363, 0x63D5, 0x869C, 0x66A2, 0x89A2, 0x6A8F, 0x8C5B, 0x6F4B, 0x8E8E, 0x74B2, 0x902B, 0x7A5A, 0x911E, 0x803D, 0x9170, 0x803E, 0x9170, 0x8621, 0x911E, 0x8BCA, 0x902B, 0x9130, 0x8E8E, 0x95ED, 0x8C5B, 0x99CF, 0x89AB, 0x9CA7, 0x869C, 0x9E55, 0x8367, 0x9EE5, 0x8011, 0x9E55, 0x7CBB, 0x9CA7, 0x7986, 0x99CF, 0x7677, 0x95ED, 0x73C7, 0x9130, 0x7194, 0x8BCA, 0x6FF8, 0x8621, 0x6F04, 0x803E, 0x6EB2, 0x803E, 0x6EB2, 0xFFFF, 0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x6700, 0x708A, 0x6880, 0x70E5, 0x6920, 0x71BF, 0x6880, 0x7299, 0x66FF, 0x72F4, 0x657F, 0x7299, 0x64E0, 0x71BF, 0x657F, 0x70E4, 0x6700, 0x708A, 0x6700, 0x708A, 0xFFFF, 0x998D, 0x708C, 0x9B0E, 0x70E6, 0x9BAE, 0x71C0, 0x9B0E, 0x729B, 0x998D, 0x72F6, 0x980D, 0x729B, 0x976E, 0x71C1, 0x980D, 0x70E7, 0x998D, 0x708C, 0x998D, 0x708C, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0x8BA7, 0x712C, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0x8F47, 0x723F, 0xFFFF, 0x712D, 0x7242, 0x7308, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x803E, 0x72F6, 0x891B, 0x73F4, 0x909A, 0x76CC, 0x959F, 0x7B0B, 0x975E, 0x8011, 0x959F, 0x8517, 0x909A, 0x8957, 0x891B, 0x8C2E, 0x803E, 0x8D2B, 0x7761, 0x8C2E, 0x6FE2, 0x8957, 0x6ADD, 0x8517, 0x691E, 0x8011, 0x6ADD, 0x7B0B, 0x6FE2, 0x76CC, 0x7761, 0x73F4, 0x803E, 0x72F6, 0x803E, 0x72F6, 0xFFFF, 0x803E, 0x738F, 0x77C8, 0x7481, 0x70A0, 0x7738, 0x6BD7, 0x7B46, 0x6A2C, 0x8011, 0x6BD7, 0x84DC, 0x70A1, 0x88EA, 0x77C9, 0x8BA1, 0x803E, 0x8C93, 0x88B4, 0x8BA1, 0x8FDB, 0x88EA, 0x94A5, 0x84DD, 0x9650, 0x8011, 0x94A5, 0x7B46, 0x8FDB, 0x7738, 0x88B4, 0x7481, 0x803E, 0x738F, 0x803E, 0x738F, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0x9175, 0x745E, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6CEC, 0x76FA, 0x6BED, 0x7674, 0x6A40, 0x75A9, 0x6A45, 0x75A7, 0x6AEB, 0x7539, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0x9A12, 0x790A, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCB, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x5C87, 0x7EDB, 0x5E08, 0x7F35, 0x5EA8, 0x800F, 0x5E08, 0x80E9, 0x5C87, 0x8144, 0x5C85, 0x8144, 0x5B06, 0x80E9, 0x5A67, 0x800F, 0x5B06, 0x7F35, 0x5C87, 0x7EDB, 0x5C87, 0x7EDB, 0xFFFF, 0xA402, 0x7EDE, 0xA583, 0x7F38, 0xA623, 0x8011, 0xA623, 0x8013, 0xA583, 0x80EC, 0xA402, 0x8147, 0xA281, 0x80ED, 0xA1E2, 0x8013, 0xA281, 0x7F38, 0xA402, 0x7EDE, 0xA402, 0x7EDE, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8255, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8914, 0x67DC, 0x8897, 0x6ADF, 0x878A, 0xFFFF, 0x6CF7, 0x892F, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x963E, 0x8A77, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x7035, 0x8B04, 0x6DED, 0x8C8B, 0x6DE1, 0x8C87, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x66F3, 0x8D2F, 0x6874, 0x8D8A, 0x687D, 0x8D8F, 0x6886, 0x8D94, 0x6926, 0x8E6E, 0x6887, 0x8F48, 0x6705, 0x8FA2, 0x6584, 0x8F49, 0x657F, 0x8F45, 0x6570, 0x8F3E, 0x6573, 0x8F3E, 0x64D3, 0x8E63, 0x6573, 0x8D89, 0x66F3, 0x8D2F, 0x66F3, 0x8D2F, 0xFFFF, 0x9993, 0x8D31, 0x9B13, 0x8D8C, 0x9BB4, 0x8E66, 0x9B16, 0x8F40, 0x9993, 0x8F9A, 0x9814, 0x8F40, 0x9774, 0x8E66, 0x9812, 0x8D8C, 0x9993, 0x8D31, 0x9993, 0x8D31, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CD, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C1, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0x7C48, 0x8E1C, 0xFFFF, 0x80BF, 0x8E49, 0x80D2, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BF, 0x8E49, 0x80BF, 0x8E49, 0xFFFF, 0x804F, 0x9321, 0x81D0, 0x937A, 0x8271, 0x9455, 0x81D1, 0x952F, 0x8051, 0x958A, 0x7ECF, 0x9530, 0x7E2F, 0x9456, 0x7ECE, 0x937B, 0x804F, 0x9321, 0x804F, 0x9321, 0xFFFF, 0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA, 0xFFFF, 0x8048, 0x4BC9, 0x952E, 0x604A, 0x6B62, 0x604A, 0xFFFF, 0x68D2, 0x62CE, 0x97BF, 0x62CE, 0xB9BA, 0x8427, 0xA239, 0x9B36, 0x5E16, 0x9B36, 0x46B6, 0x8446, 0x68D2, 0x62CE, 0xFFFF, 0xBC3E, 0x869F, 0xD13B, 0x9B36, 0xA742, 0x9B36, 0xFFFF, 0x4431, 0x86BE, 0x590E, 0x9B36, 0x2F54, 0x9B36, 0x4431, 0x86BE}; -const PROGMEM uint16_t logo_white[] = {0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0xFFFF, 0x712D, 0x7242, 0x7309, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6A40, 0x75A9, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCC, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8256, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8915, 0x67DC, 0x8897, 0xFFFF, 0x6CF7, 0x8930, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x6DED, 0x8C8C, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CC, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C0, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0xFFFF, 0x80BE, 0x8E49, 0x80D1, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BE, 0x8E49, 0xFFFF, 0x8276, 0x75D6, 0x83AF, 0x75FE, 0x8436, 0x7628, 0x84AE, 0x7661, 0x8542, 0x7706, 0x8512, 0x77BA, 0x8457, 0x7845, 0x8335, 0x788B, 0x8318, 0x7882, 0x82D8, 0x7860, 0x831E, 0x7830, 0x8353, 0x7823, 0x83E6, 0x77F9, 0x8464, 0x7790, 0x847A, 0x771A, 0x8415, 0x76B7, 0x83B6, 0x7691, 0x8351, 0x7676, 0x827F, 0x7662, 0x81BB, 0x7687, 0x8161, 0x76AF, 0x8123, 0x76DA, 0x80E5, 0x771A, 0x80C5, 0x774D, 0x80B8, 0x77C1, 0x80D1, 0x77EE, 0x8107, 0x7814, 0x81CC, 0x786B, 0x837F, 0x7918, 0x8464, 0x7983, 0x84C0, 0x79B2, 0x852D, 0x79FD, 0x859D, 0x7ABC, 0x858E, 0x7B79, 0x8545, 0x7C25, 0x84D9, 0x7CC5, 0x8469, 0x7D4D, 0x843B, 0x7DCD, 0x8555, 0x7DA8, 0x85D3, 0x7D67, 0x870D, 0x7CA0, 0x87E0, 0x7BC0, 0x880D, 0x7B5B, 0x886D, 0x7A46, 0x88B3, 0x799B, 0x88CC, 0x7970, 0x893A, 0x78EA, 0x8995, 0x78A8, 0x8A01, 0x786F, 0x8AF8, 0x781F, 0x8BA6, 0x77FD, 0x8C0C, 0x77EF, 0x8C96, 0x77FB, 0x8D1D, 0x7815, 0x8D59, 0x7826, 0x8E40, 0x7889, 0x8EDB, 0x7925, 0x8EFC, 0x797B, 0x8EFF, 0x79D4, 0x8E71, 0x7A7B, 0x8D58, 0x7AD2, 0x8C23, 0x7ADE, 0x8AFF, 0x7A97, 0x8AF5, 0x7A81, 0x8AEF, 0x7A4E, 0x8B68, 0x7A52, 0x8B96, 0x7A5F, 0x8C39, 0x7A87, 0x8D33, 0x7A7F, 0x8E07, 0x7A3F, 0x8E66, 0x79CB, 0x8E63, 0x7985, 0x8E43, 0x793F, 0x8DC6, 0x78C6, 0x8CFA, 0x7876, 0x8C7E, 0x785F, 0x8C18, 0x7857, 0x8B84, 0x7874, 0x8B22, 0x788F, 0x8A7D, 0x78CA, 0x8A2E, 0x78F9, 0x89F0, 0x7930, 0x89A3, 0x79A5, 0x8979, 0x7AC0, 0x897C, 0x7B9C, 0x8972, 0x7BF2, 0x88CC, 0x7D32, 0x87B7, 0x7E4C, 0x8665, 0x7F52, 0x8660, 0x7F5A, 0x878F, 0x7F01, 0x88AE, 0x7EC2, 0x89FD, 0x7E9E, 0x8B8D, 0x7EC6, 0x8C40, 0x7F0E, 0x8CB6, 0x7F68, 0x8D1D, 0x7FD7, 0x8DFA, 0x80BD, 0x8EA8, 0x816E, 0x8F34, 0x81D4, 0x8F8A, 0x81F9, 0x8FDA, 0x820A, 0x90AB, 0x820F, 0x9120, 0x81FF, 0x91A5, 0x81DC, 0x91F4, 0x81B8, 0x922C, 0x8198, 0x9288, 0x812B, 0x927D, 0x80AB, 0x9252, 0x8068, 0x921C, 0x8033, 0x9174, 0x7FEB, 0x9099, 0x7FEB, 0x8FCF, 0x8029, 0x8F5D, 0x808D, 0x8F47, 0x80A4, 0x8ED4, 0x80A4, 0x8EC5, 0x8070, 0x8F65, 0x7FE6, 0x906D, 0x7F92, 0x91A4, 0x7F90, 0x92A8, 0x7FF7, 0x92FC, 0x8043, 0x9331, 0x8090, 0x9349, 0x813D, 0x92D1, 0x81E3, 0x9264, 0x8227, 0x91E5, 0x825B, 0x915D, 0x8280, 0x90D3, 0x8296, 0x8FA0, 0x829A, 0x8F2C, 0x8286, 0x8EE7, 0x8273, 0x8E78, 0x824A, 0x8DA9, 0x81D4, 0x8CB9, 0x8127, 0x8B68, 0x802C, 0x8B22, 0x8001, 0x8AC3, 0x7FE7, 0x8A50, 0x7FF4, 0x88FD, 0x8068, 0x87A4, 0x811D, 0x879E, 0x812D, 0x8904, 0x81F1, 0x89D4, 0x8285, 0x8A7C, 0x8343, 0x8A94, 0x8431, 0x8A4E, 0x84A1, 0x89E8, 0x850E, 0x892F, 0x85E5, 0x88B0, 0x86E5, 0x88C0, 0x8757, 0x88F2, 0x878D, 0x8927, 0x87AD, 0x8ABF, 0x8821, 0x8B0E, 0x881E, 0x8B70, 0x8811, 0x8C1B, 0x87D6, 0x8C9B, 0x8776, 0x8CC4, 0x873D, 0x8CD3, 0x8705, 0x8CA2, 0x86A3, 0x8C06, 0x8662, 0x8B39, 0x864F, 0x8A77, 0x8662, 0x89F9, 0x864D, 0x8A10, 0x8606, 0x8A66, 0x85F7, 0x8B35, 0x85DC, 0x8C50, 0x85FD, 0x8D3C, 0x8663, 0x8D94, 0x870A, 0x8D7D, 0x875F, 0x8D3A, 0x87B8, 0x8CB1, 0x882D, 0x8BC1, 0x888C, 0x8B30, 0x88A7, 0x8A8D, 0x88AE, 0x89EE, 0x8898, 0x896E, 0x887E, 0x8869, 0x882D, 0x87EE, 0x87EA, 0x87A4, 0x87A8, 0x878E, 0x8785, 0x874D, 0x86E3, 0x875D, 0x8637, 0x87FD, 0x8466, 0x8705, 0x835A, 0x86B8, 0x8359, 0x84A4, 0x8358, 0x7F20, 0x851B, 0x7F13, 0x864D, 0x8016, 0x86F9, 0x818E, 0x87D8, 0x823B, 0x8869, 0x8272, 0x88C9, 0x8276, 0x8915, 0x8266, 0x893D, 0x81FB, 0x89D8, 0x8197, 0x8A21, 0x8119, 0x8A62, 0x80A7, 0x8A8A, 0x8016, 0x8AAA, 0x7EDC, 0x8AAE, 0x7DC5, 0x8A63, 0x7D55, 0x8A29, 0x7CFA, 0x89E5, 0x7CAD, 0x8939, 0x7D1B, 0x8895, 0x7E00, 0x8825, 0x7F27, 0x8800, 0x7F66, 0x880F, 0x7F69, 0x8850, 0x7E49, 0x8873, 0x7D9A, 0x88C9, 0x7D4F, 0x893E, 0x7D8B, 0x89B2, 0x7DD8, 0x89E6, 0x7E36, 0x8A10, 0x7F02, 0x8A40, 0x7FDB, 0x8A34, 0x8046, 0x8A16, 0x8091, 0x89F5, 0x80A5, 0x89EB, 0x80FE, 0x89AB, 0x8126, 0x8981, 0x8159, 0x8918, 0x814F, 0x88E6, 0x8128, 0x88B8, 0x8094, 0x8856, 0x7EFC, 0x8796, 0x7D74, 0x86E7, 0x7D3D, 0x86C5, 0x7CD8, 0x8674, 0x7C98, 0x8605, 0x7CA0, 0x8536, 0x7D7C, 0x83E6, 0x7E07, 0x8357, 0x7DED, 0x835B, 0x79CC, 0x843E, 0x7962, 0x8448, 0x77CB, 0x8450, 0x76F3, 0x8438, 0x763E, 0x841E, 0x7502, 0x83FE, 0x746C, 0x83FD, 0x73E4, 0x840A, 0x72CE, 0x8444, 0x729B, 0x8457, 0x71E6, 0x84B7, 0x71B5, 0x84EB, 0x719B, 0x853B, 0x719B, 0x8558, 0x71D4, 0x85E0, 0x72B0, 0x8642, 0x73D4, 0x8661, 0x74B3, 0x8616, 0x74AD, 0x84D7, 0x74B2, 0x84B3, 0x74B5, 0x849B, 0x751E, 0x8496, 0x753B, 0x84B8, 0x75C5, 0x856E, 0x756D, 0x865A, 0x74D0, 0x86B8, 0x73FA, 0x86EA, 0x7250, 0x86CF, 0x70E7, 0x863F, 0x707E, 0x85C8, 0x705F, 0x8549, 0x7075, 0x84CC, 0x70AC, 0x8475, 0x70CD, 0x8452, 0x71FF, 0x839C, 0x7287, 0x8376, 0x736A, 0x833A, 0x7443, 0x8319, 0x751E, 0x8311, 0x76AC, 0x8327, 0x77C4, 0x8341, 0x7810, 0x8340, 0x799F, 0x8313, 0x7A2A, 0x82EA, 0x7B24, 0x8281, 0x7BE4, 0x820C, 0x7BEC, 0x81B1, 0x7A5E, 0x81C8, 0x7809, 0x81ED, 0x7751, 0x81F8, 0x7664, 0x81EF, 0x7571, 0x81B4, 0x74BB, 0x8141, 0x7483, 0x80F9, 0x7408, 0x802F, 0x73D9, 0x7FEB, 0x7359, 0x7F50, 0x72A0, 0x7EC4, 0x719E, 0x7E89, 0x7074, 0x7EA8, 0x7015, 0x7ECC, 0x6FD0, 0x7EF8, 0x6FA3, 0x7F19, 0x6F6B, 0x7FBB, 0x6F93, 0x8017, 0x6FA7, 0x8032, 0x6FD7, 0x805A, 0x70DF, 0x8092, 0x7205, 0x805A, 0x729E, 0x7FCB, 0x72B3, 0x7FBC, 0x7309, 0x7FA6, 0x733B, 0x7FDE, 0x72F9, 0x804B, 0x726D, 0x80A7, 0x70E6, 0x80FB, 0x700D, 0x80EC, 0x6F48, 0x80A8, 0x6EFC, 0x8073, 0x6EC1, 0x8026, 0x6E93, 0x7FCC, 0x6ED4, 0x7ED8, 0x6F54, 0x7E72, 0x6FCB, 0x7E3A, 0x700B, 0x7E25, 0x71AB, 0x7DED, 0x7356, 0x7E3E, 0x7472, 0x7EF4, 0x7536, 0x7FBD, 0x75DA, 0x8075, 0x7628, 0x80B6, 0x767B, 0x80D8, 0x76D9, 0x80EF, 0x7755, 0x80FC, 0x7881, 0x80D5, 0x7931, 0x8093, 0x7A00, 0x801E, 0x799B, 0x7D9B, 0x789A, 0x7CD8, 0x77C0, 0x7BE5, 0x7783, 0x7B55, 0x7787, 0x7AB9, 0x77AE, 0x7A67, 0x77E6, 0x7A1D, 0x781E, 0x79CD, 0x785E, 0x7909, 0x7853, 0x78C0, 0x7823, 0x788B, 0x7808, 0x7875, 0x7649, 0x77E8, 0x74B6, 0x7869, 0x7488, 0x78B3, 0x7472, 0x7901, 0x74D2, 0x796F, 0x75D8, 0x799A, 0x76EE, 0x7971, 0x774A, 0x797A, 0x7751, 0x79B4, 0x76A0, 0x79F0, 0x75E4, 0x7A0A, 0x7454, 0x79E1, 0x73AF, 0x7986, 0x7369, 0x7909, 0x7374, 0x7891, 0x739D, 0x783C, 0x73B6, 0x781E, 0x74B7, 0x7768, 0x765D, 0x772C, 0x77ED, 0x7769, 0x7932, 0x77FC, 0x7979, 0x7836, 0x79B8, 0x787B, 0x79DF, 0x7912, 0x7998, 0x7A14, 0x7967, 0x7AB4, 0x796A, 0x7AD8, 0x79C5, 0x7B60, 0x7A9D, 0x7BE9, 0x7B72, 0x7C47, 0x7EBA, 0x7BD6, 0x8206, 0x7CA8, 0x82FA, 0x7C2E, 0x8391, 0x7BB4, 0x83F6, 0x7B40, 0x8413, 0x7AD0, 0x83DD, 0x7A71, 0x838A, 0x7A39, 0x8296, 0x79B7, 0x80F3, 0x78FA, 0x8016, 0x788A, 0x7FB4, 0x7833, 0x7F8D, 0x77DF, 0x7F92, 0x77A9, 0x7FB3, 0x7718, 0x7FF6, 0x76C2, 0x8036, 0x768A, 0x8097, 0x764A, 0x80DF, 0x762A, 0x813C, 0x7605, 0x8275, 0x75D5}; - -#define LOGO_BACKGROUND 0xDEEA5C - -#define LOGO_PAINT_PATHS \ - LOGO_PAINT_PATH(0xC1D82F, logo_green) \ - LOGO_PAINT_PATH(0x000000, logo_black) \ - LOGO_PAINT_PATH(0x000000, logo_type) \ - LOGO_PAINT_PATH(0x000000, logo_mark) \ - LOGO_PAINT_PATH(0xFFFFFF, logo_white) From 0829a511f03d75121f2a8aa557fc0b45f5f2069c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2024 18:09:36 -0600 Subject: [PATCH 202/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20"st?= =?UTF-8?q?atic=5Fwarning"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index c2c0e63a5240..f889ce38e05c 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -31,6 +31,24 @@ // Warnings! Located here so they will appear just once in the build output. // +// static_warning works like a static_assert but only emits a (messy) warning. +#ifdef __GNUC__ + namespace mfwarn { + struct true_type {}; + struct false_type {}; + template struct converter : public true_type {}; + template <> struct converter<0> : public false_type {}; + } + #define static_warning(cond, msg) \ + struct CAT(static_warning, __LINE__) { \ + void _(::mfwarn::false_type const&) __attribute__((deprecated(msg))) {}; \ + void _(::mfwarn::true_type const&) {}; \ + CAT(static_warning, __LINE__)() {_(::mfwarn::converter<(cond)>());} \ + } +#else + #define static_warning(...) +#endif + #if ENABLED(MARLIN_DEV_MODE) #warning "WARNING! Disable MARLIN_DEV_MODE for the final build!" #ifdef __LONG_MAX__ From 371fb5a256d968712d6180bf6faf9090c75246e4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 8 Feb 2024 00:20:32 +0000 Subject: [PATCH 203/236] [cron] Bump distribution date (2024-02-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 adb949adcc07..2bb3aaab0753 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 "2024-02-07" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 f5fee4f67e10..355a77709d14 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 "2024-02-07" + #define STRING_DISTRIBUTION_DATE "2024-02-08" #endif /** From 4aa48beb378fec6a6e7de0c8c3c7fe47f6551c24 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2024 18:25:13 -0600 Subject: [PATCH 204/236] =?UTF-8?q?=F0=9F=9A=B8=20Adjust=20encoder=20multi?= =?UTF-8?q?plier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/common/encoder.cpp | 14 +++--- Marlin/src/lcd/marlinui.cpp | 63 +++++++++++--------------- Marlin/src/lcd/marlinui.h | 16 +++---- Marlin/src/lcd/menu/menu.cpp | 2 +- Marlin/src/lcd/menu/menu_item.h | 2 +- Marlin/src/lcd/menu/menu_mixer.cpp | 2 +- 6 files changed, 43 insertions(+), 56 deletions(-) diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index cb14596849a5..c406cc47d922 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -127,7 +127,7 @@ EncoderState encoderReceiveAnalyze() { #if ENABLED(ENCODER_RATE_MULTIPLIER) millis_t ms = millis(); - int32_t encoderMultiplier = 1; + int32_t encoder_multiplier = 1; // if must encoder rati multiplier if (encoderRate.enabled) { @@ -137,10 +137,10 @@ EncoderState encoderReceiveAnalyze() { // Note that the rate is always calculated between two passes through the // loop and that the abs of the temp_diff value is tracked. const float encoderStepRate = encoderMovementSteps / float(ms - encoderRate.lastEncoderTime) * 1000; - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoder_multiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoder_multiplier = 10; #if ENCODER_5X_STEPS_PER_SEC - else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5; + else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoder_multiplier = 5; #endif } encoderRate.lastEncoderTime = ms; @@ -148,12 +148,12 @@ EncoderState encoderReceiveAnalyze() { #else - constexpr int32_t encoderMultiplier = 1; + constexpr int32_t encoder_multiplier = 1; #endif - // encoderRate.encoderMoveValue += (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP); - encoderRate.encoderMoveValue = (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP); + // encoderRate.encoderMoveValue += (temp_diff * encoder_multiplier) / (ENCODER_PULSES_PER_STEP); + encoderRate.encoderMoveValue = (temp_diff * encoder_multiplier) / (ENCODER_PULSES_PER_STEP); if (encoderRate.encoderMoveValue < 0) encoderRate.encoderMoveValue = -encoderRate.encoderMoveValue; temp_diff = 0; diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 313131d87aba..9a8152ba9909 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -398,12 +398,7 @@ void MarlinUI::init() { bool MarlinUI::screen_changed; #if ENABLED(ENCODER_RATE_MULTIPLIER) - bool MarlinUI::encoderRateMultiplierEnabled; - millis_t MarlinUI::lastEncoderMovementMillis = 0; - void MarlinUI::enable_encoder_multiplier(const bool onoff) { - encoderRateMultiplierEnabled = onoff; - lastEncoderMovementMillis = 0; - } + bool MarlinUI::encoder_multiplier_enabled; #endif #if ANY(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) @@ -614,8 +609,6 @@ void MarlinUI::init() { void MarlinUI::status_screen() { - TERN_(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLY(false)); - #if BASIC_PROGRESS_BAR // @@ -1053,41 +1046,37 @@ void MarlinUI::init() { #if ALL(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLIER) - int32_t encoderMultiplier = 1; - - if (encoderRateMultiplierEnabled) { - const float encoderMovementSteps = float(abs_diff) / epps; - - if (lastEncoderMovementMillis) { - // Note that the rate is always calculated between two passes through the - // loop and that the abs of the encoderDiff value is tracked. - const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; - - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - - // Enable to output the encoder steps per second value - //#define ENCODER_RATE_MULTIPLIER_DEBUG - #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPGM(" Multiplier: ", encoderMultiplier); - SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); - SERIAL_EOL(); - #endif - } - - lastEncoderMovementMillis = ms; - } // encoderRateMultiplierEnabled + int32_t encoder_multiplier = 1; + + if (encoder_multiplier_enabled) { + // Note that the rate is always calculated between two passes through the + // loop and that the abs of the encoderDiff value is tracked. + static millis_t encoder_mult_prev_ms = 0; + const float encoderStepRate = ((float(abs_diff) / float(epps)) * 1000.0f) / float(ms - encoder_mult_prev_ms); + encoder_mult_prev_ms = ms; + + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoder_multiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoder_multiplier = 10; + + // Enable to output the encoder steps per second value + //#define ENCODER_RATE_MULTIPLIER_DEBUG + #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); + SERIAL_ECHOPGM(" Multiplier: ", encoder_multiplier); + SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); + SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); + SERIAL_EOL(); + #endif + } #else - constexpr int32_t encoderMultiplier = 1; + constexpr int32_t encoder_multiplier = 1; #endif // ENCODER_RATE_MULTIPLIER - if (can_encode()) encoderPosition += (encoderDiff * encoderMultiplier) / epps; + if (can_encode()) encoderPosition += (encoderDiff * encoder_multiplier) / epps; encoderDiff = 0; } diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 04f4aea24ff7..ff87852f119b 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -658,6 +658,13 @@ class MarlinUI { TERN(HAS_SCREEN_TIMEOUT, return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS, UNUSED(ms)); } + #if ALL(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLIER) + static bool encoder_multiplier_enabled; + static void enable_encoder_multiplier(const bool onoff) { encoder_multiplier_enabled = onoff; } + #else + static void enable_encoder_multiplier(const bool) {} + #endif + #if HAS_MARLINUI_MENU #if HAS_TOUCH_BUTTONS @@ -667,15 +674,6 @@ class MarlinUI { static constexpr uint8_t touch_buttons = 0; #endif - #if ENABLED(ENCODER_RATE_MULTIPLIER) - static bool encoderRateMultiplierEnabled; - static millis_t lastEncoderMovementMillis; - static void enable_encoder_multiplier(const bool onoff); - #define ENCODER_RATE_MULTIPLY(F) (ui.encoderRateMultiplierEnabled = F) - #else - #define ENCODER_RATE_MULTIPLY(F) NOOP - #endif - // Manual Movement static ManualMove manual_move; static bool can_show_slider() { return !external_control && currentScreen != manual_move.screen_ptr; } diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index e98c9b48c04a..892af5dbabd8 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -222,6 +222,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co TERN_(HAS_MARLINUI_U8GLIB, drawing_screen = false); TERN_(HAS_MARLINUI_MENU, encoder_direction_normal()); + enable_encoder_multiplier(false); set_selection(false); } @@ -255,7 +256,6 @@ void MarlinUI::synchronize(FSTR_P const fmsg/*=nullptr*/) { */ void scroll_screen(const uint8_t limit, const bool is_menu) { ui.encoder_direction_menus(); - ENCODER_RATE_MULTIPLY(false); if (int32_t(ui.encoderPosition) < 0) ui.encoderPosition = 0; if (ui.first_page) { encoderLine = ui.encoderPosition / (ENCODER_STEPS_PER_MENU_ITEM); diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index 823d2a4a25e7..47cd7d5cf3a5 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -287,8 +287,8 @@ class MenuItem_bool : public MenuEditItemBase { #define _MENU_INNER_F(TYPE, USE_MULTIPLIER, FLABEL, V...) do { \ FSTR_P const flabel = FLABEL; \ if (CLICKED()) { \ - _MENU_ITEM_MULTIPLIER_CHECK(USE_MULTIPLIER); \ MenuItem_##TYPE::action(flabel, ##V); \ + _MENU_ITEM_MULTIPLIER_CHECK(USE_MULTIPLIER); \ if (ui.screen_changed) return; \ } \ if (ui.should_draw()) \ diff --git a/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/src/lcd/menu/menu_mixer.cpp index 21c18c820989..917164c0dba3 100644 --- a/Marlin/src/lcd/menu/menu_mixer.cpp +++ b/Marlin/src/lcd/menu/menu_mixer.cpp @@ -43,7 +43,7 @@ void _lcd_mixer_gradient_z_edit(const bool isend) { ui.defer_status_screen(); - ENCODER_RATE_MULTIPLY(true); + ui.enable_encoder_multiplier(true); float &zvar = isend ? mixer.gradient.end_z : mixer.gradient.start_z; From 669814d0d408a622f020a55971ba04030e4fa4bf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2024 23:40:54 -0600 Subject: [PATCH 205/236] =?UTF-8?q?=E2=9C=A8=20MARLIN=5FSMALL=5FBUILD=20op?= =?UTF-8?q?tion=20(#26775)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 3 +++ Marlin/src/feature/fwretract.cpp | 6 +++++ Marlin/src/gcode/bedlevel/G26.cpp | 24 +++++++++---------- Marlin/src/gcode/bedlevel/G35.cpp | 2 +- Marlin/src/gcode/bedlevel/M420.cpp | 9 +++---- Marlin/src/gcode/bedlevel/abl/G29.cpp | 8 +++---- Marlin/src/gcode/calibrate/G33.cpp | 8 +++---- Marlin/src/gcode/calibrate/G34_M422.cpp | 16 +++++++------ Marlin/src/gcode/calibrate/M425.cpp | 2 ++ Marlin/src/gcode/calibrate/M48.cpp | 8 +++---- Marlin/src/gcode/calibrate/M665.cpp | 9 ++++++- Marlin/src/gcode/calibrate/M666.cpp | 6 ++++- Marlin/src/gcode/calibrate/M852.cpp | 2 ++ Marlin/src/gcode/config/M200-M205.cpp | 12 +++++++++- Marlin/src/gcode/config/M217.cpp | 2 ++ Marlin/src/gcode/config/M218.cpp | 2 ++ Marlin/src/gcode/config/M281.cpp | 2 ++ Marlin/src/gcode/config/M301.cpp | 2 ++ Marlin/src/gcode/config/M304.cpp | 2 ++ Marlin/src/gcode/config/M309.cpp | 2 ++ Marlin/src/gcode/config/M92.cpp | 2 ++ Marlin/src/gcode/control/M211.cpp | 2 ++ Marlin/src/gcode/control/M42.cpp | 4 ++-- Marlin/src/gcode/control/M85.cpp | 7 +++++- Marlin/src/gcode/feature/advance/M900.cpp | 2 ++ .../src/gcode/feature/controllerfan/M710.cpp | 2 ++ .../src/gcode/feature/digipot/M907-M910.cpp | 2 ++ Marlin/src/gcode/feature/ft_motion/M493.cpp | 2 ++ .../src/gcode/feature/fwretract/M207-M209.cpp | 6 +++++ .../src/gcode/feature/input_shaping/M593.cpp | 4 +++- .../src/gcode/feature/network/M552-M554.cpp | 3 +++ Marlin/src/gcode/feature/nonlinear/M592.cpp | 1 + Marlin/src/gcode/feature/pause/M603.cpp | 2 ++ Marlin/src/gcode/feature/powerloss/M413.cpp | 2 ++ Marlin/src/gcode/feature/runout/M412.cpp | 2 ++ Marlin/src/gcode/feature/trinamic/M569.cpp | 2 ++ Marlin/src/gcode/feature/trinamic/M906.cpp | 2 ++ .../src/gcode/feature/trinamic/M911-M914.cpp | 4 ++++ Marlin/src/gcode/feature/trinamic/M919.cpp | 8 +++---- Marlin/src/gcode/gcode.h | 6 +++++ Marlin/src/gcode/geometry/M206_M428.cpp | 2 ++ Marlin/src/gcode/lcd/M145.cpp | 2 ++ Marlin/src/gcode/lcd/M250.cpp | 1 + Marlin/src/gcode/lcd/M255.cpp | 1 + Marlin/src/gcode/lcd/M256.cpp | 1 + Marlin/src/gcode/lcd/M414.cpp | 1 + Marlin/src/gcode/probe/M423.cpp | 6 +++-- Marlin/src/gcode/probe/M851.cpp | 12 ++++++---- Marlin/src/gcode/temp/M306.cpp | 2 ++ Marlin/src/gcode/temp/M86-M87.cpp | 2 ++ Marlin/src/gcode/units/M149.cpp | 2 ++ Marlin/src/inc/Conditionals_adv.h | 6 +++++ Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/module/temperature.cpp | 2 ++ 54 files changed, 179 insertions(+), 55 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 558fd70a9e8d..df532ae6f310 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -4527,3 +4527,6 @@ // Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR. //#define OPTIBOOT_RESET_REASON + +// Shrink the build for smaller boards by sacrificing some serial feedback +//#define MARLIN_SMALL_BUILD diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index 8f2edad158dd..aee775bffff4 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -212,6 +212,8 @@ void FWRetract::M207() { } void FWRetract::M207_report() { + TERN_(MARLIN_SMALL_BUILD, return); + SERIAL_ECHOLNPGM_P( PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length) , PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length) @@ -237,6 +239,8 @@ void FWRetract::M208() { } void FWRetract::M208_report() { + TERN_(MARLIN_SMALL_BUILD, return); + SERIAL_ECHOLNPGM( " M208 S", LINEAR_UNIT(settings.retract_recover_extra) , " W", LINEAR_UNIT(settings.swap_retract_recover_extra) @@ -258,6 +262,8 @@ void FWRetract::M208_report() { } void FWRetract::M209_report() { + TERN_(MARLIN_SMALL_BUILD, return); + SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled)); } diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 7fae11783e9d..ab940c65acdc 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -532,7 +532,7 @@ void GcodeSuite::G26() { if (bedtemp) { if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) { - SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).")); return; } g26.bed_temp = bedtemp; @@ -543,7 +543,7 @@ void GcodeSuite::G26() { if (parser.seenval('L')) { g26.layer_height = parser.value_linear_units(); if (!WITHIN(g26.layer_height, 0.0, 2.0)) { - SERIAL_ECHOLNPGM("?Specified layer height not plausible."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified layer height not plausible.")); return; } } @@ -552,12 +552,12 @@ void GcodeSuite::G26() { if (parser.has_value()) { g26.retraction_multiplier = parser.value_float(); if (!WITHIN(g26.retraction_multiplier, 0.05, 15.0)) { - SERIAL_ECHOLNPGM("?Specified Retraction Multiplier not plausible."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified Retraction Multiplier not plausible.")); return; } } else { - SERIAL_ECHOLNPGM("?Retraction Multiplier must be specified."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Retraction Multiplier must be specified.")); return; } } @@ -565,7 +565,7 @@ void GcodeSuite::G26() { if (parser.seenval('S')) { g26.nozzle = parser.value_float(); if (!WITHIN(g26.nozzle, 0.1, 2.0)) { - SERIAL_ECHOLNPGM("?Specified nozzle size not plausible."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified nozzle size not plausible.")); return; } } @@ -575,7 +575,7 @@ void GcodeSuite::G26() { #if HAS_MARLINUI_MENU g26.prime_flag = -1; #else - SERIAL_ECHOLNPGM("?Prime length must be specified when not using an LCD."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Prime length must be specified when not using an LCD.")); return; #endif } @@ -583,7 +583,7 @@ void GcodeSuite::G26() { g26.prime_flag++; g26.prime_length = parser.value_linear_units(); if (!WITHIN(g26.prime_length, 0.0, 25.0)) { - SERIAL_ECHOLNPGM("?Specified prime length not plausible."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified prime length not plausible.")); return; } } @@ -592,7 +592,7 @@ void GcodeSuite::G26() { if (parser.seenval('F')) { g26.filament_diameter = parser.value_linear_units(); if (!WITHIN(g26.filament_diameter, 1.0, 4.0)) { - SERIAL_ECHOLNPGM("?Specified filament size not plausible."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified filament size not plausible.")); return; } } @@ -616,7 +616,7 @@ void GcodeSuite::G26() { // If any preset or temperature was specified if (noztemp) { if (!WITHIN(noztemp, 165, thermalManager.hotend_max_target(active_extruder))) { - SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified nozzle temperature not plausible.")); return; } g26.hotend_temp = noztemp; @@ -637,12 +637,12 @@ void GcodeSuite::G26() { if (parser.seen('R')) g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1; else { - SERIAL_ECHOLNPGM("?(R)epeat must be specified when not using an LCD."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(R)epeat must be specified when not using an LCD.")); return; } #endif if (g26_repeats < 1) { - SERIAL_ECHOLNPGM("?(R)epeat value not plausible; must be at least 1."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(R)epeat value not plausible; must be at least 1.")); return; } @@ -650,7 +650,7 @@ void GcodeSuite::G26() { g26.xy_pos.set(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 (!position_is_reachable(g26.xy_pos)) { - SERIAL_ECHOLNPGM("?Specified X,Y coordinate out of bounds."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified X,Y coordinate out of bounds.")); return; } diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 89a43ef08a9e..63a1491f9bb1 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -64,7 +64,7 @@ void GcodeSuite::G35() { const uint8_t screw_thread = parser.byteval('S', TRAMMING_SCREW_THREAD); if (!WITHIN(screw_thread, 30, 51) || screw_thread % 10 > 1) { - SERIAL_ECHOLNPGM("?(S)crew thread must be 30, 31, 40, 41, 50, or 51."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S)crew thread must be 30, 31, 40, 41, 50, or 51.")); return; } diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index d870a4f4308a..c495da301850 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -105,13 +105,12 @@ void GcodeSuite::M420() { const int16_t a = settings.calc_num_meshes(); if (!a) { - SERIAL_ECHOLNPGM("?EEPROM storage not available."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("EEPROM storage not available.")); return; } if (!WITHIN(storage_slot, 0, a - 1)) { - SERIAL_ECHOLNPGM("?Invalid storage slot."); - SERIAL_ECHOLNPGM("?Use 0 to ", a - 1); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Invalid storage slot. Use 0 to ", a - 1)); return; } @@ -120,7 +119,7 @@ void GcodeSuite::M420() { #else - SERIAL_ECHOLNPGM("?EEPROM storage not available."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("EEPROM storage not available.")); return; #endif @@ -245,6 +244,8 @@ void GcodeSuite::M420() { } void GcodeSuite::M420_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F( TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling")) )); diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 1ca3826c816f..3126bee47f84 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -344,7 +344,7 @@ G29_TYPE GcodeSuite::G29() { abl.verbose_level = parser.intval('V'); if (!WITHIN(abl.verbose_level, 0, 4)) { - SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-4).")); G29_RETURN(false, false); } @@ -365,11 +365,11 @@ G29_TYPE GcodeSuite::G29() { if (parser.seenval('P')) abl.grid_points.x = abl.grid_points.y = parser.value_int(); if (!WITHIN(abl.grid_points.x, 2, GRID_MAX_POINTS_X)) { - SERIAL_ECHOLNPGM("?Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ")."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ").")); G29_RETURN(false, false); } if (!WITHIN(abl.grid_points.y, 2, GRID_MAX_POINTS_Y)) { - SERIAL_ECHOLNPGM("?Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ")."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ").")); G29_RETURN(false, false); } @@ -404,7 +404,7 @@ G29_TYPE GcodeSuite::G29() { 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); } - SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG(" (L,R,F,B) out of bounds.")); G29_RETURN(false, false); } diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 223beb4ddffa..59e0db132a71 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -390,7 +390,7 @@ void GcodeSuite::G33() { const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); if (!WITHIN(probe_points, 0, 10)) { - SERIAL_ECHOLNPGM("?(P)oints implausible (0-10)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(P)oints implausible (0-10).")); return; } @@ -409,19 +409,19 @@ void GcodeSuite::G33() { const float calibration_precision = parser.floatval('C', 0.0f); if (calibration_precision < 0) { - SERIAL_ECHOLNPGM("?(C)alibration precision implausible (>=0)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(C)alibration precision implausible (>=0).")); return; } const int8_t force_iterations = parser.intval('F', 0); if (!WITHIN(force_iterations, 0, 30)) { - SERIAL_ECHOLNPGM("?(F)orce iteration implausible (0-30)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(F)orce iteration implausible (0-30).")); return; } const int8_t verbose_level = parser.byteval('V', 1); if (!WITHIN(verbose_level, 0, 3)) { - SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-3)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-3).")); return; } diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index bbc403904f66..8b94dd53921b 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -110,19 +110,19 @@ void GcodeSuite::G34() { const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS); if (!WITHIN(z_auto_align_iterations, 1, 30)) { - SERIAL_ECHOLNPGM("?(I)teration out of bounds (1-30)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(I)teration out of bounds (1-30).")); break; } const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC); if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) { - SERIAL_ECHOLNPGM("?(T)arget accuracy out of bounds (0.01-1.0)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.01-1.0).")); break; } const float z_auto_align_amplification = TERN(HAS_Z_STEPPER_ALIGN_STEPPER_XY, Z_STEPPER_ALIGN_AMP, parser.floatval('A', Z_STEPPER_ALIGN_AMP)); if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) { - SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(A)mplification out of bounds (0.5-2.0).")); break; } @@ -450,7 +450,7 @@ void GcodeSuite::M422() { const bool is_probe_point = parser.seen_test('S'); if (TERN0(HAS_Z_STEPPER_ALIGN_STEPPER_XY, is_probe_point && parser.seen_test('W'))) { - SERIAL_ECHOLNPGM("?(S) and (W) may not be combined."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S) and (W) may not be combined.")); return; } @@ -460,7 +460,7 @@ void GcodeSuite::M422() { ); if (!is_probe_point && TERN1(HAS_Z_STEPPER_ALIGN_STEPPER_XY, !parser.seen_test('W'))) { - SERIAL_ECHOLNPGM("?(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required.")); return; } @@ -490,11 +490,11 @@ void GcodeSuite::M422() { if (is_probe_point) { if (!probe.can_reach(pos.x, Y_CENTER)) { - SERIAL_ECHOLNPGM("?(X) out of bounds."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(X) out of bounds.")); return; } if (!probe.can_reach(pos)) { - SERIAL_ECHOLNPGM("?(Y) out of bounds."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(Y) out of bounds.")); return; } } @@ -503,6 +503,8 @@ void GcodeSuite::M422() { } void GcodeSuite::M422_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_Z_AUTO_ALIGN)); for (uint8_t i = 0; i < NUM_Z_STEPPERS; ++i) { report_echo_start(forReplay); diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index cd206ca48927..22d71aba58e5 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -106,6 +106,8 @@ void GcodeSuite::M425() { } void GcodeSuite::M425_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_BACKLASH_COMPENSATION)); SERIAL_ECHOLNPGM_P( PSTR(" M425 F"), backlash.get_correction() diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index e3b81ce5b8c0..8dd951e054b3 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -62,13 +62,13 @@ void GcodeSuite::M48() { const int8_t verbose_level = parser.byteval('V', 1); if (!WITHIN(verbose_level, 0, 4)) { - SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-4).")); return; } const int8_t n_samples = parser.byteval('P', 10); if (!WITHIN(n_samples, 4, 50)) { - SERIAL_ECHOLNPGM("?Sample size not plausible (4-50)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Sample size not plausible (4-50).")); return; } @@ -82,7 +82,7 @@ void GcodeSuite::M48() { if (!probe.can_reach(test_position)) { LCD_MESSAGE_MAX(MSG_M48_OUT_OF_BOUNDS); - SERIAL_ECHOLNPGM("? (X,Y) out of bounds."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG(" (X,Y) out of bounds.")); return; } @@ -90,7 +90,7 @@ void GcodeSuite::M48() { bool seen_L = parser.seen('L'); uint8_t n_legs = seen_L ? parser.value_byte() : 0; if (n_legs > 15) { - SERIAL_ECHOLNPGM("?Legs of movement implausible (0-15)."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Legs of movement implausible (0-15).")); return; } if (n_legs == 1) n_legs = 2; diff --git a/Marlin/src/gcode/calibrate/M665.cpp b/Marlin/src/gcode/calibrate/M665.cpp index 22ad80425ac7..5409ff42324e 100644 --- a/Marlin/src/gcode/calibrate/M665.cpp +++ b/Marlin/src/gcode/calibrate/M665.cpp @@ -62,6 +62,8 @@ } void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_DELTA_SETTINGS)); SERIAL_ECHOLNPGM_P( PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) @@ -132,6 +134,8 @@ } void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")")); SERIAL_ECHOLNPGM_P( PSTR(" M665 S"), segments_per_second @@ -170,6 +174,8 @@ } void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_POLARGRAPH_SETTINGS)); SERIAL_ECHOLNPGM_P( PSTR(" M665 S"), LINEAR_UNIT(segments_per_second), @@ -196,10 +202,11 @@ } void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); report_heading_etc(forReplay, F(STR_POLAR_SETTINGS)); SERIAL_ECHOLNPGM_P(PSTR(" M665 S"), segments_per_second); } -#endif +#endif // POLAR #endif // IS_KINEMATIC diff --git a/Marlin/src/gcode/calibrate/M666.cpp b/Marlin/src/gcode/calibrate/M666.cpp index 143b6f249a4e..418629015432 100644 --- a/Marlin/src/gcode/calibrate/M666.cpp +++ b/Marlin/src/gcode/calibrate/M666.cpp @@ -56,11 +56,13 @@ } } } - if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0"); + if (is_err) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("M666 offsets must be <= 0")); if (!is_set) M666_report(); } void GcodeSuite::M666_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT)); SERIAL_ECHOLNPGM_P( PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) @@ -105,6 +107,8 @@ } void GcodeSuite::M666_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT)); SERIAL_ECHOPGM(" M666"); #if ENABLED(X_DUAL_ENDSTOPS) diff --git a/Marlin/src/gcode/calibrate/M852.cpp b/Marlin/src/gcode/calibrate/M852.cpp index 6d3c004548c6..001160ae72c2 100644 --- a/Marlin/src/gcode/calibrate/M852.cpp +++ b/Marlin/src/gcode/calibrate/M852.cpp @@ -92,6 +92,8 @@ void GcodeSuite::M852() { } void GcodeSuite::M852_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_SKEW_FACTOR)); SERIAL_ECHOPGM(" M852 I", p_float_t(planner.skew_factor.xy, 6)); #if ENABLED(SKEW_CORRECTION_FOR_Z) diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index 899f12099bbd..a0466fbeab63 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -67,7 +67,7 @@ if (WITHIN(lval, 0, VOLUMETRIC_EXTRUDER_LIMIT_MAX)) planner.set_volumetric_extruder_limit(target_extruder, lval); else - SERIAL_ECHOLNPGM("?L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ")."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ").")); } #endif @@ -75,6 +75,8 @@ } void GcodeSuite::M200_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + if (!forReplay) { report_heading(forReplay, F(STR_FILAMENT_SETTINGS), false); if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):"); @@ -142,6 +144,8 @@ void GcodeSuite::M201() { } void GcodeSuite::M201_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_MAX_ACCELERATION)); #if NUM_AXES SERIAL_ECHOPGM_P( @@ -198,6 +202,8 @@ void GcodeSuite::M203() { } void GcodeSuite::M203_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_MAX_FEEDRATES)); #if NUM_AXES SERIAL_ECHOPGM_P( @@ -255,6 +261,8 @@ void GcodeSuite::M204() { } void GcodeSuite::M204_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_ACCELERATION_P_R_T)); SERIAL_ECHOLNPGM_P( PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) @@ -329,6 +337,8 @@ void GcodeSuite::M205() { } void GcodeSuite::M205_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F( "Advanced (" M205_MIN_SEG_TIME_STR " S T" TERN_(HAS_JUNCTION_DEVIATION, " J") diff --git a/Marlin/src/gcode/config/M217.cpp b/Marlin/src/gcode/config/M217.cpp index 59737d3b0438..df275c2d3193 100644 --- a/Marlin/src/gcode/config/M217.cpp +++ b/Marlin/src/gcode/config/M217.cpp @@ -164,6 +164,8 @@ void GcodeSuite::M217() { } void GcodeSuite::M217_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_TOOL_CHANGING)); SERIAL_ECHOPGM(" M217"); diff --git a/Marlin/src/gcode/config/M218.cpp b/Marlin/src/gcode/config/M218.cpp index ff63dcaf34e7..006f9a1d2c1b 100644 --- a/Marlin/src/gcode/config/M218.cpp +++ b/Marlin/src/gcode/config/M218.cpp @@ -63,6 +63,8 @@ void GcodeSuite::M218() { } void GcodeSuite::M218_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_HOTEND_OFFSETS)); for (uint8_t e = 1; e < HOTENDS; ++e) { report_echo_start(forReplay); diff --git a/Marlin/src/gcode/config/M281.cpp b/Marlin/src/gcode/config/M281.cpp index 038a5d615ada..24a179e54ee3 100644 --- a/Marlin/src/gcode/config/M281.cpp +++ b/Marlin/src/gcode/config/M281.cpp @@ -55,6 +55,8 @@ void GcodeSuite::M281() { } void GcodeSuite::M281_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_SERVO_ANGLES)); for (uint8_t i = 0; i < NUM_SERVOS; ++i) { switch (i) { diff --git a/Marlin/src/gcode/config/M301.cpp b/Marlin/src/gcode/config/M301.cpp index a3938acb1157..fe0eef772f38 100644 --- a/Marlin/src/gcode/config/M301.cpp +++ b/Marlin/src/gcode/config/M301.cpp @@ -78,6 +78,8 @@ void GcodeSuite::M301() { } void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_HOTEND_PID)); IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1); HOTEND_LOOP() { diff --git a/Marlin/src/gcode/config/M304.cpp b/Marlin/src/gcode/config/M304.cpp index a71a34c6de42..8201730afd5a 100644 --- a/Marlin/src/gcode/config/M304.cpp +++ b/Marlin/src/gcode/config/M304.cpp @@ -42,6 +42,8 @@ void GcodeSuite::M304() { } void GcodeSuite::M304_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_BED_PID)); SERIAL_ECHOLNPGM(" M304" " P", thermalManager.temp_bed.pid.p() diff --git a/Marlin/src/gcode/config/M309.cpp b/Marlin/src/gcode/config/M309.cpp index 4953113041d7..033f5731edc6 100644 --- a/Marlin/src/gcode/config/M309.cpp +++ b/Marlin/src/gcode/config/M309.cpp @@ -42,6 +42,8 @@ void GcodeSuite::M309() { } void GcodeSuite::M309_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_CHAMBER_PID)); SERIAL_ECHOLNPGM(" M309" " P", thermalManager.temp_chamber.pid.p() diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 2f33be63a1dc..2a5eb30f5516 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -96,6 +96,8 @@ void GcodeSuite::M92() { } void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_STEPS_PER_UNIT)); #if NUM_AXES #define PRINT_EOL diff --git a/Marlin/src/gcode/control/M211.cpp b/Marlin/src/gcode/control/M211.cpp index 8e7d10ce65b9..471ca6c448de 100644 --- a/Marlin/src/gcode/control/M211.cpp +++ b/Marlin/src/gcode/control/M211.cpp @@ -40,6 +40,8 @@ void GcodeSuite::M211() { } void GcodeSuite::M211_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_SOFT_ENDSTOPS)); SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; "); serialprintln_onoff(soft_endstop._enabled); diff --git a/Marlin/src/gcode/control/M42.cpp b/Marlin/src/gcode/control/M42.cpp index 13965cb72c22..b995f208f57a 100644 --- a/Marlin/src/gcode/control/M42.cpp +++ b/Marlin/src/gcode/control/M42.cpp @@ -79,7 +79,7 @@ void GcodeSuite::M42() { #ifdef OUTPUT_OPEN_DRAIN case 5: pinMode(pin, OUTPUT_OPEN_DRAIN); break; #endif - default: SERIAL_ECHOLNPGM("Invalid Pin Mode"); return; + default: SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Invalid Pin Mode")); return; } } @@ -94,7 +94,7 @@ void GcodeSuite::M42() { #endif if (avoidWrite) { - SERIAL_ECHOLNPGM("?Cannot write to INPUT"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Cannot write to INPUT")); return; } diff --git a/Marlin/src/gcode/control/M85.cpp b/Marlin/src/gcode/control/M85.cpp index ee868349ed75..784631541367 100644 --- a/Marlin/src/gcode/control/M85.cpp +++ b/Marlin/src/gcode/control/M85.cpp @@ -32,11 +32,16 @@ void GcodeSuite::M85() { const millis_t ms = parser.value_millis_from_seconds(); #if LASER_SAFETY_TIMEOUT_MS > 0 if (ms && ms <= LASER_SAFETY_TIMEOUT_MS) { - SERIAL_ECHO_MSG("M85 timeout must be > ", MS_TO_SEC(LASER_SAFETY_TIMEOUT_MS + 999), " s for laser safety."); + SERIAL_ECHO_MSG(GCODE_ERR_MSG("M85 timeout must be > ", MS_TO_SEC(LASER_SAFETY_TIMEOUT_MS + 999), " s for laser safety.")); return; } #endif max_inactive_time = ms; } + else { + #if DISABLED(MARLIN_SMALL_BUILD) + SERIAL_ECHOLNPGM("Inactivity timeout ", MS_TO_SEC(max_inactive_time), " s."); + #endif + } } diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index 5fa9c04dbd2a..e8a16d952f30 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -141,6 +141,8 @@ void GcodeSuite::M900() { } void GcodeSuite::M900_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_LINEAR_ADVANCE)); #if DISTINCT_E < 2 report_echo_start(forReplay); diff --git a/Marlin/src/gcode/feature/controllerfan/M710.cpp b/Marlin/src/gcode/feature/controllerfan/M710.cpp index b98d88845dec..c8b5efa8cb02 100644 --- a/Marlin/src/gcode/feature/controllerfan/M710.cpp +++ b/Marlin/src/gcode/feature/controllerfan/M710.cpp @@ -67,6 +67,8 @@ void GcodeSuite::M710() { } void GcodeSuite::M710_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_CONTROLLER_FAN)); SERIAL_ECHOLNPGM(" M710" " S", int(controllerFan.settings.active_speed), diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index 8869f8d49462..55d43f1b416f 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -126,6 +126,8 @@ void GcodeSuite::M907() { #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM void GcodeSuite::M907_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_STEPPER_MOTOR_CURRENTS)); #if HAS_MOTOR_CURRENT_PWM SERIAL_ECHOLNPGM_P( // PWM-based has 3 values: diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index 64d57118a0f3..2da92b8582d6 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -104,6 +104,8 @@ void say_shaping() { } void GcodeSuite::M493_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_FT_MOTION)); const ft_config_t &c = ftMotion.cfg; SERIAL_ECHOPGM(" M493 S", c.mode); diff --git a/Marlin/src/gcode/feature/fwretract/M207-M209.cpp b/Marlin/src/gcode/feature/fwretract/M207-M209.cpp index 173c2894dcd6..2d198b7ade1d 100644 --- a/Marlin/src/gcode/feature/fwretract/M207-M209.cpp +++ b/Marlin/src/gcode/feature/fwretract/M207-M209.cpp @@ -38,6 +38,8 @@ void GcodeSuite::M207() { fwretract.M207(); } void GcodeSuite::M207_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_RETRACT_S_F_Z)); fwretract.M207_report(); } @@ -53,6 +55,8 @@ void GcodeSuite::M207_report(const bool forReplay/*=true*/) { void GcodeSuite::M208() { fwretract.M208(); } void GcodeSuite::M208_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_RECOVER_S_F)); fwretract.M208_report(); } @@ -68,6 +72,8 @@ void GcodeSuite::M208_report(const bool forReplay/*=true*/) { void GcodeSuite::M209() { fwretract.M209(); } void GcodeSuite::M209_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_AUTO_RETRACT_S)); fwretract.M209_report(); } diff --git a/Marlin/src/gcode/feature/input_shaping/M593.cpp b/Marlin/src/gcode/feature/input_shaping/M593.cpp index 1b6a43f9ddb7..249536efffb5 100644 --- a/Marlin/src/gcode/feature/input_shaping/M593.cpp +++ b/Marlin/src/gcode/feature/input_shaping/M593.cpp @@ -28,6 +28,8 @@ #include "../../../module/stepper.h" void GcodeSuite::M593_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F("Input Shaping")); #if ENABLED(INPUT_SHAPING_X) SERIAL_ECHOLNPGM(" M593 X" @@ -78,7 +80,7 @@ void GcodeSuite::M593() { if (for_Y) stepper.set_shaping_frequency(Y_AXIS, freq); } else - SERIAL_ECHOLNPGM("?Frequency (F) must be greater than ", min_freq, " or 0 to disable"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Frequency (F) must be greater than ", min_freq, " or 0 to disable")); } } diff --git a/Marlin/src/gcode/feature/network/M552-M554.cpp b/Marlin/src/gcode/feature/network/M552-M554.cpp index 7633ec1fd532..9a09a973c82c 100644 --- a/Marlin/src/gcode/feature/network/M552-M554.cpp +++ b/Marlin/src/gcode/feature/network/M552-M554.cpp @@ -97,6 +97,7 @@ void GcodeSuite::M552() { } void GcodeSuite::M552_report() { + TERN_(MARLIN_SMALL_BUILD, return); ip_report(552, F("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip); } @@ -111,6 +112,7 @@ void GcodeSuite::M553() { } void GcodeSuite::M553_report() { + TERN_(MARLIN_SMALL_BUILD, return); ip_report(553, F("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet); } @@ -125,6 +127,7 @@ void GcodeSuite::M554() { } void GcodeSuite::M554_report() { + TERN_(MARLIN_SMALL_BUILD, return); ip_report(554, F("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway); } diff --git a/Marlin/src/gcode/feature/nonlinear/M592.cpp b/Marlin/src/gcode/feature/nonlinear/M592.cpp index 792bb9b91200..b1c4ca4be790 100644 --- a/Marlin/src/gcode/feature/nonlinear/M592.cpp +++ b/Marlin/src/gcode/feature/nonlinear/M592.cpp @@ -28,6 +28,7 @@ #include "../../../module/stepper.h" void GcodeSuite::M592_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); report_heading(forReplay, F(STR_NONLINEAR_EXTRUSION)); SERIAL_ECHOLNPGM(" M592 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C); } diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp index 0204ab25ef65..fcc042f58e86 100644 --- a/Marlin/src/gcode/feature/pause/M603.cpp +++ b/Marlin/src/gcode/feature/pause/M603.cpp @@ -61,6 +61,8 @@ void GcodeSuite::M603() { } void GcodeSuite::M603_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_FILAMENT_LOAD_UNLOAD)); #if EXTRUDERS == 1 diff --git a/Marlin/src/gcode/feature/powerloss/M413.cpp b/Marlin/src/gcode/feature/powerloss/M413.cpp index 8cbe468476b3..733a34484cb7 100644 --- a/Marlin/src/gcode/feature/powerloss/M413.cpp +++ b/Marlin/src/gcode/feature/powerloss/M413.cpp @@ -64,6 +64,8 @@ void GcodeSuite::M413() { } void GcodeSuite::M413_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_POWER_LOSS_RECOVERY)); SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled) #if HAS_PLR_BED_THRESHOLD diff --git a/Marlin/src/gcode/feature/runout/M412.cpp b/Marlin/src/gcode/feature/runout/M412.cpp index 4b4ab6a68a8e..4cfb23830913 100644 --- a/Marlin/src/gcode/feature/runout/M412.cpp +++ b/Marlin/src/gcode/feature/runout/M412.cpp @@ -67,6 +67,8 @@ void GcodeSuite::M412() { } void GcodeSuite::M412_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR)); SERIAL_ECHOPGM( " M412 S", runout.enabled diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index b4e6a13c52a6..06a4992ceb07 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -155,6 +155,8 @@ void GcodeSuite::M569() { } void GcodeSuite::M569_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_DRIVER_STEPPING_MODE)); auto say_M569 = [](const bool forReplay, FSTR_P const etc=nullptr, const bool eol=false) { diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp index b949200ad779..c0dc456a8a32 100644 --- a/Marlin/src/gcode/feature/trinamic/M906.cpp +++ b/Marlin/src/gcode/feature/trinamic/M906.cpp @@ -231,6 +231,8 @@ void GcodeSuite::M906() { } void GcodeSuite::M906_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_STEPPER_DRIVER_CURRENT)); auto say_M906 = [](const bool forReplay) { diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index fa1cc1227cc2..ba6d9538a4f8 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -378,6 +378,8 @@ } void GcodeSuite::M913_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_HYBRID_THRESHOLD)); auto say_M913 = [](const bool forReplay) { @@ -565,6 +567,8 @@ } void GcodeSuite::M914_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_STALLGUARD_THRESHOLD)); auto say_M914 = [](const bool forReplay) { diff --git a/Marlin/src/gcode/feature/trinamic/M919.cpp b/Marlin/src/gcode/feature/trinamic/M919.cpp index 4ee004291d85..98227c712532 100644 --- a/Marlin/src/gcode/feature/trinamic/M919.cpp +++ b/Marlin/src/gcode/feature/trinamic/M919.cpp @@ -64,7 +64,7 @@ void GcodeSuite::M919() { if (WITHIN(toff, 1, 15)) DEBUG_ECHOLNPGM(".toff: ", toff); else { - SERIAL_ECHOLNPGM("?O out of range (1..15)"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("O out of range (1..15)")); err = true; } } @@ -74,7 +74,7 @@ void GcodeSuite::M919() { if (WITHIN(hend, -3, 12)) DEBUG_ECHOLNPGM(".hend: ", hend); else { - SERIAL_ECHOLNPGM("?P out of range (-3..12)"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("P out of range (-3..12)")); err = true; } } @@ -84,7 +84,7 @@ void GcodeSuite::M919() { if (WITHIN(hstrt, 1, 8)) DEBUG_ECHOLNPGM(".hstrt: ", hstrt); else { - SERIAL_ECHOLNPGM("?S out of range (1..8)"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("S out of range (1..8)")); err = true; } } @@ -118,7 +118,7 @@ void GcodeSuite::M919() { // Get the chopper timing for the specified axis and index switch (i) { default: // A specified axis isn't Trinamic - SERIAL_ECHOLNPGM("?Axis ", C(AXIS_CHAR(i)), " has no TMC drivers."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Axis ", C(AXIS_CHAR(i)), " has no TMC drivers.")); break; #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 7a72097141b7..8004187903dd 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -341,6 +341,12 @@ #define HAS_FAST_MOVES 1 #endif +#if ENABLED(MARLIN_SMALL_BUILD) + #define GCODE_ERR_MSG(V...) "?" +#else + #define GCODE_ERR_MSG(V...) "?" V +#endif + enum AxisRelative : uint8_t { LOGICAL_AXIS_LIST(REL_E, REL_X, REL_Y, REL_Z, REL_I, REL_J, REL_K, REL_U, REL_V, REL_W) #if HAS_EXTRUDERS diff --git a/Marlin/src/gcode/geometry/M206_M428.cpp b/Marlin/src/gcode/geometry/M206_M428.cpp index 7017eabbdc3e..dcf19625be99 100644 --- a/Marlin/src/gcode/geometry/M206_M428.cpp +++ b/Marlin/src/gcode/geometry/M206_M428.cpp @@ -48,6 +48,8 @@ void GcodeSuite::M206() { } void GcodeSuite::M206_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_HOME_OFFSET)); SERIAL_ECHOLNPGM_P( #if IS_CARTESIAN diff --git a/Marlin/src/gcode/lcd/M145.cpp b/Marlin/src/gcode/lcd/M145.cpp index d72d5d678989..3cc6130dfd45 100644 --- a/Marlin/src/gcode/lcd/M145.cpp +++ b/Marlin/src/gcode/lcd/M145.cpp @@ -61,6 +61,8 @@ void GcodeSuite::M145() { } void GcodeSuite::M145_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F(STR_MATERIAL_HEATUP)); for (uint8_t i = 0; i < PREHEAT_COUNT; ++i) { report_echo_start(forReplay); diff --git a/Marlin/src/gcode/lcd/M250.cpp b/Marlin/src/gcode/lcd/M250.cpp index 58b6dac872a3..40c39edd1c6a 100644 --- a/Marlin/src/gcode/lcd/M250.cpp +++ b/Marlin/src/gcode/lcd/M250.cpp @@ -38,6 +38,7 @@ void GcodeSuite::M250() { } void GcodeSuite::M250_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); report_heading_etc(forReplay, F(STR_LCD_CONTRAST)); SERIAL_ECHOLNPGM(" M250 C", ui.contrast); } diff --git a/Marlin/src/gcode/lcd/M255.cpp b/Marlin/src/gcode/lcd/M255.cpp index 2b982ee5d9a0..e8213f3fd8a1 100644 --- a/Marlin/src/gcode/lcd/M255.cpp +++ b/Marlin/src/gcode/lcd/M255.cpp @@ -44,6 +44,7 @@ void GcodeSuite::M255() { } void GcodeSuite::M255_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); report_heading_etc(forReplay, F(STR_DISPLAY_SLEEP)); SERIAL_ECHOLNPGM(" M255 S", TERN(HAS_DISPLAY_SLEEP, ui.sleep_timeout_minutes, ui.backlight_timeout_minutes), diff --git a/Marlin/src/gcode/lcd/M256.cpp b/Marlin/src/gcode/lcd/M256.cpp index 9842cc258339..647aec4ff5e5 100644 --- a/Marlin/src/gcode/lcd/M256.cpp +++ b/Marlin/src/gcode/lcd/M256.cpp @@ -37,6 +37,7 @@ void GcodeSuite::M256() { } void GcodeSuite::M256_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); report_heading_etc(forReplay, F(STR_LCD_BRIGHTNESS)); SERIAL_ECHOLNPGM(" M256 B", ui.brightness); } diff --git a/Marlin/src/gcode/lcd/M414.cpp b/Marlin/src/gcode/lcd/M414.cpp index 9aa49ea3c210..4b961ad8cae1 100644 --- a/Marlin/src/gcode/lcd/M414.cpp +++ b/Marlin/src/gcode/lcd/M414.cpp @@ -44,6 +44,7 @@ void GcodeSuite::M414() { } void GcodeSuite::M414_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); report_heading_etc(forReplay, F(STR_UI_LANGUAGE)); SERIAL_ECHOLNPGM(" M414 S", ui.language); } diff --git a/Marlin/src/gcode/probe/M423.cpp b/Marlin/src/gcode/probe/M423.cpp index 7c82a4f8af30..7ab887eb645a 100644 --- a/Marlin/src/gcode/probe/M423.cpp +++ b/Marlin/src/gcode/probe/M423.cpp @@ -72,12 +72,12 @@ void GcodeSuite::M423() { do_report = false; const int8_t x = parser.value_int(); if (!WITHIN(x, 0, XATC_MAX_POINTS - 1)) - SERIAL_ECHOLNPGM("?(X) out of range (0..", XATC_MAX_POINTS - 1, ")."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(X) out of range (0..", XATC_MAX_POINTS - 1, ").")); else { if (parser.seenval('Z')) xatc.z_offset[x] = parser.value_linear_units(); else - SERIAL_ECHOLNPGM("?(Z) required."); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(Z) required.")); } } @@ -86,6 +86,8 @@ void GcodeSuite::M423() { } void GcodeSuite::M423_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F("X-Twist Correction")); SERIAL_ECHOLNPGM(" M423 A", xatc.start, " I", xatc.spacing); for (uint8_t x = 0; x < XATC_MAX_POINTS; ++x) { diff --git a/Marlin/src/gcode/probe/M851.cpp b/Marlin/src/gcode/probe/M851.cpp index ec63ff190dc0..7c40eddd5d48 100644 --- a/Marlin/src/gcode/probe/M851.cpp +++ b/Marlin/src/gcode/probe/M851.cpp @@ -47,11 +47,11 @@ void GcodeSuite::M851() { if (WITHIN(x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX)) offs.x = x; else { - SERIAL_ECHOLNPGM("?X out of range (", PROBE_OFFSET_XMIN, " to ", PROBE_OFFSET_XMAX, ")"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("X out of range (", PROBE_OFFSET_XMIN, " to ", PROBE_OFFSET_XMAX, ")")); ok = false; } #else - if (x) SERIAL_ECHOLNPGM("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true + if (x) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("X must be 0 (NOZZLE_AS_PROBE).")); // ...but let 'ok' stay true #endif } @@ -61,11 +61,11 @@ void GcodeSuite::M851() { if (WITHIN(y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX)) offs.y = y; else { - SERIAL_ECHOLNPGM("?Y out of range (", PROBE_OFFSET_YMIN, " to ", PROBE_OFFSET_YMAX, ")"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Y out of range (", PROBE_OFFSET_YMIN, " to ", PROBE_OFFSET_YMAX, ")")); ok = false; } #else - if (y) SERIAL_ECHOLNPGM("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true + if (y) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Y must be 0 (NOZZLE_AS_PROBE).")); // ...but let 'ok' stay true #endif } @@ -74,7 +74,7 @@ void GcodeSuite::M851() { if (WITHIN(z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) offs.z = z; else { - SERIAL_ECHOLNPGM("?Z out of range (", PROBE_OFFSET_ZMIN, " to ", PROBE_OFFSET_ZMAX, ")"); + SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Z out of range (", PROBE_OFFSET_ZMIN, " to ", PROBE_OFFSET_ZMAX, ")")); ok = false; } } @@ -84,6 +84,8 @@ void GcodeSuite::M851() { } void GcodeSuite::M851_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_Z_PROBE_OFFSET)); SERIAL_ECHOPGM_P( #if HAS_PROBE_XY_OFFSET diff --git a/Marlin/src/gcode/temp/M306.cpp b/Marlin/src/gcode/temp/M306.cpp index 2830a77ab4fd..585b706a82ff 100644 --- a/Marlin/src/gcode/temp/M306.cpp +++ b/Marlin/src/gcode/temp/M306.cpp @@ -88,6 +88,8 @@ void GcodeSuite::M306() { } void GcodeSuite::M306_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading(forReplay, F("Model predictive control")); HOTEND_LOOP() { report_echo_start(forReplay); diff --git a/Marlin/src/gcode/temp/M86-M87.cpp b/Marlin/src/gcode/temp/M86-M87.cpp index 7fb446196123..a64358d21278 100644 --- a/Marlin/src/gcode/temp/M86-M87.cpp +++ b/Marlin/src/gcode/temp/M86-M87.cpp @@ -34,6 +34,8 @@ #include "../../feature/hotend_idle.h" void GcodeSuite::M86_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + hotend_idle_settings_t &c = hotend_idle.cfg; report_heading(forReplay, F("Hotend Idle Timeout")); SERIAL_ECHOLNPGM(" M86" diff --git a/Marlin/src/gcode/units/M149.cpp b/Marlin/src/gcode/units/M149.cpp index bd9d8d486cb5..a3bf7858b82f 100644 --- a/Marlin/src/gcode/units/M149.cpp +++ b/Marlin/src/gcode/units/M149.cpp @@ -37,6 +37,8 @@ void GcodeSuite::M149() { } void GcodeSuite::M149_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + report_heading_etc(forReplay, F(STR_TEMPERATURE_UNITS)); SERIAL_ECHOLN(F(" M149 "), C(parser.temp_units_code()), F(" ; Units in "), parser.temp_units_name()); } diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 93acd89aa981..a5481bb985dd 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -26,6 +26,12 @@ * Conditionals set before pins.h and which depend on Configuration_adv.h. */ +#if ENABLED(MARLIN_SMALL_BUILD) + #undef EEPROM_CHITCHAT + #undef CAPABILITIES_REPORT + #define DISABLE_M503 +#endif + #ifndef AXIS_RELATIVE_MODES #define AXIS_RELATIVE_MODES {} #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 973f17927078..c70ac494328f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3957,7 +3957,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive." * Sanity Check for Slim LCD Menus and Probe Offset Wizard */ #if ALL(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD) - #error "SLIM_LCD_MENUS disables \"Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.\"" + #error "SLIM_LCD_MENUS disables 'Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.'" #endif /** diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 5ac26794a403..9b071ecc3650 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2271,6 +2271,8 @@ void Temperature::task() { } void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + gcode.report_heading_etc(forReplay, F(STR_USER_THERMISTORS)); SERIAL_ECHOPGM(" M305 P", AS_DIGIT(t_index)); From 1d295f7983a90be9eddc830bc7be621c6dcb14c7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2024 23:44:55 -0600 Subject: [PATCH 206/236] =?UTF-8?q?=F0=9F=94=A5=20Clean=20up=20SCARA/TPARA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 87908d1821c0..b49ae40babb9 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1006,9 +1006,6 @@ // Radius around the center where the arm cannot reach #define MIDDLE_DEAD_ZONE_R 0 // (mm) - #define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/ - #define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/ - #elif ENABLED(MP_SCARA) #define SCARA_OFFSET_THETA1 12 // degrees @@ -1027,23 +1024,19 @@ #define DEFAULT_SEGMENTS_PER_SECOND 200 // Length of inner and outer support arms. Measure arm lengths precisely. - #define TPARA_LINKAGE_1 120 // (mm) - #define TPARA_LINKAGE_2 120 // (mm) + #define TPARA_LINKAGE_1 120 // (mm) + #define TPARA_LINKAGE_2 120 // (mm) - // SCARA tower offset (position of Tower relative to bed zero position) - // This needs to be reasonably accurate as it defines the printbed position in the SCARA space. - #define TPARA_OFFSET_X 0 // (mm) - #define TPARA_OFFSET_Y 0 // (mm) - #define TPARA_OFFSET_Z 0 // (mm) + // TPARA tower offset (position of Tower relative to bed zero position) + // This needs to be reasonably accurate as it defines the printbed position in the TPARA space. + #define TPARA_OFFSET_X 0 // (mm) + #define TPARA_OFFSET_Y 0 // (mm) + #define TPARA_OFFSET_Z 0 // (mm) #define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly // Radius around the center where the arm cannot reach #define MIDDLE_DEAD_ZONE_R 0 // (mm) - - // Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/ - #define THETA_HOMING_OFFSET 0 - #define PSI_HOMING_OFFSET 0 #endif // @section polar From 20c6a6233bc3d749335d3f761c61131355a6e534 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 8 Feb 2024 16:49:13 -0600 Subject: [PATCH 207/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20HC3?= =?UTF-8?q?2=20endstop=20interrupts=20for=20X2/Y2/Z4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/HC32/endstop_interrupts.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/HC32/endstop_interrupts.cpp b/Marlin/src/HAL/HC32/endstop_interrupts.cpp index a976fa1d3c0d..99987ec76f5b 100644 --- a/Marlin/src/HAL/HC32/endstop_interrupts.cpp +++ b/Marlin/src/HAL/HC32/endstop_interrupts.cpp @@ -40,9 +40,15 @@ void endstopIRQHandler() { CHECK(X_MAX); CHECK(X_MIN); + CHECK(X2_MAX); + CHECK(X2_MIN); + CHECK(Y_MAX); CHECK(Y_MIN); + CHECK(Y2_MAX); + CHECK(Y2_MIN); + CHECK(Z_MAX); CHECK(Z_MIN); @@ -52,6 +58,9 @@ void endstopIRQHandler() { CHECK(Z3_MAX); CHECK(Z3_MIN); + CHECK(Z4_MAX); + CHECK(Z4_MIN); + CHECK(Z_MIN_PROBE); // Update endstops @@ -69,9 +78,15 @@ void setup_endstop_interrupts() { SETUP(X_MAX); SETUP(X_MIN); + SETUP(X2_MAX); + SETUP(X2_MIN); + SETUP(Y_MAX); SETUP(Y_MIN); + SETUP(Y2_MAX); + SETUP(Y2_MIN); + SETUP(Z_MAX); SETUP(Z_MIN); @@ -81,6 +96,9 @@ void setup_endstop_interrupts() { SETUP(Z3_MAX); SETUP(Z3_MIN); + SETUP(Z4_MAX); + SETUP(Z4_MIN); + SETUP(Z_MIN_PROBE); #undef SETUP @@ -88,7 +106,7 @@ void setup_endstop_interrupts() { // Ensure 1 - 10 IRQs are registered // Disable some endstops if you encounter this error -#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_Y_MAX, USE_Y_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z_MIN_PROBE) +#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE) #if ENDSTOPS_INTERRUPTS_COUNT > 10 #error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts." #elif ENDSTOPS_INTERRUPTS_COUNT == 0 From 1e8fbb7bbb8611194c9d7242a860b153412694c5 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 9 Feb 2024 00:20:11 +0000 Subject: [PATCH 208/236] [cron] Bump distribution date (2024-02-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 2bb3aaab0753..840689ec4553 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 "2024-02-08" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 355a77709d14..44b2610de43b 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 "2024-02-08" + #define STRING_DISTRIBUTION_DATE "2024-02-09" #endif /** From 76b568830475d218a5229ff9736a155c5a0cb620 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Feb 2024 19:11:37 -0600 Subject: [PATCH 209/236] =?UTF-8?q?=F0=9F=9A=B8=20Optional=20encoder=20mul?= =?UTF-8?q?tipliers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_adv.h | 18 ++++++++++++++++++ Marlin/src/lcd/e3v2/common/encoder.cpp | 11 ++++++----- Marlin/src/lcd/marlinui.cpp | 21 +++++++++++++-------- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index a5481bb985dd..4f74fa006718 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -869,6 +869,24 @@ #define HAS_ENCODER_ACTION 1 #endif +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #ifndef ENCODER_5X_STEPS_PER_SEC + #define ENCODER_5X_STEPS_PER_SEC 0 + #endif + #ifndef ENCODER_10X_STEPS_PER_SEC + #define ENCODER_10X_STEPS_PER_SEC 0 + #endif + #ifndef ENCODER_100X_STEPS_PER_SEC + #define ENCODER_100X_STEPS_PER_SEC 0 + #endif + #if !((HAS_MARLINUI_MENU || HAS_DWIN_E3V2) && (ENCODER_5X_STEPS_PER_SEC || ENCODER_10X_STEPS_PER_SEC || ENCODER_100X_STEPS_PER_SEC)) + #undef ENCODER_RATE_MULTIPLIER + #undef ENCODER_5X_STEPS_PER_SEC + #undef ENCODER_10X_STEPS_PER_SEC + #undef ENCODER_100X_STEPS_PER_SEC + #endif +#endif + #if STATUS_MESSAGE_TIMEOUT_SEC > 0 #define HAS_STATUS_MESSAGE_TIMEOUT 1 #endif diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index c406cc47d922..5825fb0f7753 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -137,11 +137,12 @@ EncoderState encoderReceiveAnalyze() { // Note that the rate is always calculated between two passes through the // loop and that the abs of the temp_diff value is tracked. const float encoderStepRate = encoderMovementSteps / float(ms - encoderRate.lastEncoderTime) * 1000; - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoder_multiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoder_multiplier = 10; - #if ENCODER_5X_STEPS_PER_SEC - else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoder_multiplier = 5; - #endif + if (ENCODER_100X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) + encoder_multiplier = 100; + else if (ENCODER_10X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) + encoder_multiplier = 10; + else if (ENCODER_5X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) + encoder_multiplier = 5; } encoderRate.lastEncoderTime = ms; } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 9a8152ba9909..f66b680bc1c8 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1055,18 +1055,23 @@ void MarlinUI::init() { const float encoderStepRate = ((float(abs_diff) / float(epps)) * 1000.0f) / float(ms - encoder_mult_prev_ms); encoder_mult_prev_ms = ms; - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoder_multiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoder_multiplier = 10; + if (ENCODER_100X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) + encoder_multiplier = 100; + else if (ENCODER_10X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) + encoder_multiplier = 10; + else if (ENCODER_5X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) + encoder_multiplier = 5; // Enable to output the encoder steps per second value //#define ENCODER_RATE_MULTIPLIER_DEBUG #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPGM(" Multiplier: ", encoder_multiplier); - SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); - SERIAL_EOL(); + SERIAL_ECHO_MSG( + "Enc Step Rate: ", encoderStepRate, + " Mult: ", encoder_multiplier, + " 5X Steps: ", ENCODER_5X_STEPS_PER_SEC, + " 10X Steps: ", ENCODER_10X_STEPS_PER_SEC, + " 100X Steps: ", ENCODER_100X_STEPS_PER_SEC + ); #endif } From 8d7be79108ecb481761527516782830890a28de7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Feb 2024 19:11:56 -0600 Subject: [PATCH 210/236] =?UTF-8?q?=F0=9F=91=B7=20Improve=20BIGTREE=5FGTR?= =?UTF-8?q?=5FV1=5F0=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/tests/BIGTREE_GTR_V1_0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index e2e70e5f81e3..932317598652 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -27,7 +27,7 @@ opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 Z4_DRIVER_TYPE A4988 \ DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }' opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \ - PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS TC_GCODE_USE_GLOBAL_X TC_GCODE_USE_GLOBAL_Y + REPRAP_DISCOUNT_SMART_CONTROLLER PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS TC_GCODE_USE_GLOBAL_X TC_GCODE_USE_GLOBAL_Y exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3" restore_configs @@ -42,7 +42,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 MPC_AUTOTUNE_MENU +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER 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" From 4eba643ae1fe90f8aa2831a359efafbd78933fbe Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 10 Feb 2024 06:17:34 +0000 Subject: [PATCH 211/236] [cron] Bump distribution date (2024-02-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 840689ec4553..88388b4cb98d 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 "2024-02-09" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 44b2610de43b..90267532a69f 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 "2024-02-09" + #define STRING_DISTRIBUTION_DATE "2024-02-10" #endif /** From 9974327d333c3db443a7627b476f02c91a1ace0e Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 11 Feb 2024 03:28:37 +1300 Subject: [PATCH 212/236] extend uart checks --- Marlin/src/HAL/STM32/inc/SanityCheck.h | 5 +++-- .../src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 15 +++++++++++++++ .../src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 11 +++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Marlin/src/HAL/STM32/inc/SanityCheck.h b/Marlin/src/HAL/STM32/inc/SanityCheck.h index 8bff51874eb5..e35b4e59cf81 100644 --- a/Marlin/src/HAL/STM32/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32/inc/SanityCheck.h @@ -58,8 +58,9 @@ * Check for common serial pin conflicts */ #define _CHECK_SERIAL_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 \ + BTN_EN1 == N || BTN_EN2 == 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 || \ + Y_STEP_PIN == N || Y_ENABLE_PIN == N || E0_ENABLE_PIN == N || POWER_LOSS_PIN == N \ )) #define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN) #if SERIAL_IN_USE(1) 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 b950d8d1ac83..c182f2febe75 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 @@ -107,3 +107,18 @@ #define E0_SLAVE_ADDRESS 3 #endif #endif + +// Pins for documentation and sanity checks only. +// Changing these will not change the pin they are on. + +// Hardware UART pins +#define UART1_TX_PIN PA9 // default usage LCD connector +#define UART1_RX_PIN PA10 // default usage LCD connector +#define UART2_TX_PIN PA2 // default usage TFT connector +#define UART2_RX_PIN PA3 // default usage TFT connector +#define UART3_TX_PIN PB10 // default usage Y_STEP_PIN +#define UART3_RX_PIN PB11 // default usage Y_ENABLE_PIN +#define UART4_TX_PIN PC10 // default usage TMC UART +#define UART4_RX_PIN PC11 // default usage TMC UART +#define UART5_TX_PIN PC12 // default usage POWER_LOSS_PIN +#define UART5_RX_PIN PD2 // default usage E0_ENABLE_PIN 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 ba1d06f68923..df91933d719b 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 @@ -461,3 +461,14 @@ #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PA8 // LED driving pin #endif + +// Pins for documentation and sanity checks only. +// Changing these will not change the pin they are on. + +// Hardware UART pins +#define UART1_TX_PIN PA9 // default usage LCD connector +#define UART1_RX_PIN PA10 // default usage LCD connector +#define UART2_TX_PIN PA2 // default usage TFT connector +#define UART2_RX_PIN PA3 // default usage TFT connector +#define UART4_TX_PIN PC10 // default usage TMC UART +#define UART4_RX_PIN PC11 // default usage TMC UART From 9e879a5b1f801e7572e7948be38a6dad16ad35d8 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 11 Feb 2024 00:22:45 +0000 Subject: [PATCH 213/236] [cron] Bump distribution date (2024-02-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 88388b4cb98d..ca18332b6ba6 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 "2024-02-10" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 90267532a69f..91e5ac4dbcdc 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 "2024-02-10" + #define STRING_DISTRIBUTION_DATE "2024-02-11" #endif /** From 982b42579243543a8684f571554da0ce3137db96 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 27 Feb 2024 20:45:34 -0600 Subject: [PATCH 214/236] =?UTF-8?q?=F0=9F=94=A5=20Drop=20TMC26X=20support?= =?UTF-8?q?=20(#26770)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 6 +- Marlin/Configuration_adv.h | 9 +- Marlin/src/core/drivers.h | 19 +- Marlin/src/inc/Changes.h | 14 +- Marlin/src/module/stepper/TMC26X.cpp | 180 ------------------ Marlin/src/module/stepper/TMC26X.h | 212 ---------------------- Marlin/src/module/stepper/indirection.cpp | 1 - Marlin/src/module/stepper/indirection.h | 4 - ini/features.ini | 2 - 9 files changed, 22 insertions(+), 425 deletions(-) delete mode 100644 Marlin/src/module/stepper/TMC26X.cpp delete mode 100644 Marlin/src/module/stepper/TMC26X.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b49ae40babb9..a616bd5090ff 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -135,9 +135,9 @@ * Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100, * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, - * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, - * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE - * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + * TMC2660, TMC2660_STANDALONE, TMC5130, TMC5130_STANDALONE, + * TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] */ #define X_DRIVER_TYPE A4988 #define Y_DRIVER_TYPE A4988 diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index df532ae6f310..299c6418f3c1 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2953,15 +2953,12 @@ * Some boards have simple jumper connections! See your board's documentation. * - These drivers can also be used with Hardware Serial. * - * The TMC26XStepper library is required for TMC26X stepper drivers. - * https://github.com/MarlinFirmware/TMC26XStepper - * * The TMCStepper library is required for other TMC stepper drivers. * https://github.com/teemuatlut/TMCStepper * * @section tmc/config */ -#if HAS_TRINAMIC_CONFIG || HAS_TMC26X +#if HAS_TRINAMIC_CONFIG #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -2975,7 +2972,7 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing #define X_MICROSTEPS 16 // 0..256 - #define X_RSENSE 0.11 // Multiplied x1000 for TMC26X + #define X_RSENSE 0.11 #define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ... //#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis //#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis @@ -3468,7 +3465,7 @@ */ #define TMC_ADV() { } -#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X +#endif // HAS_TRINAMIC_CONFIG // @section i2cbus diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index 5bb246ce9e3e..e28fc1bba7af 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -41,8 +41,6 @@ #define _TMC2208_STANDALONE 0x2208B #define _TMC2209 0x2209A #define _TMC2209_STANDALONE 0x2209B -#define _TMC26X 0x2600A -#define _TMC26X_STANDALONE 0x2600B #define _TMC2660 0x2660A #define _TMC2660_STANDALONE 0x2660B #define _TMC5130 0x5130A @@ -107,8 +105,8 @@ #if ( HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2160_STANDALONE) \ || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC2209_STANDALONE) \ - || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \ - || HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE) ) + || HAS_DRIVER(TMC2660_STANDALONE) || HAS_DRIVER(TMC5130_STANDALONE) \ + || HAS_DRIVER(TMC5160_STANDALONE) ) #define HAS_TRINAMIC_STANDALONE 1 #endif @@ -120,22 +118,18 @@ #define HAS_TMC220x 1 #endif -#if HAS_DRIVER(TMC26X) - #define HAS_TMC26X 1 -#endif - #define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE(A,TMC2130) || AXIS_DRIVER_TYPE(A,TMC2160) \ || AXIS_DRIVER_TYPE(A,TMC2208) || AXIS_DRIVER_TYPE(A,TMC2209) \ || AXIS_DRIVER_TYPE(A,TMC2660) \ || AXIS_DRIVER_TYPE(A,TMC5130) || AXIS_DRIVER_TYPE(A,TMC5160) ) -#define AXIS_IS_TMC_CONFIG(A) ( AXIS_IS_TMC(A) || AXIS_DRIVER_TYPE(A,TMC26X) ) +#define AXIS_IS_TMC_CONFIG AXIS_IS_TMC // Test for a driver that uses SPI - this allows checking whether a _CS_ pin // is considered sensitive #define AXIS_HAS_SPI(A) ( AXIS_DRIVER_TYPE(A,TMC2130) || AXIS_DRIVER_TYPE(A,TMC2160) \ - || AXIS_DRIVER_TYPE(A,TMC26X) || AXIS_DRIVER_TYPE(A,TMC2660) \ - || AXIS_DRIVER_TYPE(A,TMC5130) || AXIS_DRIVER_TYPE(A,TMC5160) ) + || AXIS_DRIVER_TYPE(A,TMC2660) || AXIS_DRIVER_TYPE(A,TMC5130) \ + || AXIS_DRIVER_TYPE(A,TMC5160) ) #define AXIS_HAS_UART(A) ( AXIS_DRIVER_TYPE(A,TMC2208) || AXIS_DRIVER_TYPE(A,TMC2209) ) @@ -189,8 +183,7 @@ #define HAS_TMC_SPI 1 #endif #if HAS_STALLGUARD || HAS_DRIVER(TMC2160_STANDALONE) || HAS_DRIVER(TMC2130_STANDALONE) \ - || HAS_DRIVER(TMC2209_STANDALONE) || HAS_DRIVER(TMC26X) \ - || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \ + || HAS_DRIVER(TMC2209_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \ || HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE) #define HAS_DIAG_PINS 1 #endif diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 6156326f6926..dd8acc1ce5c3 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -285,11 +285,11 @@ #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." + #error "HAVE_TMCDRIVER is obsolete." #elif defined(STEALTHCHOP) #error "STEALTHCHOP is now STEALTHCHOP_(XY|Z|E)." #elif defined(HAVE_TMC26X) - #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X." + #error "HAVE_TMC26X is now obsolete." #elif defined(HAVE_TMC2130) #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130." #elif defined(HAVE_TMC2208) @@ -298,10 +298,10 @@ #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." + #error "[AXIS]_IS_TMC is now obsolete." #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." + #error "[AXIS]_IS_TMC26X is now obsolete." #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." @@ -718,6 +718,8 @@ #define _L6474 0x6474 #define _L6480 0x6480 #define _POWERSTEP01 0xF00D +#define _TMC26X 0x2600 +#define _TMC26X_STANDALONE 0x2601 #if HAS_DRIVER(L6470) #error "L6470 stepper drivers are no longer supported in Marlin." #elif HAS_DRIVER(L6474) @@ -726,8 +728,12 @@ #error "L6480 stepper drivers are no longer supported in Marlin." #elif HAS_DRIVER(POWERSTEP01) #error "POWERSTEP01 stepper drivers are no longer supported in Marlin." +#elif HAS_DRIVER(TMC26X) || HAS_DRIVER(TMC26X_STANDALONE) + #error "TMC26X stepper drivers are no longer supported in Marlin." #endif #undef _L6470 #undef _L6474 #undef _L6480 #undef _POWERSTEP01 +#undef _TMC26X +#undef _TMC26X_STANDALONE diff --git a/Marlin/src/module/stepper/TMC26X.cpp b/Marlin/src/module/stepper/TMC26X.cpp deleted file mode 100644 index f46163ea2de2..000000000000 --- a/Marlin/src/module/stepper/TMC26X.cpp +++ /dev/null @@ -1,180 +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 . - * - */ - -/** - * stepper/TMC26X.cpp - * Stepper driver indirection for TMC26X drivers - */ - -#include "../../inc/MarlinConfig.h" - -// -// TMC26X Driver objects and inits -// -#if HAS_TMC26X - -#include "TMC26X.h" - -#define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_CURRENT, int(ST##_RSENSE * 1000)) - -#if AXIS_DRIVER_TYPE_X(TMC26X) - _TMC26X_DEFINE(X); -#endif -#if AXIS_DRIVER_TYPE_X2(TMC26X) - _TMC26X_DEFINE(X2); -#endif -#if AXIS_DRIVER_TYPE_Y(TMC26X) - _TMC26X_DEFINE(Y); -#endif -#if AXIS_DRIVER_TYPE_Y2(TMC26X) - _TMC26X_DEFINE(Y2); -#endif -#if AXIS_DRIVER_TYPE_Z(TMC26X) - _TMC26X_DEFINE(Z); -#endif -#if AXIS_DRIVER_TYPE_Z2(TMC26X) - _TMC26X_DEFINE(Z2); -#endif -#if AXIS_DRIVER_TYPE_Z3(TMC26X) - _TMC26X_DEFINE(Z3); -#endif -#if AXIS_DRIVER_TYPE_Z4(TMC26X) - _TMC26X_DEFINE(Z4); -#endif -#if AXIS_DRIVER_TYPE_I(TMC26X) - _TMC26X_DEFINE(I); -#endif -#if AXIS_DRIVER_TYPE_J(TMC26X) - _TMC26X_DEFINE(J); -#endif -#if AXIS_DRIVER_TYPE_K(TMC26X) - _TMC26X_DEFINE(K); -#endif -#if AXIS_DRIVER_TYPE_U(TMC26X) - _TMC26X_DEFINE(U); -#endif -#if AXIS_DRIVER_TYPE_V(TMC26X) - _TMC26X_DEFINE(V); -#endif -#if AXIS_DRIVER_TYPE_W(TMC26X) - _TMC26X_DEFINE(W); -#endif -#if AXIS_DRIVER_TYPE_E0(TMC26X) - _TMC26X_DEFINE(E0); -#endif -#if AXIS_DRIVER_TYPE_E1(TMC26X) - _TMC26X_DEFINE(E1); -#endif -#if AXIS_DRIVER_TYPE_E2(TMC26X) - _TMC26X_DEFINE(E2); -#endif -#if AXIS_DRIVER_TYPE_E3(TMC26X) - _TMC26X_DEFINE(E3); -#endif -#if AXIS_DRIVER_TYPE_E4(TMC26X) - _TMC26X_DEFINE(E4); -#endif -#if AXIS_DRIVER_TYPE_E5(TMC26X) - _TMC26X_DEFINE(E5); -#endif -#if AXIS_DRIVER_TYPE_E6(TMC26X) - _TMC26X_DEFINE(E6); -#endif -#if AXIS_DRIVER_TYPE_E7(TMC26X) - _TMC26X_DEFINE(E7); -#endif - -#define _TMC26X_INIT(A) do{ \ - stepper##A.setMicrosteps(A##_MICROSTEPS); \ - stepper##A.start(); \ -}while(0) - -void tmc26x_init_to_defaults() { - #if AXIS_DRIVER_TYPE_X(TMC26X) - _TMC26X_INIT(X); - #endif - #if AXIS_DRIVER_TYPE_X2(TMC26X) - _TMC26X_INIT(X2); - #endif - #if AXIS_DRIVER_TYPE_Y(TMC26X) - _TMC26X_INIT(Y); - #endif - #if AXIS_DRIVER_TYPE_Y2(TMC26X) - _TMC26X_INIT(Y2); - #endif - #if AXIS_DRIVER_TYPE_Z(TMC26X) - _TMC26X_INIT(Z); - #endif - #if AXIS_DRIVER_TYPE_Z2(TMC26X) - _TMC26X_INIT(Z2); - #endif - #if AXIS_DRIVER_TYPE_Z3(TMC26X) - _TMC26X_INIT(Z3); - #endif - #if AXIS_DRIVER_TYPE_Z4(TMC26X) - _TMC26X_INIT(Z4); - #endif - #if AXIS_DRIVER_TYPE_I(TMC26X) - _TMC26X_INIT(I); - #endif - #if AXIS_DRIVER_TYPE_J(TMC26X) - _TMC26X_INIT(J); - #endif - #if AXIS_DRIVER_TYPE_K(TMC26X) - _TMC26X_INIT(K); - #endif - #if AXIS_DRIVER_TYPE_U(TMC26X) - _TMC26X_INIT(U); - #endif - #if AXIS_DRIVER_TYPE_V(TMC26X) - _TMC26X_INIT(V); - #endif - #if AXIS_DRIVER_TYPE_W(TMC26X) - _TMC26X_INIT(W); - #endif - #if AXIS_DRIVER_TYPE_E0(TMC26X) - _TMC26X_INIT(E0); - #endif - #if AXIS_DRIVER_TYPE_E1(TMC26X) - _TMC26X_INIT(E1); - #endif - #if AXIS_DRIVER_TYPE_E2(TMC26X) - _TMC26X_INIT(E2); - #endif - #if AXIS_DRIVER_TYPE_E3(TMC26X) - _TMC26X_INIT(E3); - #endif - #if AXIS_DRIVER_TYPE_E4(TMC26X) - _TMC26X_INIT(E4); - #endif - #if AXIS_DRIVER_TYPE_E5(TMC26X) - _TMC26X_INIT(E5); - #endif - #if AXIS_DRIVER_TYPE_E6(TMC26X) - _TMC26X_INIT(E6); - #endif - #if AXIS_DRIVER_TYPE_E7(TMC26X) - _TMC26X_INIT(E7); - #endif -} - -#endif // HAS_TMC26X diff --git a/Marlin/src/module/stepper/TMC26X.h b/Marlin/src/module/stepper/TMC26X.h deleted file mode 100644 index 1fd94b26a8d8..000000000000 --- a/Marlin/src/module/stepper/TMC26X.h +++ /dev/null @@ -1,212 +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 - -/** - * stepper/TMC26X.h - * Stepper driver indirection for TMC26X drivers - */ - -#include "../../inc/MarlinConfig.h" - -// TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI - -#include -#include - -void tmc26x_init_to_defaults(); - -// X Stepper -#if AXIS_DRIVER_TYPE_X(TMC26X) - extern TMC26XStepper stepperX; - #define X_ENABLE_INIT() NOOP - #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) - #define X_ENABLE_READ() stepperX.isEnabled() -#endif - -// Y Stepper -#if AXIS_DRIVER_TYPE_Y(TMC26X) - extern TMC26XStepper stepperY; - #define Y_ENABLE_INIT() NOOP - #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) - #define Y_ENABLE_READ() stepperY.isEnabled() -#endif - -// Z Stepper -#if AXIS_DRIVER_TYPE_Z(TMC26X) - extern TMC26XStepper stepperZ; - #define Z_ENABLE_INIT() NOOP - #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) - #define Z_ENABLE_READ() stepperZ.isEnabled() -#endif - -// X2 Stepper -#if HAS_X2_ENABLE && AXIS_DRIVER_TYPE_X2(TMC26X) - extern TMC26XStepper stepperX2; - #define X2_ENABLE_INIT() NOOP - #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) - #define X2_ENABLE_READ() stepperX2.isEnabled() -#endif - -// Y2 Stepper -#if HAS_Y2_ENABLE && AXIS_DRIVER_TYPE_Y2(TMC26X) - extern TMC26XStepper stepperY2; - #define Y2_ENABLE_INIT() NOOP - #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) - #define Y2_ENABLE_READ() stepperY2.isEnabled() -#endif - -// Z2 Stepper -#if HAS_Z2_ENABLE && AXIS_DRIVER_TYPE_Z2(TMC26X) - extern TMC26XStepper stepperZ2; - #define Z2_ENABLE_INIT() NOOP - #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) - #define Z2_ENABLE_READ() stepperZ2.isEnabled() -#endif - -// Z3 Stepper -#if HAS_Z3_ENABLE && AXIS_DRIVER_TYPE_Z3(TMC26X) - extern TMC26XStepper stepperZ3; - #define Z3_ENABLE_INIT() NOOP - #define Z3_ENABLE_WRITE(STATE) stepperZ3.setEnabled(STATE) - #define Z3_ENABLE_READ() stepperZ3.isEnabled() -#endif - -// Z4 Stepper -#if HAS_Z4_ENABLE && AXIS_DRIVER_TYPE_Z4(TMC26X) - extern TMC26XStepper stepperZ4; - #define Z4_ENABLE_INIT() NOOP - #define Z4_ENABLE_WRITE(STATE) stepperZ4.setEnabled(STATE) - #define Z4_ENABLE_READ() stepperZ4.isEnabled() -#endif - -// I Stepper -#if HAS_I_ENABLE && AXIS_DRIVER_TYPE_I(TMC26X) - extern TMC26XStepper stepperI; - #define I_ENABLE_INIT() NOOP - #define I_ENABLE_WRITE(STATE) stepperI.setEnabled(STATE) - #define I_ENABLE_READ() stepperI.isEnabled() -#endif - -// J Stepper -#if HAS_J_ENABLE && AXIS_DRIVER_TYPE_J(TMC26X) - extern TMC26XStepper stepperJ; - #define J_ENABLE_INIT() NOOP - #define J_ENABLE_WRITE(STATE) stepperJ.setEnabled(STATE) - #define J_ENABLE_READ() stepperJ.isEnabled() -#endif - -// K Stepper -#if HAS_K_ENABLE && AXIS_DRIVER_TYPE_K(TMC26X) - extern TMC26XStepper stepperK; - #define K_ENABLE_INIT() NOOP - #define K_ENABLE_WRITE(STATE) stepperK.setEnabled(STATE) - #define K_ENABLE_READ() stepperK.isEnabled() -#endif - -// U Stepper -#if HAS_U_ENABLE && AXIS_DRIVER_TYPE_U(TMC26X) - extern TMC26XStepper stepperU; - #define U_ENABLE_INIT() NOOP - #define U_ENABLE_WRITE(STATE) stepperU.setEnabled(STATE) - #define U_ENABLE_READ() stepperU.isEnabled() -#endif - -// V Stepper -#if HAS_V_ENABLE && AXIS_DRIVER_TYPE_V(TMC26X) - extern TMC26XStepper stepperV; - #define V_ENABLE_INIT() NOOP - #define V_ENABLE_WRITE(STATE) stepperV.setEnabled(STATE) - #define V_ENABLE_READ() stepperV.isEnabled() -#endif - -// W Stepper -#if HAS_W_ENABLE && AXIS_DRIVER_TYPE_W(TMC26X) - extern TMC26XStepper stepperW; - #define W_ENABLE_INIT() NOOP - #define W_ENABLE_WRITE(STATE) stepperW.setEnabled(STATE) - #define W_ENABLE_READ() stepperW.isEnabled() -#endif - -// E0 Stepper -#if AXIS_DRIVER_TYPE_E0(TMC26X) - extern TMC26XStepper stepperE0; - #define E0_ENABLE_INIT() NOOP - #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) - #define E0_ENABLE_READ() stepperE0.isEnabled() -#endif - -// E1 Stepper -#if AXIS_DRIVER_TYPE_E1(TMC26X) - extern TMC26XStepper stepperE1; - #define E1_ENABLE_INIT() NOOP - #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) - #define E1_ENABLE_READ() stepperE1.isEnabled() -#endif - -// E2 Stepper -#if AXIS_DRIVER_TYPE_E2(TMC26X) - extern TMC26XStepper stepperE2; - #define E2_ENABLE_INIT() NOOP - #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) - #define E2_ENABLE_READ() stepperE2.isEnabled() -#endif - -// E3 Stepper -#if AXIS_DRIVER_TYPE_E3(TMC26X) - extern TMC26XStepper stepperE3; - #define E3_ENABLE_INIT() NOOP - #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) - #define E3_ENABLE_READ() stepperE3.isEnabled() -#endif - -// E4 Stepper -#if AXIS_DRIVER_TYPE_E4(TMC26X) - extern TMC26XStepper stepperE4; - #define E4_ENABLE_INIT() NOOP - #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) - #define E4_ENABLE_READ() stepperE4.isEnabled() -#endif - -// E5 Stepper -#if AXIS_DRIVER_TYPE_E5(TMC26X) - extern TMC26XStepper stepperE5; - #define E5_ENABLE_INIT() NOOP - #define E5_ENABLE_WRITE(STATE) stepperE5.setEnabled(STATE) - #define E5_ENABLE_READ() stepperE5.isEnabled() -#endif - -// E6 Stepper -#if AXIS_DRIVER_TYPE_E6(TMC26X) - extern TMC26XStepper stepperE6; - #define E6_ENABLE_INIT() NOOP - #define E6_ENABLE_WRITE(STATE) stepperE6.setEnabled(STATE) - #define E6_ENABLE_READ() stepperE6.isEnabled() -#endif - -// E7 Stepper -#if AXIS_DRIVER_TYPE_E7(TMC26X) - extern TMC26XStepper stepperE7; - #define E7_ENABLE_INIT() NOOP - #define E7_ENABLE_WRITE(STATE) stepperE7.setEnabled(STATE) - #define E7_ENABLE_READ() stepperE7.isEnabled() -#endif diff --git a/Marlin/src/module/stepper/indirection.cpp b/Marlin/src/module/stepper/indirection.cpp index 0290d8135d9b..fec77c12377d 100644 --- a/Marlin/src/module/stepper/indirection.cpp +++ b/Marlin/src/module/stepper/indirection.cpp @@ -37,7 +37,6 @@ void restore_stepper_drivers() { } void reset_stepper_drivers() { - TERN_(HAS_TMC26X, tmc26x_init_to_defaults()); TERN_(HAS_TRINAMIC_CONFIG, reset_trinamic_drivers()); } diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h index e82ab66e00d0..1ffeb8b907aa 100644 --- a/Marlin/src/module/stepper/indirection.h +++ b/Marlin/src/module/stepper/indirection.h @@ -69,10 +69,6 @@ */ #include "../../inc/MarlinConfig.h" -#if HAS_TMC26X - #include "TMC26X.h" -#endif - #if HAS_TRINAMIC_CONFIG #include "trinamic.h" #endif diff --git a/ini/features.ini b/ini/features.ini index 6a808390be3f..1100216867bb 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -28,8 +28,6 @@ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub HAS_MOTOR_CURRENT_(I2C|DAC|SPI|PWM) = build_src_filter=+ HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster build_src_filter=+ -HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/0.1.2.zip - build_src_filter=+ LIB_INTERNAL_MAX31865 = build_src_filter=+ NEOPIXEL_LED = adafruit/Adafruit NeoPixel@~1.8.0 build_src_filter=+ From d609bb4671155398ffc16f4ad42a105f60abac28 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 28 Feb 2024 06:06:10 +0000 Subject: [PATCH 215/236] [cron] Bump distribution date (2024-02-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 ca18332b6ba6..e3dc44bc9d06 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 "2024-02-11" +//#define STRING_DISTRIBUTION_DATE "2024-02-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 91e5ac4dbcdc..75ed6a0fe5b3 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 "2024-02-11" + #define STRING_DISTRIBUTION_DATE "2024-02-28" #endif /** From c8d51c27234bcb2b1419d238e8751593d855dadb Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Sat, 2 Mar 2024 04:16:39 +0100 Subject: [PATCH 216/236] =?UTF-8?q?=F0=9F=9A=B8=20Enable=20G92.9=20with=20?= =?UTF-8?q?rotational=20axes=20(#26174)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Supporting axes that can rotate forever. --- Marlin/src/gcode/geometry/G92.cpp | 4 ++-- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/lcd/marlinui.cpp | 12 ++++++++++-- Marlin/src/lcd/menu/menu_motion.cpp | 4 ++-- Marlin/src/module/motion.cpp | 7 +++++-- Marlin/src/module/planner.cpp | 14 +++++++++----- 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/Marlin/src/gcode/geometry/G92.cpp b/Marlin/src/gcode/geometry/G92.cpp index 626441f4e25c..cfdff51eba14 100644 --- a/Marlin/src/gcode/geometry/G92.cpp +++ b/Marlin/src/gcode/geometry/G92.cpp @@ -42,7 +42,7 @@ * G92 : Modify Workspace Offsets so the reported position shows the given X [Y [Z [A [B [C [U [V [W ]]]]]]]] [E]. * G92.1 : Zero XYZ Workspace Offsets (so the reported position = the native position). * - * With POWER_LOSS_RECOVERY: + * With POWER_LOSS_RECOVERY or with AXISn_ROTATES: * G92.9 : Set NATIVE Current Position to the given X [Y [Z [A [B [C [U [V [W ]]]]]]]] [E]. */ void GcodeSuite::G92() { @@ -67,7 +67,7 @@ void GcodeSuite::G92() { break; #endif - #if ENABLED(POWER_LOSS_RECOVERY) + #if ANY(POWER_LOSS_RECOVERY, HAS_ROTATIONAL_AXES) case 9: // G92.9 - Set Current Position directly (like Marlin 1.0) LOOP_LOGICAL_AXES(i) { if (parser.seenval(AXIS_CHAR(i))) { diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c64bde0bc04c..2683312976b2 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3279,7 +3279,7 @@ #endif // Add commands that need sub-codes to this list -#if ANY(G38_PROBE_TARGET, CNC_COORDINATE_SYSTEMS, POWER_LOSS_RECOVERY) +#if ANY(G38_PROBE_TARGET, CNC_COORDINATE_SYSTEMS, POWER_LOSS_RECOVERY, HAS_ROTATIONAL_AXES) #define USE_GCODE_SUBCODES 1 #endif diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index f66b680bc1c8..99a5996a2dfe 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -23,6 +23,7 @@ #include "../inc/MarlinConfig.h" #include "../MarlinCore.h" // for printingIsPaused +#include "../gcode/parser.h" // for axis_is_rotational, using_inch_units #if LED_POWEROFF_TIMEOUT > 0 || ALL(HAS_WIRED_LCD, PRINTER_EVENT_LEDS) || (HAS_BACKLIGHT_TIMEOUT && defined(NEOPIXEL_BKGD_INDEX_FIRST)) #include "../feature/leds/leds.h" @@ -824,6 +825,13 @@ void MarlinUI::init() { const feedRate_t fr_mm_s = (axis < LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + /** + * For a rotational axis apply the "inch" to "mm" conversion factor. This mimics behaviour of the G-code G1 + * (see get_destination_from_command). For moves involving only rotational axes, the planner will convert + * back to the feedrate in degrees-per-time unit. + */ + const feedRate_t fr = parser.axis_is_rotational(axis) && parser.using_inch_units() ? IN_TO_MM(fr_mm_s) : fr_mm_s; + #if IS_KINEMATIC #if HAS_MULTI_EXTRUDER @@ -850,13 +858,13 @@ void MarlinUI::init() { // previous invocation is being blocked. Modifications to offset shouldn't be made while // processing is true or the planner will get out of sync. processing = true; - prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination + prepare_internal_move_to_destination(fr); // will set current_position from destination processing = false; #else // For Cartesian / Core motion simply move to the current_position - planner.buffer_line(current_position, fr_mm_s, + planner.buffer_line(current_position, fr, TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder ); diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 239d03d9777a..ebc809fef8f5 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -78,8 +78,8 @@ void lcd_move_axis(const AxisEnum axis) { if (ui.should_draw()) { MenuEditItemBase::itemIndex = axis; const float pos = ui.manual_move.axis_value(axis); - if (parser.using_inch_units()) { - const float imp_pos = LINEAR_UNIT(pos); + if (parser.using_inch_units() && !parser.axis_is_rotational(axis)) { + const float imp_pos = parser.per_axis_value(axis, pos); MenuEditItemBase::draw_edit_screen(GET_TEXT_F(MSG_MOVE_N), ftostr63(imp_pos)); } else diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index c6b093644755..862f0c575433 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1153,10 +1153,13 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool #if HAS_ROTATIONAL_AXES if (UNEAR_ZERO(distance_sqr)) { - // Move involves only rotational axes. Calculate angular distance in accordance with LinuxCNC - is_cartesian_move = false; + // Move involves no linear axes. Calculate angular distance in accordance with LinuxCNC distance_sqr = ROTATIONAL_AXIS_GANG(sq(diff.i), + sq(diff.j), + sq(diff.k), + sq(diff.u), + sq(diff.v), + sq(diff.w)); } + if (!UNEAR_ZERO(distance_sqr)) { + // Move involves rotational axes, not just the extruder + is_cartesian_move = false; + } #endif #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 0ace6e32ced8..8f7c4ceb72c7 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2079,11 +2079,11 @@ bool Planner::_populate_block( /** * This part of the code calculates the total length of the movement. - * For cartesian bots, the X_AXIS is the real X movement and same for Y_AXIS. - * But for corexy bots, that is not true. The "X_AXIS" and "Y_AXIS" motors (that should be named to A_AXIS - * and B_AXIS) cannot be used for X and Y length, because A=X+Y and B=X-Y. - * So we need to create other 2 "AXIS", named X_HEAD and Y_HEAD, meaning the real displacement of the Head. - * Having the real displacement of the head, we can calculate the total movement length and apply the desired speed. + * For cartesian bots, the distance along the X axis equals the X_AXIS joint displacement and same holds true for Y_AXIS. + * But for geometries like CORE_XY that is not true. For these machines we need to create 2 additional variables, named X_HEAD and Y_HEAD, to store the displacent of the head along the X and Y axes in a cartesian coordinate system. + * The displacement of the head along the axes of the cartesian coordinate system has to be calculated from "X_AXIS" and "Y_AXIS" (should be renamed to A_JOINT and B_JOINT) + * displacements in joints space using forward kinematics (A=X+Y and B=X-Y in the case of CORE_XY). + * Next we can calculate the total movement length and apply the desired speed. */ struct DistanceMM : abce_float_t { #if ANY(IS_CORE, MARKFORGED_XY, MARKFORGED_YX) @@ -2308,6 +2308,10 @@ bool Planner::_populate_block( // Example 2: At 120°/s a 60° move involving only rotational axes takes 0.5s. So this will give 2.0. float inverse_secs = inverse_millimeters * ( #if ALL(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) + /** + * Workaround for premature feedrate conversion + * from in/s to mm/s by get_distance_from_command. + */ cartesian_move ? fr_mm_s : LINEAR_UNIT(fr_mm_s) #else fr_mm_s From ecde3a315891d141a7573aa78fe817ff12fcfa1c Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 2 Mar 2024 16:58:56 +1300 Subject: [PATCH 217/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20AVR=20bootscreen?= =?UTF-8?q?=20RLE=20decode=20(#26827)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index cfff78ad40fe..a96d8e300287 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -140,7 +140,7 @@ bool MarlinUI::detected() { return true; } uint8_t *dst = (uint8_t*)bmp; auto rle_nybble = [&](const uint16_t i) -> uint8_t { - const uint8_t b = bmp_rle[i / 2]; + const uint8_t b = pgm_read_byte(&bmp_rle[i / 2]); return (i & 1 ? b & 0xF : b >> 4); }; From a9e72b2a2c6f37449ba8229f3afe16dab837cb75 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:09:12 -0800 Subject: [PATCH 218/236] =?UTF-8?q?=F0=9F=94=A7=20Simpler=20CREALITY=5FV42?= =?UTF-8?q?2=20warning=20(#26826)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index f889ce38e05c..3a2153916f20 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -682,7 +682,8 @@ #endif #if ENABLED(EMIT_CREALITY_422_WARNING) && DISABLED(NO_CREALITY_422_DRIVER_WARNING) - #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.)" + // Driver labels: A=TMC2208, B=TMC2209, C=HR4988, E=A4988, H=TMC2225, H8=HR4988 + #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! (A/H: TMC2208_STANDALONE B: TMC2209_STANDALONE C/E/H8: A4988). (Define NO_CREALITY_422_DRIVER_WARNING to suppress this warning.)" #endif #if ENABLED(PRINTCOUNTER_SYNC) From 3fd175af8ea56db48ea41d7f3d55e967f0df8cd8 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:31:42 +1300 Subject: [PATCH 219/236] =?UTF-8?q?=F0=9F=9A=B8=20M115=20"KINEMATICS:?= =?UTF-8?q?=E2=80=A6"=20(#26806)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/host/M115.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index b2f3496a6807..0d38d3147bea 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -63,11 +63,25 @@ */ void GcodeSuite::M115() { + // Hosts should match one of these + #define MACHINE_KINEMATICS "" \ + TERN_(COREXY, "COREXY") TERN_(COREYX, "COREYX") \ + TERN_(COREXZ, "COREXZ") TERN_(COREZX, "COREZX") \ + TERN_(COREYZ, "COREYZ") TERN_(COREZY, "COREZY") \ + TERN_(MARKFORGED_XY, "MARKFORGED_XY") TERN_(MARKFORGED_YX, "MARKFORGED_YX") \ + TERN_(POLARGRAPH, "POLARGRAPH") \ + TERN_(POLAR, "POLAR") \ + TERN_(DELTA, "DELTA") \ + TERN_(IS_SCARA, "SCARA") \ + TERN_(IS_CARTESIAN, "Cartesian") \ + TERN_(BELTPRINTER, " BELTPRINTER") + SERIAL_ECHOPGM("FIRMWARE_NAME:Marlin" " " DETAILED_BUILD_VERSION " (" __DATE__ " " __TIME__ ")" " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME + " KINEMATICS:" MACHINE_KINEMATICS " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) #if NUM_AXES != XYZ " AXIS_COUNT:" STRINGIFY(NUM_AXES) From b9cfbaa8d4441dc095c8530a1fa2924d921b64fb Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:34:12 -0800 Subject: [PATCH 220/236] =?UTF-8?q?=E2=9C=85=20Update=20Actions=20versions?= =?UTF-8?q?=20(#26814)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/lock.yml | 40 ------------------------------ .github/workflows/bump-date.yml | 4 +-- .github/workflows/clean-closed.yml | 2 +- .github/workflows/close-stale.yml | 2 +- .github/workflows/lock-closed.yml | 12 ++++----- .github/workflows/test-builds.yml | 6 ++--- 6 files changed, 13 insertions(+), 53 deletions(-) delete mode 100644 .github/lock.yml diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index c5ceff66b0a7..000000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,40 +0,0 @@ -# -# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app -# - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 60 - -# Skip issues and pull requests created before a given timestamp. Timestamp must -# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable -skipCreatedBefore: false - -# Issues and pull requests with these labels will be ignored. Set to `[]` to disable -exemptLabels: [ 'no-locking' ] - -# Label to add before locking, such as `outdated`. Set to `false` to disable -lockLabel: false - -# Comment to post before locking. Set to `false` to disable -lockComment: > - This thread has been automatically locked since there has not been - any recent activity after it was closed. Please open a new issue for - related bugs. - -# Assign `resolved` as the reason for locking. Set to `false` to disable -setLockReason: true - -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings just for `issues` or `pulls` -# issues: -# exemptLabels: -# - help-wanted -# lockLabel: outdated - -# pulls: -# daysUntilLock: 30 - -# Repository to extend settings from -# _extends: repo diff --git a/.github/workflows/bump-date.yml b/.github/workflows/bump-date.yml index a08eeea561d7..2d3fd1f33dee 100644 --- a/.github/workflows/bump-date.yml +++ b/.github/workflows/bump-date.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Check out bugfix-2.0.x - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: bugfix-2.0.x @@ -39,7 +39,7 @@ jobs: exit 0 - name: Check out bugfix-2.1.x - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: bugfix-2.1.x diff --git a/.github/workflows/clean-closed.yml b/.github/workflows/clean-closed.yml index 318d083dfae3..3f370a4362d1 100644 --- a/.github/workflows/clean-closed.yml +++ b/.github/workflows/clean-closed.yml @@ -32,7 +32,7 @@ jobs: - "Needs: Work" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Remove Labels uses: actions-ecosystem/action-remove-labels@v1 with: diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml index 397f9b5ea6c2..55e19de5669a 100644 --- a/.github/workflows/close-stale.yml +++ b/.github/workflows/close-stale.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: | diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml index 8cdcd7a8369e..6392f244b593 100644 --- a/.github/workflows/lock-closed.yml +++ b/.github/workflows/lock-closed.yml @@ -17,15 +17,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v2 + - uses: dessant/lock-threads@v5 with: github-token: ${{ github.token }} process-only: 'issues' - issue-lock-inactive-days: '60' - issue-exclude-created-before: '' - issue-exclude-labels: 'no-locking' - issue-lock-labels: '' - issue-lock-comment: > + issue-inactive-days: '60' + exclude-issue-created-before: '' + exclude-any-issue-labels: 'no-locking' + add-issue-labels: '' + issue-comment: > This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 7c62b5af6c54..a3cf32739c92 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -152,7 +152,7 @@ jobs: uses: actions/checkout@v4 - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} @@ -160,13 +160,13 @@ jobs: ${{ runner.os }}-pip- - name: Cache PlatformIO - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.platformio key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} - name: Select Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' architecture: 'x64' From e6cda9932b8c711259b3ca79923b2aadd4e8421f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 2 Mar 2024 06:06:49 +0000 Subject: [PATCH 221/236] [cron] Bump distribution date (2024-03-02) --- 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 e3dc44bc9d06..326f539dcb10 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 "2024-02-28" +//#define STRING_DISTRIBUTION_DATE "2024-03-02" /** * 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 75ed6a0fe5b3..f1c0b41c2a59 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 "2024-02-28" + #define STRING_DISTRIBUTION_DATE "2024-03-02" #endif /** From ec6f9dd5c8443f9633ae5ea9bce7e5f090d5c72b Mon Sep 17 00:00:00 2001 From: fredycpu Date: Sun, 3 Mar 2024 19:39:50 +0100 Subject: [PATCH 222/236] =?UTF-8?q?=F0=9F=94=A7=20MKS=5FROBIN=5FPRO=20:=20?= =?UTF-8?q?I2C=20EEPROM=20+=20MKS=20Wifi=20(#26823)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/inc/Changes.h | 2 ++ Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 12 ++++++++--- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 4 +++- Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp | 14 +++++++------ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 4 ++++ .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 4 ++++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 19 ++++++++++++++++++ .../src/pins/stm32f4/pins_MKS_MONSTER8_V2.h | 2 +- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 3 --- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 20 ++++++++++--------- 10 files changed, 61 insertions(+), 23 deletions(-) diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index dd8acc1ce5c3..101963893189 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -691,6 +691,8 @@ #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13." #elif defined(Z_PROBE_END_SCRIPT) #error "Z_PROBE_END_SCRIPT is now EVENT_GCODE_AFTER_G29." +#elif defined(WIFI_SERIAL) + #error "WIFI_SERIAL is now WIFI_SERIAL_PORT." #endif // Changes to Probe Temp Compensation (#17392) diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index eb9cac641ad8..f06ffcd89d7b 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -99,7 +99,9 @@ #define ESTATE(S) (READ(S##_PIN) == S##_ENDSTOP_HIT_STATE) void test_gpio_readlevel_L() { - WRITE(WIFI_IO0_PIN, HIGH); + #if PIN_EXISTS(WIFI_IO0) + WRITE(WIFI_IO0_PIN, HIGH); + #endif delay(10); pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == LOW); pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == LOW); @@ -132,7 +134,9 @@ } void test_gpio_readlevel_H() { - WRITE(WIFI_IO0_PIN, LOW); + #if PIN_EXISTS(WIFI_IO0) + WRITE(WIFI_IO0_PIN, LOW); + #endif delay(10); pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == HIGH); pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == HIGH); @@ -169,7 +173,9 @@ void init_test_gpio() { endstops.init(); - SET_OUTPUT(WIFI_IO0_PIN); + #if PIN_EXISTS(WIFI_IO0) + SET_OUTPUT(WIFI_IO0_PIN); + #endif #if PIN_EXISTS(MT_DET_1) SET_INPUT_PULLUP(MT_DET_1_PIN); diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index 122712e9e114..46ba86023918 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -1920,7 +1920,9 @@ void mks_esp_wifi_init() { SET_OUTPUT(WIFI_RESET_PIN); WIFI_SET(); SET_OUTPUT(WIFI_IO1_PIN); - SET_INPUT_PULLUP(WIFI_IO0_PIN); + #if PIN_EXISTS(WIFI_IO0) + SET_INPUT_PULLUP(WIFI_IO0_PIN); + #endif WIFI_IO1_SET(); esp_state = TRANSFER_IDLE; diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp index 2d4d19e7a23e..3ce8bb42ec9a 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp @@ -650,12 +650,14 @@ void resetWiFiForUpload(int begin_or_end) { //#if 0 uint32_t start = getWifiTick(); - if (begin_or_end == 0) { - SET_OUTPUT(WIFI_IO0_PIN); - WRITE(WIFI_IO0_PIN, LOW); - } - else - SET_INPUT_PULLUP(WIFI_IO0_PIN); + #if PIN_EXISTS(WIFI_IO0) + if (begin_or_end == 0) { + SET_OUTPUT(WIFI_IO0_PIN); + WRITE(WIFI_IO0_PIN, LOW); + } + else + SET_INPUT_PULLUP(WIFI_IO0_PIN); + #endif WIFI_RESET(); while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index b8ff3262c8f9..ae4ee3268eb7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -201,10 +201,14 @@ #define WIFI_IO1_PIN PC7 #define WIFI_RESET_PIN PE9 + // + // MKS Testing for code in lcd/extui/mks_ui + // #if ENABLED(MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET #define MKS_TEST_PS_ON_PIN PB0 // PW_OFF #endif + #else //#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PB2 // PW_OFF 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 0738afd80ee8..ea82c13fba88 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -228,10 +228,14 @@ #define WIFI_IO1_PIN PC7 #define WIFI_RESET_PIN PE9 + // + // MKS Testing for code in lcd/extui/mks_ui + // #if ENABLED(MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF #endif + #else //#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PB2 // PW_OFF diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 545b73cf021c..d5689c1e71da 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -41,6 +41,15 @@ // #define DISABLE_DEBUG +// +// Onboard I2C EEPROM +// +#define IIC_BL24CXX_EEPROM // Use I2C EEPROM onboard IC (AT24C04C, Size 4K, PageSize 16B) +#define MARLIN_EEPROM_SIZE 0x1000 // 4K +#define IIC_EEPROM_SDA PB7 +#define IIC_EEPROM_SCL PB6 +#define EEPROM_DEVICE_ADDRESS 0xA0 + // // SPI // @@ -403,3 +412,13 @@ #define SPI_FLASH_MISO_PIN PB14 #define SPI_FLASH_MOSI_PIN PB15 #endif + +// +// MKS WIFI pins +// +#if ENABLED(MKS_WIFI_MODULE) + #define WIFI_RESET_PIN PA5 + #define WIFI_SERIAL_PORT 1 // USART1 + #define WIFI_IO1_PIN PC7 + #define WIFI_IO0_PIN -1 // N.C. +#endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h index c5c79311e30e..12d3947b9934 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h @@ -51,7 +51,7 @@ // // MKS WIFI MODULE // -//#define WIFI_SERIAL 1// USART1 +//#define WIFI_SERIAL_PORT 1 // USART1 #if ENABLED(MKS_WIFI_MODULE) #define WIFI_IO0_PIN PB14 // MKS ESP WIFI IO0 PIN #define WIFI_IO1_PIN PB15 // MKS ESP WIFI IO1 PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 49650299276a..e96a6793603b 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -217,9 +217,6 @@ #define KILL_PIN_STATE HIGH #endif -// Random Info -#define USB_SERIAL -1 // USB Serial - /** * ------ ------ * (BEEPER) PB2 | 1 2 | PE10 (BTN_ENC) (SPI1 MISO) PA6 | 1 2 | PA5 (SPI1 SCK) 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 0b3673046797..050c8f242462 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 @@ -195,25 +195,27 @@ #define KILL_PIN_STATE HIGH #endif -// Random Info -#define USB_SERIAL -1 // USB Serial -#define WIFI_SERIAL 3 // USART3 -#define MKS_WIFI_MODULE_SERIAL 1 // USART1 -#define MKS_WIFI_MODULE_SPI 2 // SPI2 - #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif -// MKS WIFI MODULE +// +// MKS WiFi Module +// #if ENABLED(MKS_WIFI_MODULE) #define WIFI_IO0_PIN PC13 #define WIFI_IO1_PIN PC7 #define WIFI_RESET_PIN PE9 + #define MKS_WIFI_MODULE_SERIAL 1 // USART1 + #define MKS_WIFI_MODULE_SPI 2 // SPI2 +#else + #define WIFI_SERIAL_PORT 3 // USART3 #endif -// MKS TEST -#if ENABLED(MKS_TEST) +// +// MKS Testing for code in lcd/extui/mks_ui +// +#if ALL(TFT_LVGL_UI, MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF #endif From 4f2b7271bddc1d691af34ceeb033d4ba424c99ec Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 4 Mar 2024 00:21:13 +0000 Subject: [PATCH 223/236] [cron] Bump distribution date (2024-03-04) --- 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 326f539dcb10..39459850b094 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 "2024-03-02" +//#define STRING_DISTRIBUTION_DATE "2024-03-04" /** * 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 f1c0b41c2a59..1a43014544c1 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 "2024-03-02" + #define STRING_DISTRIBUTION_DATE "2024-03-04" #endif /** From 504219817cc4967acf14d6770fc2336e287cb9c1 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat, 9 Mar 2024 22:22:23 -0500 Subject: [PATCH 224/236] =?UTF-8?q?=E2=9C=A8=20Redundant=20PSU=20Control?= =?UTF-8?q?=20with=20EDM=20(#26751)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 15 ++++++++++++--- Marlin/src/MarlinCore.cpp | 6 ++++++ Marlin/src/feature/power.cpp | 15 +++++++++++++++ Marlin/src/feature/power.h | 9 ++++++++- Marlin/src/inc/SanityCheck.h | 2 ++ Marlin/src/lcd/language/language_en.h | 1 + Marlin/src/pins/pinsDebug_list.h | 3 +++ Marlin/src/pins/pins_postprocess.h | 4 ++++ 8 files changed, 51 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index a616bd5090ff..49015aeec56a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -401,9 +401,18 @@ //#define PS_OFF_SOUND // Beep 1s when power off #define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box - //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 - //#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power - //#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay + //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 + //#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power + //#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay + + //#define PSU_OFF_REDUNDANT // Second pin for redundant power control + //#define PSU_OFF_REDUNDANT_INVERTED // Redundant pin state is the inverse of PSU_ACTIVE_STATE + + //#define PS_ON1_PIN 6 // Redundant pin required to enable power in combination with PS_ON_PIN + + //#define PS_ON_EDM_PIN 8 // External Device Monitoring pins for external power control relay feedback. Fault on mismatch. + //#define PS_ON1_EDM_PIN 9 + #define PS_EDM_RESPONSE 250 // (ms) Time to allow for relay action //#define POWER_OFF_TIMER // Enable M81 D to power off after a delay //#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 53a74871efbb..8a2561f02d22 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -671,6 +671,12 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { TERN_(HOTEND_IDLE_TIMEOUT, hotend_idle.check()); + #if ANY(PSU_CONTROL, AUTO_POWER_CONTROL) && PIN_EXISTS(PS_ON_EDM) + if ( ELAPSED(ms, powerManager.last_state_change_ms + PS_EDM_RESPONSE) + && (READ(PS_ON_PIN) != READ(PS_ON_EDM_PIN) || TERN0(PSU_OFF_REDUNDANT, extDigitalRead(PS_ON1_PIN) != extDigitalRead(PS_ON1_EDM_PIN))) + ) kill(GET_TEXT_F(MSG_POWER_EDM_FAULT)); + #endif + #if ENABLED(EXTRUDER_RUNOUT_PREVENT) if (thermalManager.degHotend(active_extruder) > (EXTRUDER_RUNOUT_MINTEMP) && ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS)) diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index a9655029fbeb..1531d04a7f07 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -60,6 +60,10 @@ bool Power::psu_on; millis_t Power::lastPowerOn; #endif +#if PSU_TRACK_STATE_MS + millis_t Power::last_state_change_ms = 0; +#endif + /** * Initialize pins & state for the power manager. * @@ -87,8 +91,14 @@ void Power::power_on() { #endif OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE); + #if ENABLED(PSU_OFF_REDUNDANT) + OUT_WRITE(PS_ON1_PIN, TERN_(PSU_OFF_REDUNDANT_INVERTED, !)PSU_ACTIVE_STATE); + #endif + TERN_(PSU_TRACK_STATE_MS, last_state_change_ms = millis()); + psu_on = true; safe_delay(PSU_POWERUP_DELAY); + restore_stepper_drivers(); TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); @@ -117,6 +127,11 @@ void Power::power_off() { #endif OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); + #if ENABLED(PSU_OFF_REDUNDANT) + OUT_WRITE(PS_ON1_PIN, IF_DISABLED(PSU_OFF_REDUNDANT_INVERTED, !)PSU_ACTIVE_STATE); + #endif + TERN_(PSU_TRACK_STATE_MS, last_state_change_ms = millis()); + psu_on = false; #if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) diff --git a/Marlin/src/feature/power.h b/Marlin/src/feature/power.h index fdbb7126ceae..16f9dbcef54f 100644 --- a/Marlin/src/feature/power.h +++ b/Marlin/src/feature/power.h @@ -24,8 +24,11 @@ /** * power.h - power control */ +#if PIN_EXISTS(PS_ON_EDM) || (PIN_EXISTS(PS_ON1_EDM) && ENABLED(PSU_OFF_REDUNDANT)) + #define PSU_TRACK_STATE_MS 1 +#endif -#if ANY(AUTO_POWER_CONTROL, POWER_OFF_TIMER) +#if ANY(AUTO_POWER_CONTROL, POWER_OFF_TIMER, PSU_TRACK_STATE_MS) #include "../core/millis_t.h" #endif @@ -37,6 +40,10 @@ class Power { static void power_on(); static void power_off(); + #if PSU_TRACK_STATE_MS + static millis_t last_state_change_ms; + #endif + #if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) #if ENABLED(POWER_OFF_TIMER) static millis_t power_off_time; diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c70ac494328f..c676c0aaa815 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3740,6 +3740,8 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive." #error "POWER_OFF_DELAY must be a positive value." #elif ENABLED(POWER_OFF_WAIT_FOR_COOLDOWN) && !(defined(AUTO_POWER_E_TEMP) || defined(AUTO_POWER_CHAMBER_TEMP) || defined(AUTO_POWER_COOLER_TEMP)) #error "POWER_OFF_WAIT_FOR_COOLDOWN requires AUTO_POWER_E_TEMP, AUTO_POWER_CHAMBER_TEMP, and/or AUTO_POWER_COOLER_TEMP." + #elif ENABLED(PSU_OFF_REDUNDANT) && !PIN_EXISTS(PS_ON1) + #error "PSU_OFF_REDUNDANT requires PS_ON1_PIN." #endif #endif diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 553d9013a243..82fd637aa124 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -155,6 +155,7 @@ namespace LanguageNarrow_en { LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindle Reverse"); LSTR MSG_SWITCH_PS_ON = _UxGT("Switch Power On"); LSTR MSG_SWITCH_PS_OFF = _UxGT("Switch Power Off"); + LSTR MSG_POWER_EDM_FAULT = _UxGT("Power EDM Fault"); LSTR MSG_EXTRUDE = _UxGT("Extrude"); LSTR MSG_RETRACT = _UxGT("Retract"); LSTR MSG_MOVE_AXIS = _UxGT("Move Axis"); diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index fa6cbf49b945..58f42598a06f 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -901,6 +901,9 @@ #if PIN_EXISTS(PS_ON) REPORT_NAME_DIGITAL(__LINE__, PS_ON_PIN) #endif +#if PIN_EXISTS(PS_ON1) + REPORT_NAME_DIGITAL(__LINE__, PS_ON1_PIN) +#endif // // LCD diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 411faa4ddf2e..e6fdac2155d1 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -477,6 +477,10 @@ #undef PS_ON_PIN #define PS_ON_PIN -1 #endif +#if DISABLED(PSU_OFF_REDUNDANT) || !defined(PS_ON1_PIN) + #undef PS_ON1_PIN + #define PS_ON1_PIN -1 +#endif #ifndef KILL_PIN #define KILL_PIN -1 #endif From 9a1c993719b30dabfb2ab62101ba249dffa459c7 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 10 Mar 2024 06:05:40 +0000 Subject: [PATCH 225/236] [cron] Bump distribution date (2024-03-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 39459850b094..1b783cc7bc61 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 "2024-03-04" +//#define STRING_DISTRIBUTION_DATE "2024-03-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 1a43014544c1..d544d915cb72 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 "2024-03-04" + #define STRING_DISTRIBUTION_DATE "2024-03-10" #endif /** From bca40e07e312419d9defbf963bf0f7a330528c59 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 16 Mar 2024 11:34:02 -0700 Subject: [PATCH 226/236] =?UTF-8?q?=F0=9F=93=9D=20Remove=20Flattr=20Link?= =?UTF-8?q?=20(#26796)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ac496aac21cd..83614ad9ccef 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,6 @@ Regular users can open and close their own issues, but only the administrators c 🇳🇱  **Erik van der Zalm**       [@ErikZalm](https://github.com/ErikZalm) -       [  Donate 💸  ](https://flattr.com/submit/auto?user_id=ErikZalm&url=https://github.com/MarlinFirmware/Marlin&title=Marlin&language=&tags=github&category=software) From d36b3fbf9d244edca1c974e38a6e9c3b4790eef5 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 17 Mar 2024 07:37:42 +1300 Subject: [PATCH 227/236] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fix?= =?UTF-8?q?=20RLE=20script=20for=20infille=20=3D=3D=20outfile=20(#26795)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/scripts/rle_compress_bitmap.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/buildroot/share/scripts/rle_compress_bitmap.py b/buildroot/share/scripts/rle_compress_bitmap.py index c3f673c61699..12d25a7e4a36 100755 --- a/buildroot/share/scripts/rle_compress_bitmap.py +++ b/buildroot/share/scripts/rle_compress_bitmap.py @@ -10,6 +10,8 @@ import re def addCompressedData(input_file, output_file): + input_lines = input_file.readlines() + input_file.close() ofile = open(output_file, 'wt') datatype = "uint8_t" @@ -18,8 +20,7 @@ def addCompressedData(input_file, output_file): arrname = '' c_data_section = False ; c_skip_data = False ; c_footer = False - while True: - line = input_file.readline() + for line in input_lines: if not line: break if not c_footer: @@ -56,8 +57,6 @@ def addCompressedData(input_file, output_file): arrname = line.split('[')[0].split(' ')[-1] print("Found data array", arrname) - input_file.close() - #print("\nRaw Bitmap Data", raw_data) # @@ -190,11 +189,11 @@ def rle_emit(ofile, arrname, rledata, rawsize, isext): print('Usage: rle_compress_bitmap.py INPUT_FILE OUTPUT_FILE') exit(1) -output_cpp = sys.argv[2] +output_h = sys.argv[2] inname = sys.argv[1].replace('//', '/') try: - input_cpp = open(inname) + input_h = open(inname) print("Processing", inname, "...") - addCompressedData(input_cpp, output_cpp) + addCompressedData(input_h, output_h) except OSError: print("Can't find input file", inname) From 3b4adac579f42683fbbd9099b89f33801c190145 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 Mar 2024 13:55:35 -0500 Subject: [PATCH 228/236] =?UTF-8?q?=F0=9F=8E=A8=20Trailing=20ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h | 4 ++-- ini/stm32f4.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h index 00bf9de93401..7e35bfd08fa9 100644 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h @@ -219,7 +219,7 @@ #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif - + #if ENABLED(MKS_ROBIN_TFT43) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17184 @@ -237,7 +237,7 @@ #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif -#else +#else #error "TRONXY CXY 446 V10 only supports TFT with FSMC interface." #endif diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index fb8e9109cfd8..9c6f751746c3 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -820,7 +820,7 @@ board = marlin_STM32F446ZET_tronxy board_build.ldscript = buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/ldscript.ld board_build.offset = 0x10000 board_build.rename = fmw_tronxy.bin -build_flags = ${stm32_variant.build_flags} +build_flags = ${stm32_variant.build_flags} -DSTM32F4xx -DUSE_USB_HS -DUSE_USB_HS_IN_FS build_unflags = ${stm32_variant.build_unflags} -fno-rtti From 3a2c50c199a3fb0deabebc60326459a5f8b213b1 Mon Sep 17 00:00:00 2001 From: Sophist <3001893+Sophist-UK@users.noreply.github.com> Date: Sat, 16 Mar 2024 19:09:50 +0000 Subject: [PATCH 229/236] =?UTF-8?q?=F0=9F=A9=B9=20Thermistor=20name=20fixe?= =?UTF-8?q?s=20(#26857)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_info.cpp | 3 ++- Marlin/src/lcd/thermistornames.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 874b7dbd59f6..9015a9fe6d80 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -116,6 +116,7 @@ void menu_info_thermistors() { #if TEMP_SENSOR_1 != 0 #define THERMISTOR_ID TEMP_SENSOR_1 #include "../thermistornames.h" + #undef THERMISTOR_ID THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS); #endif @@ -162,9 +163,9 @@ void menu_info_thermistors() { #endif #if HAS_HEATED_BED - #undef THERMISTOR_ID #define THERMISTOR_ID TEMP_SENSOR_BED #include "../thermistornames.h" + #undef THERMISTOR_ID THERM_ITEMS("BED", BED, WATCH_BED); #endif diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index 71f48775bdbe..0454b48fcec0 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -104,6 +104,10 @@ #define THERMISTOR_NAME "100k Dagoma NTC" #elif THERMISTOR_ID == 18 #define THERMISTOR_NAME "ATC Semitec 204GT-2" +#elif THERMISTOR_ID == 22 + #define THERMISTOR_NAME "GTM32 Pro vB (hotend)" +#elif THERMISTOR_ID == 23 + #define THERMISTOR_NAME "GTM32 Pro vB (bed)" #elif THERMISTOR_ID == 60 #define THERMISTOR_NAME "Makers Tool" #elif THERMISTOR_ID == 70 @@ -156,6 +160,8 @@ #define THERMISTOR_NAME "Dyze / TL 4.7M" #elif THERMISTOR_ID == 67 #define THERMISTOR_NAME "SliceEng 450°C" +#elif THERMISTOR_ID == 68 + #define THERMISTOR_NAME "PT-100 + Dyze amp" // Dummies for dev testing #elif THERMISTOR_ID == 998 From c0264ae7871ca53de4ea8a24925d5f4f676115ec Mon Sep 17 00:00:00 2001 From: janenen Date: Sat, 16 Mar 2024 20:52:14 +0100 Subject: [PATCH 230/236] =?UTF-8?q?=F0=9F=90=9B=20Fix=20DETECT=5FBROKEN=5F?= =?UTF-8?q?ENDSTOP=20on=20IDEX=20(#26790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/module/motion.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 862f0c575433..c86c382ddcbc 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -2183,6 +2183,7 @@ void prepare_line_to_destination() { do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false); #if ENABLED(DETECT_BROKEN_ENDSTOP) + // Check for a broken endstop EndstopEnum es; switch (axis) { @@ -2190,11 +2191,20 @@ void prepare_line_to_destination() { MAIN_AXIS_MAP(_ESCASE) default: break; } + + #if ENABLED(DUAL_X_CARRIAGE) + if (axis == X_AXIS && axis_home_dir > 0) { + es = X_MAX; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("DUAL_X_CARRIAGE: Homing to X_MAX"); + } + #endif + if (TEST(endstops.state(), es)) { SERIAL_ECHO_MSG("Bad ", C(AXIS_CHAR(axis)), " Endstop?"); kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED)); } - #endif + + #endif // DETECT_BROKEN_ENDSTOP #if ALL(HOMING_Z_WITH_PROBE, BLTOUCH) if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy()) From e0222d3e01382daf19509226d9cbac233decda21 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 16 Mar 2024 12:56:33 -0700 Subject: [PATCH 231/236] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20G35=20"Probing=20F?= =?UTF-8?q?ailed"=20output=20(#26780)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/bedlevel/G35.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 63a1491f9bb1..c1a329fb8ac0 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -95,9 +95,11 @@ void GcodeSuite::G35() { for (uint8_t i = 0; i < G35_PROBE_COUNT; ++i) { const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE); if (isnan(z_probed_height)) { - SERIAL_ECHO( - F("G35 failed at point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'), - FPSTR(SP_X_STR), tramming_points[i].x, FPSTR(SP_Y_STR), tramming_points[i].y + SERIAL_ECHOLN( + F("G35 failed at point "), i + 1, + F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'), + FPSTR(SP_X_STR), tramming_points[i].x, + FPSTR(SP_Y_STR), tramming_points[i].y ); err_break = true; break; From c1be36bc66d9202fe533d8364b18aa82a8014fef Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 16 Mar 2024 12:58:53 -0700 Subject: [PATCH 232/236] =?UTF-8?q?=F0=9F=8E=A8=20Add=20MKS=20TinyBee=20si?= =?UTF-8?q?lkscreen=20labels=20(#26777)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 52 +++++++++++------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 9164d60ab4f0..6a8187d79207 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -35,7 +35,7 @@ #endif #define BOARD_INFO_NAME "MKS TinyBee" -#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks" +#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-TinyBee" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // MAX_EXPANDER_BITS is defined for MKS TinyBee in HAL/ESP32/inc/Conditionals_adv.h @@ -43,21 +43,22 @@ // // Servos // -#define SERVO0_PIN 2 +#define SERVO0_PIN 2 // 3D TOUCH // // Limit Switches // -#define X_STOP_PIN 33 -#define Y_STOP_PIN 32 -#define Z_STOP_PIN 22 -//#define FIL_RUNOUT_PIN 35 - +#define X_STOP_PIN 33 // X +#define Y_STOP_PIN 32 // Y +#define Z_STOP_PIN 22 // Z +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 35 // MT_DET +#endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) - #define PROBE_ENABLE_PIN SERVO0_PIN + #define PROBE_ENABLE_PIN SERVO0_PIN // 3D TOUCH #endif // @@ -75,49 +76,44 @@ // // Steppers // -#define X_STEP_PIN 129 +#define X_STEP_PIN 129 // X #define X_DIR_PIN 130 #define X_ENABLE_PIN 128 -#define Y_STEP_PIN 132 +#define Y_STEP_PIN 132 // Y #define Y_DIR_PIN 133 #define Y_ENABLE_PIN 131 -#define Z_STEP_PIN 135 +#define Z_STEP_PIN 135 // Z1 #define Z_DIR_PIN 136 #define Z_ENABLE_PIN 134 -#define E0_STEP_PIN 138 +#define E0_STEP_PIN 138 // E0 #define E0_DIR_PIN 139 #define E0_ENABLE_PIN 137 -#define E1_STEP_PIN 141 +#define E1_STEP_PIN 141 // E1 #define E1_DIR_PIN 142 #define E1_ENABLE_PIN 140 -#define Z2_STEP_PIN 141 -#define Z2_DIR_PIN 142 -#define Z2_ENABLE_PIN 140 - // // Temperature Sensors // -#define TEMP_0_PIN 36 // Analog Input -#define TEMP_1_PIN 34 // Analog Input, you need set R6=0Ω and R7=NC -#define TEMP_BED_PIN 39 // Analog Input +#define TEMP_0_PIN 36 // TH1 / Analog Input +#define TEMP_1_PIN 34 // TH2 / Analog Input, you need set R6=0Ω and R7=NC +#define TEMP_BED_PIN 39 // TB / Analog Input // // Heaters / Fans // -#define HEATER_0_PIN 145 -#define HEATER_1_PIN 146 -#define FAN0_PIN 147 -#define FAN1_PIN 148 -#define HEATER_BED_PIN 144 +#define HEATER_0_PIN 145 // HE0 +#define HEATER_1_PIN 146 // HE1 +#define FAN0_PIN 147 // FAN1 +#define FAN1_PIN 148 // FAN2 +#define HEATER_BED_PIN 144 // H-BED -//#define CONTROLLER_FAN_PIN 148 -//#define E0_AUTO_FAN_PIN 148 // need to update Configuration_adv.h @section extruder -//#define E1_AUTO_FAN_PIN 149 // need to update Configuration_adv.h @section extruder +//#define CONTROLLER_FAN_PIN 148 // FAN2 +//#define E0_AUTO_FAN_PIN 148 // FAN2 // // ADC Reference Voltage From 4b01c901bc864585ca3d72f13f0e3ca9e9af2a9f Mon Sep 17 00:00:00 2001 From: Sophist <3001893+Sophist-UK@users.noreply.github.com> Date: Sat, 16 Mar 2024 20:00:16 +0000 Subject: [PATCH 233/236] =?UTF-8?q?=F0=9F=93=9D=20Fix=20M201=20typos=20(#2?= =?UTF-8?q?6854)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 299c6418f3c1..302e459d863f 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1270,11 +1270,11 @@ * XY Frequency limit * Reduce resonance by limiting the frequency of small zigzag infill moves. * See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html - * Use M201 F G to change limits at runtime. + * Use M201 F S to change limits at runtime. */ //#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F. #ifdef XY_FREQUENCY_LIMIT - #define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G. + #define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 S. #endif // From a50490b11f0f79dba3e488ed0d3cfbde6cfedab1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 Mar 2024 15:40:45 -0500 Subject: [PATCH 234/236] =?UTF-8?q?=F0=9F=91=B7=20Minor=20signature.py=20a?= =?UTF-8?q?djustments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/signature.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index 2d024c366287..820e6b7d653c 100755 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -18,13 +18,13 @@ def enabled_defines(filepath): Each entry is a dictionary with a 'name' and a 'section' key. We end up with: { MOTHERBOARD: { name: "MOTHERBOARD", section: "hardware" }, ... } - The 'name' key might get dropped as redundant, but it's useful for debugging. + TODO: Drop the 'name' key as redundant. For now it's useful for debugging. - Because the option names are the keys, only the last occurrence is retained. - Use the Schema class for a more complete list of options, soon with full parsing. + This list is only used to filter config-defined options from those defined elsewhere. - This list is used to filter what is actually a config-defined option versus - defines from elsewhere. + Because the option names are the keys, only the last occurrence is retained. + This means the actual used value might not be reflected by this function. + The Schema class does more complete parsing for a more accurate list of options. While the Schema class parses the configurations on its own, this script will get the preprocessor output and get the intersection of the enabled options from @@ -44,13 +44,10 @@ def enabled_defines(filepath): # This will avoid false positives from #defines in comments f = re.sub(r'/\*.*?\*/', '', '\n'.join(f), flags=re.DOTALL).split("\n") - a = [] for line in f: sline = line.strip() m = re.match(spatt, sline) # @section ... - if m: - section = m.group(1).strip() - continue + if m: section = m.group(1).strip() ; continue if sline[:7] == "#define": # Extract the key here (we don't care about the value) kv = sline[8:].strip().split() @@ -79,6 +76,7 @@ def compute_build_signature(env): Compute the build signature by extracting all configuration settings and building a unique reversible signature that can be included in the binary. The signature can be reversed to get a 1:1 equivalent configuration file. + Used by common-dependencies.py after filtering build files by feature. ''' if 'BUILD_SIGNATURE' in env: return env.Append(BUILD_SIGNATURE=1) From c913020dc2d4df663d58bc02f4ccf3185105e939 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 17 Mar 2024 00:22:34 +0000 Subject: [PATCH 235/236] [cron] Bump distribution date (2024-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 1b783cc7bc61..2f661d3eecdb 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 "2024-03-10" +//#define STRING_DISTRIBUTION_DATE "2024-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 d544d915cb72..693358466516 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 "2024-03-10" + #define STRING_DISTRIBUTION_DATE "2024-03-17" #endif /** From 983aee57188a588dc500049047476b70bb5f4720 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun, 17 Mar 2024 01:46:22 +0100 Subject: [PATCH 236/236] =?UTF-8?q?=F0=9F=8C=90=20Update=20Italian=20langu?= =?UTF-8?q?age=20(#26837)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_it.h | 308 +++++++++++++------------- 1 file changed, 156 insertions(+), 152 deletions(-) diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index a1c0dda9d9c0..b7dc9d5678bf 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -65,18 +65,18 @@ namespace LanguageNarrow_it { LSTR MSG_MEDIA_UPDATE = _UxGT("Aggiorna ") MEDIA_TYPE_IT; LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Overflow sottochiamate"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Finecor."); // Max 8 characters - LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Finecorsa Soft"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Finecorsa soft"); LSTR MSG_MAIN_MENU = _UxGT("Menu principale"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Impostaz. avanzate"); LSTR MSG_CONFIGURATION = _UxGT("Configurazione"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Esegui files auto"); - LSTR MSG_DISABLE_STEPPERS = _UxGT("Disabilita Motori"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Disabilita motori"); LSTR MSG_DEBUG_MENU = _UxGT("Menu di debug"); LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barra avanzam."); - LSTR MSG_ENDSTOP_TEST = _UxGT("Test Finecorsa"); + LSTR MSG_ENDSTOP_TEST = _UxGT("Test finecorsa"); LSTR MSG_Z_PROBE = _UxGT("Sonda Z"); LSTR MSG_HOMING = _UxGT("Azzeramento"); - LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); + LSTR MSG_AUTO_HOME = _UxGT("Auto home"); LSTR MSG_AUTO_HOME_A = _UxGT("Home @"); LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); @@ -85,13 +85,13 @@ namespace LanguageNarrow_it { LSTR MSG_FILAMENT_SET = _UxGT("Impostaz.filamento"); LSTR MSG_FILAMENT_MAN = _UxGT("Gestione filamento"); LSTR MSG_MANUAL_LEVELING = _UxGT("Livel.manuale"); - LSTR MSG_TRAM_FL = _UxGT("Davanti Sinistra"); - LSTR MSG_TRAM_FR = _UxGT("Davanti Destra"); + LSTR MSG_TRAM_FL = _UxGT("Davanti sinistra"); + LSTR MSG_TRAM_FR = _UxGT("Davanti destra"); LSTR MSG_TRAM_C = _UxGT("Centro"); - LSTR MSG_TRAM_BL = _UxGT("Dietro Sinistra"); - LSTR MSG_TRAM_BR = _UxGT("Dietro Destra"); - LSTR MSG_MANUAL_MESH = _UxGT("Mesh Manuale"); - LSTR MSG_AUTO_MESH = _UxGT("Generaz.Autom.Mesh"); + LSTR MSG_TRAM_BL = _UxGT("Dietro sinistra"); + LSTR MSG_TRAM_BR = _UxGT("Dietro destra"); + LSTR MSG_MANUAL_MESH = _UxGT("Mesh manuale"); + LSTR MSG_AUTO_MESH = _UxGT("Generaz.autom.mesh"); LSTR MSG_AUTO_Z_ALIGN = _UxGT("Allineam.automat. Z"); LSTR MSG_ITERATION = _UxGT("Iterazione G34: %i"); LSTR MSG_DECREASING_ACCURACY = _UxGT("Precisione in calo!"); @@ -100,7 +100,7 @@ namespace LanguageNarrow_it { LSTR MSG_LEVEL_BED_WAITING = _UxGT("Premi per iniziare"); LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Punto successivo"); LSTR MSG_LEVEL_BED_DONE = _UxGT("Livel. terminato!"); - LSTR MSG_Z_FADE_HEIGHT = _UxGT("Fade Height"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Dissolvi altezza"); LSTR MSG_SET_HOME_OFFSETS = _UxGT("Imp. offset home"); LSTR MSG_HOME_OFFSET_X = _UxGT("Offset home X"); LSTR MSG_HOME_OFFSET_Y = _UxGT("Offset home Y"); @@ -113,21 +113,21 @@ namespace LanguageNarrow_it { LSTR MSG_PREHEAT_1 = _UxGT("Preriscalda ") PREHEAT_1_LABEL; LSTR MSG_PREHEAT_1_H = _UxGT("Preriscalda ") PREHEAT_1_LABEL " ~"; - LSTR MSG_PREHEAT_1_END = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Ugello"); - LSTR MSG_PREHEAT_1_END_E = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Ugello ~"); - LSTR MSG_PREHEAT_1_ALL = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Tutto"); - LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Piatto"); + LSTR MSG_PREHEAT_1_END = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" ugello"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" ugello ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" tutto"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" piatto"); LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" conf"); LSTR MSG_PREHEAT_M = _UxGT("Preriscalda $"); LSTR MSG_PREHEAT_M_H = _UxGT("Preriscalda $ ~"); - LSTR MSG_PREHEAT_M_END = _UxGT("Preris.$ Ugello"); - LSTR MSG_PREHEAT_M_END_E = _UxGT("Preris.$ Ugello ~"); - LSTR MSG_PREHEAT_M_ALL = _UxGT("Preris.$ Tutto"); - LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preris.$ Piatto"); + LSTR MSG_PREHEAT_M_END = _UxGT("Preris.$ ugello"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Preris.$ ugello ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Preris.$ tutto"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preris.$ piatto"); LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preris.$ conf"); - LSTR MSG_PREHEAT_HOTEND = _UxGT("Prerisc.Hotend"); + LSTR MSG_PREHEAT_HOTEND = _UxGT("Prerisc.ugello"); LSTR MSG_PREHEAT_CUSTOM = _UxGT("Prerisc.personal."); LSTR MSG_COOLDOWN = _UxGT("Raffredda"); @@ -136,7 +136,7 @@ namespace LanguageNarrow_it { LSTR MSG_SPINDLE_MENU = _UxGT("Controllo mandrino"); LSTR MSG_LASER_POWER = _UxGT("Potenza laser"); LSTR MSG_SPINDLE_POWER = _UxGT("Potenza mandrino"); - LSTR MSG_LASER_TOGGLE = _UxGT("Alterna Laser"); + LSTR MSG_LASER_TOGGLE = _UxGT("Alterna laser"); LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Alterna soffiatore"); LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Alterna aria supp."); LSTR MSG_LASER_PULSE_MS = _UxGT("ms impulso di test"); @@ -150,27 +150,27 @@ namespace LanguageNarrow_it { LSTR MSG_SWITCH_PS_OFF = _UxGT("Spegni aliment."); LSTR MSG_EXTRUDE = _UxGT("Estrudi"); LSTR MSG_RETRACT = _UxGT("Ritrai"); - LSTR MSG_MOVE_AXIS = _UxGT("Muovi Asse"); - LSTR MSG_BED_LEVELING = _UxGT("Livella piano"); - LSTR MSG_LEVEL_BED = _UxGT("Livella piano"); - LSTR MSG_BED_TRAMMING = _UxGT("Tarat.fine piano"); - LSTR MSG_BED_TRAMMING_MANUAL = _UxGT("Tarat.fine Manuale"); - LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Regola la vite finché la sonda non rileva il piano."); - LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piano livellato!"); + LSTR MSG_MOVE_AXIS = _UxGT("Muovi asse"); + LSTR MSG_BED_LEVELING = _UxGT("Livellamento piatto"); + LSTR MSG_LEVEL_BED = _UxGT("Livella piatto"); + LSTR MSG_BED_TRAMMING = _UxGT("Tarat.fine piatto"); + LSTR MSG_BED_TRAMMING_MANUAL = _UxGT("Tarat.fine manuale"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Regola la vite finché la sonda non rileva il piatto."); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piatto livellato!"); LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Punti buoni: "); LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Ultimo Z: "); LSTR MSG_NEXT_CORNER = _UxGT("Prossimo punto"); - LSTR MSG_MESH_EDITOR = _UxGT("Editor Mesh"); - LSTR MSG_MESH_VIEWER = _UxGT("Visualiz. Mesh"); - LSTR MSG_EDIT_MESH = _UxGT("Modifica Mesh"); - LSTR MSG_MESH_VIEW = _UxGT("Visualizza Mesh"); - LSTR MSG_EDITING_STOPPED = _UxGT("Modif. Mesh Fermata"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor mesh"); + LSTR MSG_MESH_VIEWER = _UxGT("Visualiz. mesh"); + LSTR MSG_EDIT_MESH = _UxGT("Modifica mesh"); + LSTR MSG_MESH_VIEW = _UxGT("Visualizza mesh"); + LSTR MSG_EDITING_STOPPED = _UxGT("Modif. mesh fermata"); LSTR MSG_NO_VALID_MESH = _UxGT("Mesh non valida"); LSTR MSG_ACTIVATE_MESH = _UxGT("Attiva livellamento"); LSTR MSG_PROBING_POINT = _UxGT("Punto sondato"); LSTR MSG_MESH_X = _UxGT("Indice X"); LSTR MSG_MESH_Y = _UxGT("Indice Y"); - LSTR MSG_MESH_INSET = _UxGT("Mesh Inset"); + LSTR MSG_MESH_INSET = _UxGT("Mesh inset"); LSTR MSG_MESH_MIN_X = _UxGT("Mesh X minimo"); LSTR MSG_MESH_MAX_X = _UxGT("Mesh X massimo"); LSTR MSG_MESH_MIN_Y = _UxGT("Mesh Y minimo"); @@ -186,7 +186,7 @@ namespace LanguageNarrow_it { LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Sonda oltre i limiti"); LSTR MSG_M48_DEVIATION = _UxGT("Deviazione"); LSTR MSG_IDEX_MENU = _UxGT("Modo IDEX"); - LSTR MSG_OFFSETS_MENU = _UxGT("Strumenti Offsets"); + LSTR MSG_OFFSETS_MENU = _UxGT("Strumenti offsets"); LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicazione"); LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia speculare"); @@ -197,10 +197,10 @@ namespace LanguageNarrow_it { LSTR MSG_UBL_DOING_G29 = _UxGT("G29 in corso"); LSTR MSG_UBL_TOOLS = _UxGT("Strumenti UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto inclinaz."); - LSTR MSG_UBL_TILT_MESH = _UxGT("Inclina Mesh"); + LSTR MSG_UBL_TILT_MESH = _UxGT("Inclina mesh"); LSTR MSG_UBL_TILTING_GRID = _UxGT("Dim.griglia inclin."); LSTR MSG_UBL_MESH_TILTED = _UxGT("Mesh inclinata"); - LSTR MSG_UBL_MANUAL_MESH = _UxGT("Mesh Manuale"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Mesh manuale"); LSTR MSG_UBL_MESH_WIZARD = _UxGT("Creaz.guid.mesh UBL"); LSTR MSG_UBL_BC_INSERT = _UxGT("Metti spes. e misura"); LSTR MSG_UBL_BC_INSERT2 = _UxGT("Misura"); @@ -208,57 +208,57 @@ namespace LanguageNarrow_it { LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Spostamento succes."); LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Attiva UBL"); LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Disattiva UBL"); - LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Piatto"); - LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Piatto"); - LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Ugello"); - LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Ugello"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifica Mesh"); - LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif.Mesh personal."); - LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ritocca Mesh"); - LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Modif.Mesh fatta"); - LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crea Mesh personal."); - LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Crea Mesh"); - LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Crea Mesh ($)"); - LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Valida Mesh ($)"); - LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Crea Mesh a freddo"); - LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Aggiusta Alt. Mesh"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. piatto"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. piatto"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. ugello"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. ugello"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifica mesh"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif.mesh personal."); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ritocca mesh"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Modif.mesh fatta"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crea mesh personal."); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Crea mesh"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Crea mesh ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Valida mesh ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Crea mesh a freddo"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Aggiusta alt. mesh"); LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Altezza"); - LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Valida Mesh"); - LSTR MSG_G26_HEATING_BED = _UxGT("G26 riscald.letto"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Valida mesh"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 riscald.piatto"); LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 riscald.ugello"); LSTR MSG_G26_MANUAL_PRIME = _UxGT("Priming manuale..."); LSTR MSG_G26_FIXED_LENGTH = _UxGT("Prime a lung.fissa"); LSTR MSG_G26_PRIME_DONE = _UxGT("Priming terminato"); - LSTR MSG_G26_CANCELED = _UxGT("G26 Annullato"); + LSTR MSG_G26_CANCELED = _UxGT("G26 annullato"); LSTR MSG_G26_LEAVING = _UxGT("Uscita da G26"); - LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valida Mesh pers."); - LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continua Mesh"); - LSTR MSG_UBL_MESH_LEVELING = _UxGT("Livell. Mesh"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valida mesh pers."); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continua mesh"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Livell. mesh"); LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Livell. 3 Punti"); - LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Livell. Griglia Mesh"); - LSTR MSG_UBL_MESH_LEVEL = _UxGT("Livella Mesh"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Livell. griglia mesh"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Livella mesh"); LSTR MSG_UBL_SIDE_POINTS = _UxGT("Punti laterali"); - LSTR MSG_UBL_MAP_TYPE = _UxGT("Tipo di Mappa"); - LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Esporta Mappa"); - LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Esporta per Host"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Tipo di mappa"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Esporta mappa"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Esporta per host"); LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Esporta in CSV"); LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Backup esterno"); - LSTR MSG_UBL_INFO_UBL = _UxGT("Esporta Info UBL"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Esporta info UBL"); LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Riempimento"); - LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Riempimento Manuale"); - LSTR MSG_UBL_SMART_FILLIN = _UxGT("Riempimento Smart"); - LSTR MSG_UBL_FILLIN_MESH = _UxGT("Riempimento Mesh"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Riempimento manuale"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Riempimento smart"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Riempimento mesh"); LSTR MSG_UBL_MESH_FILLED = _UxGT("Pts mancanti riempiti"); LSTR MSG_UBL_MESH_INVALID = _UxGT("Mesh non valida"); - LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalida Tutto"); - LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalid.Punto Vicino"); - LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Ritocca Tutto"); - LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ritocca Punto Vicino"); - LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Salvate"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalida tutto"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalid.punto vicino"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Ritocca tutto"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ritocca punto vicino"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh salvate"); LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Slot di memoria"); - LSTR MSG_UBL_LOAD_MESH = _UxGT("Carica Mesh Piatto"); - LSTR MSG_UBL_SAVE_MESH = _UxGT("Salva Mesh Piatto"); - LSTR MSG_UBL_INVALID_SLOT = _UxGT("Prima selez. uno slot Mesh"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Carica mesh piatto"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Salva mesh piatto"); + LSTR MSG_UBL_INVALID_SLOT = _UxGT("Prima selez. uno slot mesh"); LSTR MSG_MESH_LOADED = _UxGT("Mesh %i caricata"); LSTR MSG_MESH_SAVED = _UxGT("Mesh %i salvata"); LSTR MSG_MESH_ACTIVE = _UxGT("Mesh %i attiva"); @@ -266,15 +266,15 @@ namespace LanguageNarrow_it { LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: Salvataggio UBL"); LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: Ripristino UBL"); LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); - LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Fermato"); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset fermato"); LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL passo passo"); - LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Crea Mesh a freddo"); - LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Riempimento Smart"); - LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Valida Mesh"); - LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ritocca All"); - LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Valida Mesh"); - LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ritocca All"); - LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salva Mesh Piatto"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Crea mesh a freddo"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Riempimento smart"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Valida mesh"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ritocca all"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Valida mesh"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ritocca all"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salva mesh piatto"); LSTR MSG_LED_CONTROL = _UxGT("Controllo LED"); LSTR MSG_LEDS = _UxGT("Luci"); @@ -311,7 +311,7 @@ namespace LanguageNarrow_it { LSTR MSG_MOVE_N_MM = _UxGT("Muovi di $mm"); LSTR MSG_MOVE_N_IN = _UxGT("Muovi di $in"); LSTR MSG_MOVE_N_DEG = _UxGT("Muovi di $") LCD_STR_DEGREE; - LSTR MSG_LIVE_MOVE = _UxGT("Modalità Live"); + LSTR MSG_LIVE_MOVE = _UxGT("Modalità live"); LSTR MSG_SPEED = _UxGT("Velocità"); LSTR MSG_MESH_Z_OFFSET = _UxGT("Piatto Z"); LSTR MSG_NOZZLE = _UxGT("Ugello"); @@ -364,8 +364,8 @@ namespace LanguageNarrow_it { LSTR MSG_MPC_POWER_E = _UxGT("Potenza *"); LSTR MSG_MPC_BLOCK_HEAT_CAPACITY = _UxGT("Capacità riscald."); LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Capac.riscald. *"); - LSTR MSG_SENSOR_RESPONSIVENESS = _UxGT("Reattiv.Sens."); - LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Reattiv.Sens. *"); + LSTR MSG_SENSOR_RESPONSIVENESS = _UxGT("Reattiv.sens."); + LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Reattiv.sens. *"); LSTR MSG_MPC_AMBIENT_XFER_COEFF = _UxGT("Coeff.ambiente"); LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Coeff.amb. *"); LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN = _UxGT("Coeff.ventola"); @@ -373,32 +373,32 @@ namespace LanguageNarrow_it { LSTR MSG_SELECT_E = _UxGT("Seleziona *"); LSTR MSG_ACC = _UxGT("Accel"); LSTR MSG_JERK = _UxGT("Jerk"); - LSTR MSG_VA_JERK = _UxGT("Max Jerk ") STR_A; - LSTR MSG_VB_JERK = _UxGT("Max Jerk ") STR_B; - LSTR MSG_VC_JERK = _UxGT("Max Jerk ") STR_C; - LSTR MSG_VN_JERK = _UxGT("Max Jerk @"); - LSTR MSG_VE_JERK = _UxGT("Max Jerk E"); + LSTR MSG_VA_JERK = _UxGT("Max jerk ") STR_A; + LSTR MSG_VB_JERK = _UxGT("Max jerk ") STR_B; + LSTR MSG_VC_JERK = _UxGT("Max jerk ") STR_C; + LSTR MSG_VN_JERK = _UxGT("Max jerk @"); + LSTR MSG_VE_JERK = _UxGT("Max jerk E"); LSTR MSG_JUNCTION_DEVIATION = _UxGT("Deviaz. giunzioni"); LSTR MSG_STEP_SMOOTHING = _UxGT("Leviga passo"); LSTR MSG_MAX_SPEED = _UxGT("Vel.massima (mm/s)"); - LSTR MSG_VMAX_A = _UxGT("Vel.Massima ") STR_A; - LSTR MSG_VMAX_B = _UxGT("Vel.Massima ") STR_B; - LSTR MSG_VMAX_C = _UxGT("Vel.Massima ") STR_C; - LSTR MSG_VMAX_N = _UxGT("Vel.Massima @"); - LSTR MSG_VMAX_E = _UxGT("Vel.Massima E"); - LSTR MSG_VMAX_EN = _UxGT("Vel.Massima *"); - LSTR MSG_VMIN = _UxGT("Vel.Minima"); - LSTR MSG_VTRAV_MIN = _UxGT("Vel.Min spostam."); + LSTR MSG_VMAX_A = _UxGT("Vel.massima ") STR_A; + LSTR MSG_VMAX_B = _UxGT("Vel.massima ") STR_B; + LSTR MSG_VMAX_C = _UxGT("Vel.massima ") STR_C; + LSTR MSG_VMAX_N = _UxGT("Vel.massima @"); + LSTR MSG_VMAX_E = _UxGT("Vel.massima E"); + LSTR MSG_VMAX_EN = _UxGT("Vel.massima *"); + LSTR MSG_VMIN = _UxGT("Vel.minima"); + LSTR MSG_VTRAV_MIN = _UxGT("Vel.min spostam."); LSTR MSG_ACCELERATION = _UxGT("Accelerazione"); - LSTR MSG_AMAX_A = _UxGT("Acc.Massima ") STR_A; - LSTR MSG_AMAX_B = _UxGT("Acc.Massima ") STR_B; - LSTR MSG_AMAX_C = _UxGT("Acc.Massima ") STR_C; - LSTR MSG_AMAX_N = _UxGT("Acc.Massima @"); - LSTR MSG_AMAX_E = _UxGT("Acc.Massima E"); - LSTR MSG_AMAX_EN = _UxGT("Acc.Massima *"); + LSTR MSG_AMAX_A = _UxGT("Acc.massima ") STR_A; + LSTR MSG_AMAX_B = _UxGT("Acc.massima ") STR_B; + LSTR MSG_AMAX_C = _UxGT("Acc.massima ") STR_C; + LSTR MSG_AMAX_N = _UxGT("Acc.massima @"); + LSTR MSG_AMAX_E = _UxGT("Acc.massima E"); + LSTR MSG_AMAX_EN = _UxGT("Acc.massima *"); LSTR MSG_A_RETRACT = _UxGT("A-Ritrazione"); LSTR MSG_A_TRAVEL = _UxGT("A-Spostamento"); - LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); + LSTR MSG_INPUT_SHAPING = _UxGT("Input shaping"); LSTR MSG_SHAPING_ENABLE = _UxGT("Abilita shaping @"); LSTR MSG_SHAPING_DISABLE = _UxGT("Disabil. shaping @"); LSTR MSG_SHAPING_FREQ = _UxGT("Frequenza @"); @@ -435,13 +435,15 @@ namespace LanguageNarrow_it { LSTR MSG_DRAW_MIN_Y = _UxGT("Min Y area disegno"); LSTR MSG_DRAW_MAX_Y = _UxGT("Max Y area disegno"); LSTR MSG_MAX_BELT_LEN = _UxGT("Lungh.max cinghia"); - LSTR MSG_LINEAR_ADVANCE = _UxGT("Avanzam.Lineare"); + LSTR MSG_LINEAR_ADVANCE = _UxGT("Avanzam.lineare"); LSTR MSG_ADVANCE_K = _UxGT("K Avanzamento"); LSTR MSG_ADVANCE_K_E = _UxGT("K Avanzamento *"); LSTR MSG_CONTRAST = _UxGT("Contrasto LCD"); LSTR MSG_BRIGHTNESS = _UxGT("Luminosità LCD"); LSTR MSG_SCREEN_TIMEOUT = _UxGT("Timeout LCD (m)"); - LSTR MSG_BRIGHTNESS_OFF = _UxGT("Spegni Retroillum."); + LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Grafico temp.ugello"); + LSTR MSG_BED_TEMP_GRAPH = _UxGT("Grafico temp.piatto"); + LSTR MSG_BRIGHTNESS_OFF = _UxGT("Spegni retroillum."); LSTR MSG_STORE_EEPROM = _UxGT("Salva impostazioni"); LSTR MSG_LOAD_EEPROM = _UxGT("Carica impostazioni"); LSTR MSG_RESTORE_DEFAULTS = _UxGT("Ripristina imp."); @@ -488,15 +490,16 @@ namespace LanguageNarrow_it { LSTR MSG_BUTTON_PURGE = _UxGT("Spurga"); LSTR MSG_PAUSING = _UxGT("Messa in pausa..."); LSTR MSG_PAUSE_PRINT = _UxGT("Pausa stampa"); - LSTR MSG_ADVANCED_PAUSE = _UxGT("Pausa Avanzata"); + LSTR MSG_ADVANCED_PAUSE = _UxGT("Pausa avanzata"); LSTR MSG_RESUME_PRINT = _UxGT("Riprendi stampa"); - LSTR MSG_HOST_START_PRINT = _UxGT("Host Avvio"); + LSTR MSG_HOST_START_PRINT = _UxGT("Host avvio"); LSTR MSG_STOP_PRINT = _UxGT("Arresta stampa"); 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_OUTAGE_RECOVERY = _UxGT("Ripresa da PowerLoss"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Stampa oggetto"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancella oggetto"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. oggetto {"); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da interruz."); + LSTR MSG_RESUME_BED_TEMP = _UxGT("Riprendi temp.piatto"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Cont.proc.stampa"); LSTR MSG_MEDIA_MENU = _UxGT("Stampa da ") MEDIA_TYPE_IT; LSTR MSG_NO_MEDIA = MEDIA_TYPE_IT _UxGT(" non presente"); @@ -506,22 +509,22 @@ namespace LanguageNarrow_it { LSTR MSG_PRINTING = _UxGT("Stampa..."); LSTR MSG_STOPPING = _UxGT("Fermata..."); LSTR MSG_REMAINING_TIME = _UxGT("Rimanente"); - LSTR MSG_PRINT_ABORTED = _UxGT("Stampa Annullata"); - LSTR MSG_PRINT_DONE = _UxGT("Stampa Eseguita"); + LSTR MSG_PRINT_ABORTED = _UxGT("Stampa annullata"); + LSTR MSG_PRINT_DONE = _UxGT("Stampa eseguita"); LSTR MSG_PRINTER_KILLED = _UxGT("Stampante uccisa!"); LSTR MSG_TURN_OFF = _UxGT("Spegni stampante"); - LSTR MSG_NO_MOVE = _UxGT("Nessun Movimento"); + LSTR MSG_NO_MOVE = _UxGT("Nessun movimento"); LSTR MSG_KILLED = _UxGT("UCCISO. "); LSTR MSG_STOPPED = _UxGT("ARRESTATO. "); LSTR MSG_FWRETRACT = _UxGT("Ritraz.da firmware"); LSTR MSG_CONTROL_RETRACT = _UxGT("Ritrai mm"); - LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Scamb. Ritrai mm"); - LSTR MSG_CONTROL_RETRACTF = _UxGT("Ritrai V"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Scamb. ritrai mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Ritrai V"); LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Salta mm"); LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Avanza mm"); LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Scamb. Avanza mm"); LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Avanza V"); - LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Scamb. Avanza V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Scamb. avanza V"); LSTR MSG_AUTORETRACT = _UxGT("AutoRitrai"); LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Lunghezza scambio"); LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra scambio"); @@ -574,11 +577,11 @@ namespace LanguageNarrow_it { LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test Z offset"); LSTR MSG_TOUCHMI_SAVE = _UxGT("Memorizzare"); LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estendi TouchMI"); - LSTR MSG_MANUAL_DEPLOY = _UxGT("Estendi Sonda-Z"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Estendi sonda-Z"); LSTR MSG_MANUAL_PENUP = _UxGT("Penna su"); LSTR MSG_MANUAL_PENDOWN = _UxGT("Penna giù"); LSTR MSG_BLTOUCH_STOW = _UxGT("Ritrai BLTouch"); - LSTR MSG_MANUAL_STOW = _UxGT("Ritrai Sonda-Z"); + LSTR MSG_MANUAL_STOW = _UxGT("Ritrai sonda-Z"); LSTR MSG_HOME_FIRST = _UxGT("Home %s prima"); LSTR MSG_ZPROBE_SETTINGS = _UxGT("Impostazioni sonda"); LSTR MSG_ZPROBE_OFFSETS = _UxGT("Offsets sonda"); @@ -588,14 +591,14 @@ namespace LanguageNarrow_it { LSTR MSG_ZPROBE_MARGIN = _UxGT("Margine sonda"); LSTR MSG_Z_FEED_RATE = _UxGT("Velocità Z"); LSTR MSG_ENABLE_HS_MODE = _UxGT("Abilita modo HS"); - LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Muovi ugel.su letto"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Muovi ugel.su piatto"); LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); LSTR MSG_BABYSTEP_N = _UxGT("Babystep @"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Totali"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Interrompi se FC"); - LSTR MSG_ERR_HEATING_FAILED = _UxGT("Risc.Fallito"); // Max 12 characters + LSTR MSG_ERR_HEATING_FAILED = _UxGT("Risc.fallito"); // Max 12 characters LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP RIDONDANTE"); LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("TEMP FUORI CONTROLLO"); LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("MALFUNZIONAMENTO TEMP"); @@ -610,29 +613,30 @@ namespace LanguageNarrow_it { LSTR MSG_COOLING = _UxGT("Raffreddamento..."); LSTR MSG_BED_HEATING = _UxGT("Risc. piatto..."); LSTR MSG_BED_COOLING = _UxGT("Raffr. piatto..."); + LSTR MSG_BED_ANNEALING = _UxGT("Ricottura..."); LSTR MSG_PROBE_HEATING = _UxGT("Risc. sonda..."); LSTR MSG_PROBE_COOLING = _UxGT("Raffr. sonda..."); LSTR MSG_CHAMBER_HEATING = _UxGT("Risc. camera..."); LSTR MSG_CHAMBER_COOLING = _UxGT("Raffr. camera..."); LSTR MSG_LASER_COOLING = _UxGT("Raffr. laser..."); LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibraz. Delta"); - LSTR MSG_DELTA_CALIBRATION_IN_PROGRESS = _UxGT("Calibrazione Delta in corso"); + LSTR MSG_DELTA_CALIBRATION_IN_PROGRESS = _UxGT("Calibrazione delta in corso"); LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibra X"); LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibra Y"); LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibra Z"); LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibra centro"); - LSTR MSG_DELTA_SETTINGS = _UxGT("Impostaz. Delta"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Impostaz. delta"); LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto calibrazione"); - LSTR MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonale"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Barra diagonale"); LSTR MSG_DELTA_HEIGHT = _UxGT("Altezza"); LSTR MSG_DELTA_RADIUS = _UxGT("Raggio"); LSTR MSG_INFO_MENU = _UxGT("Info su stampante"); LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info. stampante"); LSTR MSG_3POINT_LEVELING = _UxGT("Livel. a 3 punti"); - LSTR MSG_LINEAR_LEVELING = _UxGT("Livel. Lineare"); - LSTR MSG_BILINEAR_LEVELING = _UxGT("Livel. Bilineare"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Livel. lineare"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Livel. bilineare"); LSTR MSG_UBL_LEVELING = _UxGT("Livel.piatto unific."); - LSTR MSG_MESH_LEVELING = _UxGT("Livel. Mesh"); + LSTR MSG_MESH_LEVELING = _UxGT("Livel. mesh"); LSTR MSG_MESH_DONE = _UxGT("Sond.mesh eseguito"); LSTR MSG_INFO_STATS_MENU = _UxGT("Statistiche"); LSTR MSG_RESET_STATS = _UxGT("Reset stat.stampa?"); @@ -644,12 +648,12 @@ namespace LanguageNarrow_it { LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Controllo fuga: OFF"); LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Controllo fuga: ON"); LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Timeout inatt.ugello"); - LSTR MSG_HOTEND_IDLE_DISABLE = _UxGT("Disabilita Timeout"); + LSTR MSG_HOTEND_IDLE_DISABLE = _UxGT("Disabilita timeout"); LSTR MSG_HOTEND_IDLE_NOZZLE_TARGET = _UxGT("Temp.inatt.ugello"); - LSTR MSG_HOTEND_IDLE_BED_TARGET = _UxGT("Temp.inatt.letto"); + LSTR MSG_HOTEND_IDLE_BED_TARGET = _UxGT("Temp.inatt.piatto"); LSTR MSG_FAN_SPEED_FAULT = _UxGT("Err.vel.della ventola"); - LSTR MSG_CASE_LIGHT = _UxGT("Luci Case"); + LSTR MSG_CASE_LIGHT = _UxGT("Luci case"); LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosità Luci"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("STAMPANTE ERRATA"); @@ -662,13 +666,13 @@ namespace LanguageNarrow_it { LSTR MSG_COLORS_WHITE = _UxGT("Bianco"); LSTR MSG_UI_LANGUAGE = _UxGT("Lingua UI"); LSTR MSG_SOUND_ENABLE = _UxGT("Abilita suono"); - LSTR MSG_LOCKSCREEN = _UxGT("Blocca Schermo"); + LSTR MSG_LOCKSCREEN = _UxGT("Blocca schermo"); LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Stamp. bloccata,"); LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll x sbloccare."); LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Attendere fino al riavvio."); - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No Supporto"); - LSTR MSG_PLEASE_PREHEAT = _UxGT("Prerisc. hot end."); + LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No supporto"); + LSTR MSG_PLEASE_PREHEAT = _UxGT("Prerisc. ugello."); LSTR MSG_INFO_PRINT_COUNT = _UxGT("Stampe"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Durata"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Più lungo"); @@ -678,7 +682,7 @@ namespace LanguageNarrow_it { LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp min"); LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp max"); LSTR MSG_INFO_PSU = _UxGT("Alimentatore"); - LSTR MSG_DRIVE_STRENGTH = _UxGT("Potenza Drive"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Potenza drive"); LSTR MSG_DAC_PERCENT_N = _UxGT("Driver @ %"); LSTR MSG_ERROR_TMC = _UxGT("ERR.CONNESSIONE TMC"); LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Scrivi DAC EEPROM"); @@ -793,21 +797,21 @@ namespace LanguageNarrow_it { LSTR MSG_FIXED_TIME_MOTION = _UxGT("Movimento a Tempo-Fisso"); LSTR MSG_FTM_MODE = _UxGT("Modo Movimento:"); - LSTR MSG_FTM_ZV = _UxGT("ZV"); - LSTR MSG_FTM_ZVD = _UxGT("ZVD"); - LSTR MSG_FTM_EI = _UxGT("EI"); - LSTR MSG_FTM_2HEI = _UxGT("2HEI"); - LSTR MSG_FTM_3HEI = _UxGT("3HEI"); - LSTR MSG_FTM_MZV = _UxGT("MZV"); - //LSTR MSG_FTM_ULENDO_FBS = _UxGT("Ulendo FBS"); - //LSTR MSG_FTM_DISCTF = _UxGT("DISCTF"); + //LSTR MSG_FTM_ZV = _UxGT("ZV"); + //LSTR MSG_FTM_ZVD = _UxGT("ZVD"); + //LSTR MSG_FTM_ZVDD = _UxGT("ZVDD"); + //LSTR MSG_FTM_ZVDDD = _UxGT("ZVDDD"); + //LSTR MSG_FTM_EI = _UxGT("EI"); + //LSTR MSG_FTM_2HEI = _UxGT("2HEI"); + //LSTR MSG_FTM_3HEI = _UxGT("3HEI"); + //LSTR MSG_FTM_MZV = _UxGT("MZV"); LSTR MSG_FTM_DYN_MODE = _UxGT("Modo DF:"); LSTR MSG_FTM_Z_BASED = _UxGT("Base-Z"); LSTR MSG_FTM_MASS_BASED = _UxGT("Base-Massa"); - LSTR MSG_FTM_BASE_FREQ_N = _UxGT("@ Freq. Base"); - LSTR MSG_FTM_DFREQ_K_N = _UxGT("@ Freq. Dinam."); - LSTR MSG_FTM_ZETA = _UxGT("Smorzamento"); - LSTR MSG_FTM_VTOL = _UxGT("Livello Vib."); + LSTR MSG_FTM_BASE_FREQ_N = _UxGT("@ Freq. base"); + LSTR MSG_FTM_DFREQ_K_N = _UxGT("@ Freq. dinam."); + LSTR MSG_FTM_ZETA_N = _UxGT("Smorzamento @"); + LSTR MSG_FTM_VTOL_N = _UxGT("Livello vib. @"); LSTR MSG_LEVEL_X_AXIS = _UxGT("Livello asse X"); LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibra"); @@ -847,7 +851,7 @@ namespace LanguageNarrow_it { 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_BED_PID_DISABLED = _UxGT("PID piatto 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"); @@ -856,7 +860,7 @@ namespace LanguageNarrow_it { 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_ABL_REQUIRED = _UxGT("Richiesto autolivellamento piatto"); LSTR DGUS_MSG_PROBING_FAILED = _UxGT("Sondaggio fallito"); LSTR DGUS_MSG_PROBING_SUCCESS = _UxGT("Sondaggio effettuato"); LSTR DGUS_MSG_RESET_EEPROM = _UxGT("Reset EEPROM"); @@ -873,12 +877,12 @@ namespace LanguageWide_it { LSTR MSG_PRINTING_OBJECT = _UxGT("Sto stampando l'oggetto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancella l'oggetto"); LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancella l'oggetto {"); - LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continua il Job di stampa"); + LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continua il job di stampa"); LSTR MSG_MEDIA_MENU = _UxGT("Selez.da supporto"); LSTR MSG_TURN_OFF = _UxGT("Spegni la stampante"); LSTR MSG_END_LOOPS = _UxGT("Termina i cicli di ripetizione"); LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Nessun supporto inserito."); - LSTR MSG_PLEASE_PREHEAT = _UxGT("Si prega di preriscaldare l'hot end."); + LSTR MSG_PLEASE_PREHEAT = _UxGT("Si prega di preriscaldare l'ugello."); LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Azzera i contatori di stampa"); LSTR MSG_INFO_PRINT_COUNT = _UxGT("Contatori di stampa"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo totale");