Skip to content

Commit 8dd89ea

Browse files
committed
Merge branch 'bugfix-2.1.x' into mike-anet-evo
* bugfix-2.1.x: [cron] Bump distribution date (2024-01-30) 🎨 Misc. cleanup 29-01 [cron] Bump distribution date (2024-01-29) 🩹 Temp constraints followup (MarlinFirmware#26744) [cron] Bump distribution date (2024-01-28) 🐛 Protect EEPROM bytes 916-926 🧑‍💻 Fix warning, adjust tests [cron] Bump distribution date (2024-01-27) 🎨 Misc. cleanup 25-01 Add Conditionals_type.h [cron] Bump distribution date (2024-01-26) ✨🔨 EEPROM exclusion zone (MarlinFirmware#26729) 🩹 Fix single Neo strip M150 K (MarlinFirmware#26709) 🔧 HYBRID_THRESHOLD sanity checks (MarlinFirmware#26681) 🩹 Followup to EDITABLE_STEPS_PER_UNIT (MarlinFirmware#26677) ✏️ Fix draw_dialog.cpp typo (MarlinFirmware#26684) ✨ Creality v2.4.S4_170 (Ender 2 Pro, HC32F460KCTA) (MarlinFirmware#26730) 🎨 Misc. LCD pins comments 🔧 Allow float Z_PROBE_LOW_POINT (MarlinFirmware#26711) 🩹 Fix IA Creality IDEX case
2 parents 2eb9949 + 70d942a commit 8dd89ea

File tree

290 files changed

+1036
-702
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+1036
-702
lines changed

Marlin/Marlin.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
Marlin Firmware
44
5-
(c) 2011-2023 MarlinFirmware
5+
(c) 2011-2024 MarlinFirmware
66
Portions of Marlin are (c) by their respective authors.
77
All code complies with GPLv2 and/or GPLv3
88

Marlin/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
//#define STRING_DISTRIBUTION_DATE "2024-01-25"
44+
//#define STRING_DISTRIBUTION_DATE "2024-01-30"
4545

4646
/**
4747
* Defines a generic printer name to be output to the LCD after booting Marlin.

Marlin/src/HAL/AVR/HAL_SPI.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ void spiBegin() {
119119
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
120120
}
121121

122-
123122
/** begin spi transaction */
124123
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
125124
// Based on Arduino SPI library
@@ -175,7 +174,6 @@ void spiBegin() {
175174
SPSR = clockDiv | 0x01;
176175
}
177176

178-
179177
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
180178

181179
// ------------------------

Marlin/src/HAL/AVR/Servo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363

6464
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
6565

66-
6766
/************ static functions common to all instances ***********************/
6867

6968
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {

Marlin/src/HAL/AVR/eeprom.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
#ifndef MARLIN_EEPROM_SIZE
3636
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
3737
#endif
38-
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
38+
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
3939
bool PersistentStore::access_start() { return true; }
4040
bool PersistentStore::access_finish() { return true; }
4141

4242
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
4343
uint16_t written = 0;
4444
while (size--) {
45-
uint8_t * const p = (uint8_t * const)pos;
45+
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
4646
uint8_t v = *value;
4747
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
4848
eeprom_write_byte(p, v);
@@ -61,7 +61,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
6161

6262
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
6363
do {
64-
uint8_t c = eeprom_read_byte((uint8_t*)pos);
64+
const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
6565
if (writing) *value = c;
6666
crc16(crc, &c, 1);
6767
pos++;

Marlin/src/HAL/AVR/endstop_interrupts.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); }
9191

9292
#endif
9393

94-
9594
// Install Pin change interrupt for a pin. Can be called multiple times.
9695
void pciSetup(const int8_t pin) {
9796
if (digitalPinHasPCICR(pin)) {

Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@
679679
#define PF7_PWM 0
680680
#define PF7_DDR DDRF
681681

682-
683682
/**
684683
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
685684
* do not function the same as the other Arduino extensions.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once

Marlin/src/HAL/AVR/pinsDebug.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ bool pwm_status(uint8_t pin) {
163163
SERIAL_ECHO_SP(2);
164164
} // pwm_status
165165

166-
167166
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
168167
{ &TCCR0A, &TCCR0B, &TIMSK0 },
169168
{ &TCCR1A, &TCCR1B, &TIMSK1 },
@@ -181,7 +180,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = {
181180
#endif
182181
};
183182

184-
185183
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
186184

187185
#ifdef TIMER0A
@@ -217,7 +215,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
217215
#endif
218216
};
219217

220-
221218
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
222219
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
223220
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])

Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
120120
U8G_ATOMIC_END();
121121
}
122122

123-
124123
#if ENABLED(FYSETC_MINI_12864)
125124
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
126125
#else

0 commit comments

Comments
 (0)