Skip to content

Commit 2678104

Browse files
committed
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into feature/bugfix-2.1.x
* 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin: (61 commits) 🔨 Fix BTT EBB42 V1.1 compile with -flto (MarlinFirmware#25849) [cron] Bump distribution date (2023-05-22) 🧑‍💻 Fall back to SPI0 with YHCB2004 (MarlinFirmware#25856) 🩹 Fix ProUI Manual Mesh / UBL Viewer (MarlinFirmware#25858) 🩹 Fix TFT LVGL compile error (MarlinFirmware#25865) [cron] Bump distribution date (2023-05-21) 📝 MKS TinyBee pins header 🚸 Improve EEPROM validation (MarlinFirmware#25860) [cron] Bump distribution date (2023-05-20) 🎨 Cutter pins cleanup [cron] Bump distribution date (2023-05-19) 🩹 M493 report followup ✨ I3DBEEZ9 board (MarlinFirmware#25614) 🔨 Fix Windows path backslash treated as escape [cron] Bump distribution date (2023-05-18) 🚸 Unify edit limits for some E3V2 LCDs (MarlinFirmware#25045) [cron] Bump distribution date (2023-05-17) 🐛 Fix MKS Robin Nano 1.3 F4 pin collision (MarlinFirmware#25838) 🚸 Support Bed Leveling Mesh > 16x16 🔧 TMC Config Inheritance followup (MarlinFirmware#25783) ... Signed-off-by: Nick Snyder <nick@nicksnyder.is> # Conflicts: # config/ncksnydr/narungol/2.1/Configuration.h
2 parents a20ca65 + 9ceecef commit 2678104

File tree

212 files changed

+8674
-5050
lines changed

Some content is hidden

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

212 files changed

+8674
-5050
lines changed

.github/workflows/test-builds.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939

4040
# AVR
4141
- mega2560
42+
- mega1280
4243
- at90usb1286_dfu
4344

4445
# AVR Extended
4546
- FYSETC_F6
46-
- mega1280
4747
- melzi_optiboot
4848
- rambo
4949
- sanguino1284p
@@ -105,10 +105,12 @@ jobs:
105105
- FYSETC_S6
106106
- LERDGEK
107107
- LERDGEX
108+
- mks_robin_pro2
108109
- Opulo_Lumen_REV3
109110
- rumba32
110111
- STM32F401RC_creality
111112
- STM32F407VE_black
113+
- I3DBEEZ9_V1
112114

113115
# STM32F7
114116
- NUCLEO_F767ZI

Marlin/Version.h

+1-1
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 "2023-05-09"
44+
//#define STRING_DISTRIBUTION_DATE "2023-05-22"
4545

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

Marlin/config.ini

+5-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ preheat_1_temp_hotend = 180
4242
bang_max = 255
4343
pidtemp = on
4444
pid_k1 = 0.95
45-
pid_max = BANG_MAX
45+
pid_max = 255
4646
pid_functional_range = 10
4747

4848
default_kp = 22.20
@@ -96,10 +96,10 @@ step_state_x = HIGH
9696
step_state_y = HIGH
9797
step_state_z = HIGH
9898

99-
disable_x = false
100-
disable_y = false
101-
disable_z = false
102-
disable_e = false
99+
disable_x = off
100+
disable_y = off
101+
disable_z = off
102+
disable_e = off
103103

104104
proportional_font_ratio = 1.0
105105
default_nominal_filament_dia = 1.75

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

+23-26
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,36 @@
3535

3636
#include "../fastio.h"
3737

38-
// change for your board
39-
#define DEBUG_LED DIO21
40-
4138
// UART
42-
#define RXD DIO0
43-
#define TXD DIO1
39+
#define RXD 0
40+
#define TXD 1
4441

4542
// SPI
46-
#define SCK DIO52
47-
#define MISO DIO50
48-
#define MOSI DIO51
49-
#define SS DIO53
43+
#define MISO 50
44+
#define MOSI 51
45+
#define SCK 52
46+
#define SS 53
5047

5148
// TWI (I2C)
52-
#define SCL DIO21
53-
#define SDA DIO20
49+
#define SCL 21
50+
#define SDA 20
5451

5552
// Timers and PWM
56-
#define OC0A DIO13
57-
#define OC0B DIO4
58-
#define OC1A DIO11
59-
#define OC1B DIO12
60-
#define OC2A DIO10
61-
#define OC2B DIO9
62-
#define OC3A DIO5
63-
#define OC3B DIO2
64-
#define OC3C DIO3
65-
#define OC4A DIO6
66-
#define OC4B DIO7
67-
#define OC4C DIO8
68-
#define OC5A DIO46
69-
#define OC5B DIO45
70-
#define OC5C DIO44
53+
#define OC0A 13
54+
#define OC0B 4
55+
#define OC1A 11
56+
#define OC1B 12
57+
#define OC2A 10
58+
#define OC2B 9
59+
#define OC3A 5
60+
#define OC3B 2
61+
#define OC3C 3
62+
#define OC4A 6
63+
#define OC4B 7
64+
#define OC4C 8
65+
#define OC5A 46
66+
#define OC5B 45
67+
#define OC5C 44
7168

7269
// Digital I/O
7370

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

+16-19
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,29 @@
3333

3434
#include "../fastio.h"
3535

36-
// change for your board
37-
#define DEBUG_LED DIO46
38-
3936
// UART
40-
#define RXD DIO0
41-
#define TXD DIO1
37+
#define RXD 0
38+
#define TXD 1
4239

4340
// SPI
44-
#define SCK DIO10
45-
#define MISO DIO12
46-
#define MOSI DIO11
47-
#define SS DIO16
41+
#define SCK 10
42+
#define MISO 12
43+
#define MOSI 11
44+
#define SS 16
4845

4946
// TWI (I2C)
50-
#define SCL DIO17
51-
#define SDA DIO18
47+
#define SCL 17
48+
#define SDA 18
5249

5350
// Timers and PWM
54-
#define OC0A DIO9
55-
#define OC0B DIO4
56-
#define OC1A DIO7
57-
#define OC1B DIO8
58-
#define OC2A DIO6
59-
#define OC3A DIO5
60-
#define OC3B DIO2
61-
#define OC3C DIO3
51+
#define OC0A 9
52+
#define OC0B 4
53+
#define OC1A 7
54+
#define OC1B 8
55+
#define OC2A 6
56+
#define OC3A 5
57+
#define OC3B 2
58+
#define OC3C 3
6259

6360
// Digital I/O
6461

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

+12-14
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,27 @@
3333

3434
#include "../fastio.h"
3535

36-
#define DEBUG_LED AIO5
37-
3836
// UART
39-
#define RXD DIO0
40-
#define TXD DIO1
37+
#define RXD 0
38+
#define TXD 1
4139

4240
// SPI
43-
#define SCK DIO13
44-
#define MISO DIO12
45-
#define MOSI DIO11
46-
#define SS DIO10
41+
#define SS 10
42+
#define MOSI 11
43+
#define MISO 12
44+
#define SCK 13
4745

4846
// TWI (I2C)
4947
#define SCL AIO5
5048
#define SDA AIO4
5149

5250
// Timers and PWM
53-
#define OC0A DIO6
54-
#define OC0B DIO5
55-
#define OC1A DIO9
56-
#define OC1B DIO10
57-
#define OC2A DIO11
58-
#define OC2B DIO3
51+
#define OC0A 6
52+
#define OC0B 5
53+
#define OC1A 9
54+
#define OC1B 10
55+
#define OC2A 11
56+
#define OC2B 3
5957

6058
// Digital I/O
6159

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

+18-20
Original file line numberDiff line numberDiff line change
@@ -59,34 +59,32 @@
5959

6060
#include "../fastio.h"
6161

62-
#define DEBUG_LED DIO0
63-
6462
// UART
65-
#define RXD DIO8
66-
#define TXD DIO9
67-
#define RXD0 DIO8
68-
#define TXD0 DIO9
63+
#define RXD 8
64+
#define TXD 9
65+
#define RXD0 8
66+
#define TXD0 9
6967

70-
#define RXD1 DIO10
71-
#define TXD1 DIO11
68+
#define RXD1 10
69+
#define TXD1 11
7270

7371
// SPI
74-
#define SCK DIO7
75-
#define MISO DIO6
76-
#define MOSI DIO5
77-
#define SS DIO4
72+
#define SS 4
73+
#define MOSI 5
74+
#define MISO 6
75+
#define SCK 7
7876

7977
// TWI (I2C)
80-
#define SCL DIO16
81-
#define SDA DIO17
78+
#define SCL 16
79+
#define SDA 17
8280

8381
// Timers and PWM
84-
#define OC0A DIO3
85-
#define OC0B DIO4
86-
#define OC1A DIO13
87-
#define OC1B DIO12
88-
#define OC2A DIO15
89-
#define OC2B DIO14
82+
#define OC0A 3
83+
#define OC0B 4
84+
#define OC1A 13
85+
#define OC1B 12
86+
#define OC2A 15
87+
#define OC2B 14
9088

9189
// Digital I/O
9290

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

+4-7
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@
3434

3535
#include "../fastio.h"
3636

37-
// change for your board
38-
#define DEBUG_LED DIO31 /* led D5 red */
39-
4037
// SPI
41-
#define SCK DIO21 // 9
42-
#define MISO DIO23 // 11
43-
#define MOSI DIO22 // 10
44-
#define SS DIO20 // 8
38+
#define SS 20 // 8
39+
#define SCK 21 // 9
40+
#define MOSI 22 // 10
41+
#define MISO 23 // 11
4542

4643
// Digital I/O
4744

Marlin/src/HAL/AVR/pinsDebug.h

+33-39
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
109109
* Print a pin's PWM status.
110110
* Return true if it's currently a PWM pin.
111111
*/
112-
static bool pwm_status(uint8_t pin) {
112+
bool pwm_status(uint8_t pin) {
113113
char buffer[20]; // for the sprintf statements
114114

115115
switch (digitalPinToTimer_DEBUG(pin)) {
@@ -232,12 +232,12 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
232232

233233
#define OCR_VAL(T, L) pgm_read_word(&PWM_OCR[T][L])
234234

235-
static void err_is_counter() { SERIAL_ECHOPGM(" non-standard PWM mode"); }
236-
static void err_is_interrupt() { SERIAL_ECHOPGM(" compare interrupt enabled"); }
237-
static void err_prob_interrupt() { SERIAL_ECHOPGM(" overflow interrupt enabled"); }
238-
static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); SERIAL_ECHO_SP(14); }
235+
void err_is_counter() { SERIAL_ECHOPGM(" non-standard PWM mode"); }
236+
void err_is_interrupt() { SERIAL_ECHOPGM(" compare interrupt enabled"); }
237+
void err_prob_interrupt() { SERIAL_ECHOPGM(" overflow interrupt enabled"); }
238+
void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); SERIAL_ECHO_SP(14); }
239239

