Skip to content

Commit a3963ed

Browse files
committed
Merge branch 'bugfix-2.0.x' into 2.0.x-Sapphire-Pro
2 parents 90fe4da + ab1863a commit a3963ed

File tree

234 files changed

+3109
-2151
lines changed

Some content is hidden

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

234 files changed

+3109
-2151
lines changed

.github/workflows/test-builds.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,31 @@ jobs:
2929
- DUE
3030
- esp32
3131
- linux_native
32-
- megaatmega2560
32+
- mega2560
3333
- teensy31
3434
- teensy35
3535
- SAMD51_grandcentral_m4
3636

3737
# Extended AVR Environments
3838

3939
- FYSETC_F6_13
40-
- megaatmega1280
40+
- mega1280
4141
- rambo
42-
- sanguino_atmega1284p
43-
- sanguino_atmega644p
42+
- sanguino1284p
43+
- sanguino644p
4444

4545
# Extended STM32 Environments
4646

47-
- STM32F103RC_bigtree
48-
- STM32F103RC_bigtree_USB
49-
- STM32F103RE_bigtree
50-
- STM32F103RE_bigtree_USB
47+
- STM32F103RC_btt
48+
- STM32F103RC_btt_USB
49+
- STM32F103RE_btt
50+
- STM32F103RE_btt_USB
5151
- STM32F103RC_fysetc
5252
- jgaurora_a5s_a1
5353
- STM32F103VE_longer
5454
- STM32F407VE_black
5555
- BIGTREE_SKR_PRO
56+
- BIGTREE_GTR_V1_0
5657
- mks_robin
5758
- ARMED
5859
- FYSETC_S6

Marlin/Configuration.h

+2
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,8 @@
803803
#define DEFAULT_YJERK 10.0
804804
#define DEFAULT_ZJERK 0.3
805805

806+
//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves
807+
806808
//#define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2
807809
#if ENABLED(LIMITED_JERK_EDITING)
808810
#define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } // ...or, set your own edit limits

Marlin/Configuration_adv.h

+25-18
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,10 @@
276276
#define AUTOTEMP_OLDWEIGHT 0.98
277277
#endif
278278

279-
// Show extra position information with 'M114 D'
280-
//#define M114_DETAIL
279+
// Extra options for the M114 "Current Position" report
280+
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
281+
//#define M114_REALTIME // Real current position based on forward kinematics
282+
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
281283

282284
// Show Temperature ADC value
283285
// Enable for M105 to include ADC values read from temperature sensors.
@@ -1039,12 +1041,16 @@
10391041
* during SD printing. If the recovery file is found at boot time, present
10401042
* an option on the LCD screen to continue the print from the last-known
10411043
* point in the file.
1044+
*
1045+
* If the machine reboots when resuming a print you may need to replace or
1046+
* reformat the SD card. (Bad sectors delay startup triggering the watchdog.)
10421047
*/
10431048
//#define POWER_LOSS_RECOVERY
10441049
#if ENABLED(POWER_LOSS_RECOVERY)
1050+
//#define PLR_ENABLED_DEFAULT true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
10451051
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
10461052
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
1047-
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
1053+
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
10481054
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
10491055
//#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate
10501056
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
@@ -1172,18 +1178,16 @@
11721178
// Add an optimized binary file transfer mode, initiated with 'M28 B1'
11731179
//#define BINARY_FILE_TRANSFER
11741180

1175-
#if HAS_SDCARD_CONNECTION
1176-
/**
1177-
* Set this option to one of the following (or the board's defaults apply):
1178-
*
1179-
* LCD - Use the SD drive in the external LCD controller.
1180-
* ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.)
1181-
* CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
1182-
*
1183-
* :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
1184-
*/
1185-
//#define SDCARD_CONNECTION LCD
1186-
#endif
1181+
/**
1182+
* Set this option to one of the following (or the board's defaults apply):
1183+
*
1184+
* LCD - Use the SD drive in the external LCD controller.
1185+
* ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.)
1186+
* CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
1187+
*
1188+
* :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
1189+
*/
1190+
//#define SDCARD_CONNECTION LCD
11871191

11881192
#endif // SDSUPPORT
11891193

@@ -1260,6 +1264,7 @@
12601264
#define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
12611265
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
12621266
#define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating
1267+
//#define STATUS_CUTTER_ANIM // Use a second bitmap to indicate spindle / laser active
12631268
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
12641269
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
12651270
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
@@ -1579,7 +1584,7 @@
15791584
#if ENABLED(PROBE_TEMP_COMPENSATION)
15801585
// Max temperature that can be reached by heated bed.
15811586
// This is required only for the calibration process.
1582-
#define PTC_MAX_BED_TEMP 110
1587+
#define PTC_MAX_BED_TEMP BED_MAXTEMP
15831588

15841589
// Park position to wait for probe cooldown
15851590
#define PTC_PARK_POS_X 0.0F
@@ -2016,7 +2021,7 @@
20162021
* TMCStepper library is required to use TMC stepper drivers.
20172022
* https://github.com/teemuatlut/TMCStepper
20182023
*/
2019-
#if HAS_TRINAMIC
2024+
#if HAS_TRINAMIC_CONFIG
20202025

20212026
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
20222027
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
@@ -2346,7 +2351,7 @@
23462351
*/
23472352
#define TMC_ADV() { }
23482353

2349-
#endif // HAS_TRINAMIC
2354+
#endif // HAS_TRINAMIC_CONFIG
23502355

23512356
// @section L64XX
23522357

@@ -2791,6 +2796,8 @@
27912796
//#define GCODE_QUOTED_STRINGS // Support for quoted string parameters
27922797
#endif
27932798

2799+
//#define GCODE_CASE_INSENSITIVE // Accept G-code sent to the firmware in lowercase
2800+
27942801
/**
27952802
* CNC G-code options
27962803
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.

Marlin/Makefile

+28-28
Original file line numberDiff line numberDiff line change
@@ -789,22 +789,22 @@ sym: $(BUILD_DIR)/$(TARGET).sym
789789
# Do not try to reset an Arduino if it's not one
790790
upload: $(BUILD_DIR)/$(TARGET).hex
791791
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
792-
stty hup < $(UPLOAD_PORT); true
792+
stty hup < $(UPLOAD_PORT); true
793793
endif
794-
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
794+
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
795795
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
796-
stty -hup < $(UPLOAD_PORT); true
796+
stty -hup < $(UPLOAD_PORT); true
797797
endif
798798

799799
# Display size of file.
800800
HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
801801
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
802802
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
803803
sizebefore:
804-
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
804+
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
805805

806806
sizeafter: build
807-
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
807+
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
808808

809809

810810
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
@@ -816,71 +816,71 @@ COFFCONVERT=$(OBJCOPY) --debugging \
816816

817817

818818
coff: $(BUILD_DIR)/$(TARGET).elf
819-
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
819+
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
820820

821821

822822
extcoff: $(TARGET).elf
823-
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
823+
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
824824

825825

826826
.SUFFIXES: .elf .hex .eep .lss .sym .bin
827827
.PRECIOUS: .o
828828

829829
.elf.hex:
830-
$(Pecho) " COPY $@"
831-
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
830+
$(Pecho) " COPY $@"
831+
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
832832

833833
.elf.bin:
834-
$(Pecho) " COPY $@"
835-
$P $(OBJCOPY) -O binary -R .eeprom $< $@
834+
$(Pecho) " COPY $@"
835+
$P $(OBJCOPY) -O binary -R .eeprom $< $@
836836

837837
.elf.eep:
838-
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
838+
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
839839
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
840840

841841
# Create extended listing file from ELF output file.
842842
.elf.lss:
843-
$(OBJDUMP) -h -S $< > $@
843+
$(OBJDUMP) -h -S $< > $@
844844

845845
# Create a symbol table from ELF output file.
846846
.elf.sym:
847-
$(NM) -n $< > $@
847+
$(NM) -n $< > $@
848848

849849
# Link: create ELF output file from library.
850850

851851
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
852-
$(Pecho) " CXX $@"
853-
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
852+
$(Pecho) " CXX $@"
853+
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
854854

855855
# Object files that were found in "src" will be stored in $(BUILD_DIR)
856856
# in directories that mirror the structure of "src"
857857

858858
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
859-
$(Pecho) " CC $<"
860-
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
859+
$(Pecho) " CC $<"
860+
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
861861

862862
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
863-
$(Pecho) " CXX $<"
864-
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
863+
$(Pecho) " CXX $<"
864+
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
865865

866866
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
867867

868868
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
869-
$(Pecho) " CC $<"
870-
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
869+
$(Pecho) " CC $<"
870+
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
871871

872872
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
873-
$(Pecho) " CXX $<"
874-
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
873+
$(Pecho) " CXX $<"
874+
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
875875

876876
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
877-
$(Pecho) " CXX $<"
878-
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
877+
$(Pecho) " CXX $<"
878+
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
879879

880880
# Target: clean project.
881881
clean:
882-
$(Pecho) " RMDIR $(BUILD_DIR)/"
883-
$P rm -rf $(BUILD_DIR)
882+
$(Pecho) " RMDIR $(BUILD_DIR)/"
883+
$P rm -rf $(BUILD_DIR)
884884

885885

886886
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100
2828
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
29-
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 72 75 76 77 74 xx xx xx xx xx
29+
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
3030
*/
3131

3232
#include "../fastio.h"

Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
/**
5757
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
5858
*/
59-
#if HAS_TRINAMIC && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
59+
#if HAS_TRINAMIC_CONFIG && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
6060
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
6161
#endif
6262

Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
3939
if (v != eeprom_read_byte(p)) {
4040
eeprom_write_byte(p, v);
4141
if (eeprom_read_byte(p) != v) {
42-
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
42+
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
4343
return true;
4444
}
4545
}