240-
inline void com_print(const uint8_t N, const uint8_t Z) {
240+
void com_print(const uint8_t N, const uint8_t Z) {
241241
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
242242
SERIAL_ECHOPGM(" COM", AS_DIGIT(N));
243243
SERIAL_CHAR(Z);
@@ -279,7 +279,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
279279
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
280280
}
281281

282-
static void pwm_details(uint8_t pin) {
282+
void pwm_details(uint8_t pin) {
283283
switch (digitalPinToTimer_DEBUG(pin)) {
284284

285285
#if ABTEST(0)
@@ -353,47 +353,41 @@ static void pwm_details(uint8_t pin) {
353353
} // pwm_details
354354

355355
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
356-
int digitalRead_mod(const int8_t pin) { // same as digitalRead except the PWM stop section has been removed
356+
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
357357
const uint8_t port = digitalPinToPort_DEBUG(pin);
358358
return (port != NOT_A_PIN) && (*portInputRegister(port) & digitalPinToBitMask_DEBUG(pin)) ? HIGH : LOW;
359359
}
360360
#endif
361361

362-
#ifndef PRINT_PORT
363-
364-
void print_port(int8_t pin) { // print port number
365-
#ifdef digitalPinToPort_DEBUG
366-
uint8_t x;
367-
SERIAL_ECHOPGM(" Port: ");
368-
#if AVR_AT90USB1286_FAMILY
369-
x = (pin == 46 || pin == 47) ? 'E' : digitalPinToPort_DEBUG(pin) + 64;
370-
#else
371-
x = digitalPinToPort_DEBUG(pin) + 64;
372-
#endif
373-
SERIAL_CHAR(x);
374-
375-
#if AVR_AT90USB1286_FAMILY
376-
if (pin == 46)
377-
x = '2';
378-
else if (pin == 47)
379-
x = '3';
380-
else {
381-
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
382-
for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
383-
}
384-
#else
362+
void print_port(const pin_t pin) { // print port number
363+
#ifdef digitalPinToPort_DEBUG
364+
uint8_t x;
365+
SERIAL_ECHOPGM(" Port: ");
366+
#if AVR_AT90USB1286_FAMILY
367+
x = (pin == 46 || pin == 47) ? 'E' : digitalPinToPort_DEBUG(pin) + 64;
368+
#else
369+
x = digitalPinToPort_DEBUG(pin) + 64;
370+
#endif
371+
SERIAL_CHAR(x);
372+
373+
#if AVR_AT90USB1286_FAMILY
374+
if (pin == 46)
375+
x = '2';
376+
else if (pin == 47)
377+
x = '3';
378+
else {
385379
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
386380
for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
387-
#endif
388-
SERIAL_CHAR(x);
381+
}
389382
#else
390-
SERIAL_ECHO_SP(10);
383+
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
384+
for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
391385
#endif
392-
}
393-
394-
#define PRINT_PORT(p) print_port(p)
395-
396-
#endif
386+
SERIAL_CHAR(x);
387+
#else
388+
SERIAL_ECHO_SP(10);
389+
#endif
390+
}
397391

398392
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
399393
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)

0 commit comments

Comments
 (0)