Marlin/src/HAL/HAL_AVR/watchdog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void watchdog_init() {
6262
#if ENABLED(WATCHDOG_RESET_MANUAL)
6363
ISR(WDT_vect) {
6464
sei(); // With the interrupt driven serial we need to allow interrupts.
65-
SERIAL_ERROR_MSG(MSG_WATCHDOG_FIRED);
65+
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
6666
minkill(); // interrupt-safe final kill and infinite loop
6767
}
6868
#endif

Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
5454
eeprom_write_byte(p, v);
5555
delay(2);
5656
if (eeprom_read_byte(p) != v) {
57-
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
57+
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
5858
return true;
5959
}
6060
}

Marlin/src/HAL/HAL_ESP32/HAL.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <rom/rtc.h>
2828
#include <driver/adc.h>
2929
#include <esp_adc_cal.h>
30+
#include <HardwareSerial.h>
3031

3132
#include "../../inc/MarlinConfigPre.h"
3233

@@ -105,6 +106,27 @@ void HAL_init_board() {
105106
#endif
106107
server.begin();
107108
#endif
109+
110+
// ESP32 uses a GPIO matrix that allows pins to be assigned to hardware serial ports.
111+
// The following code initializes hardware Serial1 and Serial2 to use user-defined pins
112+
// if they have been defined.
113+
#if defined(HARDWARE_SERIAL1_RX) && defined(HARDWARE_SERIAL1_TX)
114+
HardwareSerial Serial1(1);
115+
#ifdef TMC_BAUD_RATE // use TMC_BAUD_RATE for Serial1 if defined
116+
Serial1.begin(TMC_BAUD_RATE, SERIAL_8N1, HARDWARE_SERIAL1_RX, HARDWARE_SERIAL1_TX);
117+
#else // use default BAUDRATE if TMC_BAUD_RATE not defined
118+
Serial1.begin(BAUDRATE, SERIAL_8N1, HARDWARE_SERIAL1_RX, HARDWARE_SERIAL1_TX);
119+
#endif
120+
#endif
121+
#if defined(HARDWARE_SERIAL2_RX) && defined(HARDWARE_SERIAL2_TX)
122+
HardwareSerial Serial2(2);
123+
#ifdef TMC_BAUD_RATE // use TMC_BAUD_RATE for Serial1 if defined
124+
Serial2.begin(TMC_BAUD_RATE, SERIAL_8N1, HARDWARE_SERIAL2_RX, HARDWARE_SERIAL2_TX);
125+
#else // use default BAUDRATE if TMC_BAUD_RATE not defined
126+
Serial2.begin(BAUDRATE, SERIAL_8N1, HARDWARE_SERIAL2_RX, HARDWARE_SERIAL2_TX);
127+
#endif
128+
#endif
129+
108130
}
109131

110132
void HAL_idletask() {

Marlin/src/HAL/HAL_ESP32/i2s.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ int i2s_init() {
308308
esp_intr_enable(i2s_isr_handle);
309309

310310
// Create the task that will feed the buffer
311-
xTaskCreate(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr);
311+
xTaskCreatePinnedToCore(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr, CONFIG_ARDUINO_RUNNING_CORE); // run I2S stepper task on same core as rest of Marlin
312312

313313
// Route the i2s pins to the appropriate GPIO
314314
gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);

Marlin/src/HAL/HAL_LPC1768/MarlinSerial.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@
3232
}
3333
#endif
3434

35-
#if (defined(SERIAL_PORT) && SERIAL_PORT == 1) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 1) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 1)
35+
#if SERIAL_PORT == 1 || SERIAL_PORT_2 == 1 || DGUS_SERIAL_PORT == 1
3636
MarlinSerial MSerial1((LPC_UART_TypeDef *) LPC_UART1);
3737
extern "C" void UART1_IRQHandler() {
3838
MSerial1.IRQHandler();
3939
}
4040
#endif
4141

42-
#if (defined(SERIAL_PORT) && SERIAL_PORT == 2) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 2) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 2)
42+
#if SERIAL_PORT == 2 || SERIAL_PORT_2 == 2 || DGUS_SERIAL_PORT == 2
4343
MarlinSerial MSerial2(LPC_UART2);
4444
extern "C" void UART2_IRQHandler() {
4545
MSerial2.IRQHandler();
4646
}
4747
#endif
4848

49-
#if (defined(SERIAL_PORT) && SERIAL_PORT == 3) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 3) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 3)
49+
#if SERIAL_PORT == 3 || SERIAL_PORT_2 == 3 || DGUS_SERIAL_PORT == 3
5050
MarlinSerial MSerial3(LPC_UART3);
5151
extern "C" void UART3_IRQHandler() {
5252
MSerial3.IRQHandler();

0 commit comments

Comments
 (0)