diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h
index c6c0bfbe21..dda1480e02 100644
--- a/Marlin/src/inc/MarlinConfig.h
+++ b/Marlin/src/inc/MarlinConfig.h
@@ -27,7 +27,9 @@
#include "MarlinConfigPre.h"
-#ifndef __MARLIN_DEPS__
+#ifdef __MARLIN_DEPS__
+ #include "../HAL/shared/fauxpins.h"
+#else
#include "../HAL/HAL.h"
#endif
diff --git a/Marlin/src/pins/esp32/env_validate.h b/Marlin/src/pins/esp32/env_validate.h
index ce14c33414..0bfd0ebd92 100644
--- a/Marlin/src/pins/esp32/env_validate.h
+++ b/Marlin/src/pins/esp32/env_validate.h
@@ -19,8 +19,11 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(ARDUINO_ARCH_ESP32)
#error "Oops! Select an ESP32 board in 'Tools > Board.'"
#endif
+
+#endif
diff --git a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h
index e911900b1d..4f8b4b0fe4 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
@@ -91,7 +93,9 @@
#define K_CS_PIN 159
// Reduce baud rate to improve software serial reliability
-#define TMC_BAUD_RATE 19200
+#ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+#endif
//
// Temperature Sensors
@@ -108,7 +112,7 @@
// #define FAN_SOFT_PWM_REQUIRED // check if needed
-// Neopixel Rings
+// NeoPixel Rings
#define NEOPIXEL_PIN 14
#define NEOPIXEL2_PIN 27
diff --git a/Marlin/src/pins/esp32/pins_ESP32.h b/Marlin/src/pins/esp32/pins_ESP32.h
index 1c01be8a88..9c9b06ca64 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 60ed800ba6..297ba34e71 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
@@ -119,7 +121,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
* ------ ------
diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h
index d88a3ab359..bcdb8c4faa 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
@@ -119,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/esp32/pins_PANDA_M4.h b/Marlin/src/pins/esp32/pins_PANDA_M4.h
index 5e2e72af05..c619be43a5 100644
--- a/Marlin/src/pins/esp32/pins_PANDA_M4.h
+++ b/Marlin/src/pins/esp32/pins_PANDA_M4.h
@@ -27,6 +27,10 @@
#define BOARD_INFO_NAME "Panda_M4"
+#if HAS_MULTI_HOTEND || E_STEPPERS > 1
+ #error "PANDA M4 only supports 1 hotend / E stepper."
+#endif
+
#include "pins_PANDA_common.h"
//
diff --git a/Marlin/src/pins/esp32/pins_PANDA_ZHU.h b/Marlin/src/pins/esp32/pins_PANDA_ZHU.h
index 4750057897..36a589b600 100644
--- a/Marlin/src/pins/esp32/pins_PANDA_ZHU.h
+++ b/Marlin/src/pins/esp32/pins_PANDA_ZHU.h
@@ -27,6 +27,13 @@
#define BOARD_INFO_NAME "Panda_ZHU"
+#if E_STEPPERS > 5
+ #error "PANDA ZHU supports up to 5 E steppers."
+#endif
+#if HAS_MULTI_HOTEND
+ #error "PANDA ZHU only supports 1 hotend."
+#endif
+
#include "pins_PANDA_common.h"
//
diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h
index 971525622a..2cc954940e 100644
--- a/Marlin/src/pins/esp32/pins_PANDA_common.h
+++ b/Marlin/src/pins/esp32/pins_PANDA_common.h
@@ -63,10 +63,10 @@
#define TEMP_BED_PIN 36 // Analog Input
#if ENABLED(MAX31856_PANDAPI)
- #define MAX31856_CLK_PIN 29
- #define MAX31856_MISO_PIN 24
- #define MAX31856_MOSI_PIN 28
- #define MAX31856_CS_PIN 27
+ #define TEMP_0_CLK_PIN 29
+ #define TEMP_0_MISO_PIN 24
+ #define TEMP_0_MOSI_PIN 28
+ #define TEMP_0_CS_PIN 27
#endif
//
@@ -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/esp32/pins_RESP32_CUSTOM.h b/Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h
index 5d3f75574d..f627909a7a 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/Marlin/src/pins/gd32f1/env_validate.h b/Marlin/src/pins/gd32f1/env_validate.h
new file mode 100644
index 0000000000..f6882e70d6
--- /dev/null
+++ b/Marlin/src/pins/gd32f1/env_validate.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 .
+ *
+ */
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
+
+#if NOT_TARGET(__STM32F1__, STM32F1)
+ #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
+#endif
+
+#endif
diff --git a/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h b/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h
new file mode 100644
index 0000000000..e92c24b86c
--- /dev/null
+++ b/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h
@@ -0,0 +1,76 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Sovol 1.3.1 (GD32F103RET6) board pin assignments
+ */
+
+#include "env_validate.h"
+
+#if HAS_MULTI_HOTEND || E_STEPPERS > 1
+ #error "SOVOL V131 only supports 1 hotend / E-stepper."
+ #define E_ERROR 1
+#endif
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "Sovol V131"
+#endif
+#ifndef DEFAULT_MACHINE_NAME
+ #define DEFAULT_MACHINE_NAME "Sovol SV06"
+#endif
+
+#include "../stm32f1/pins_CREALITY_V4.h"
+
+#if HAS_TMC_UART
+
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+
+ #define X_SERIAL_TX_PIN PC1
+ #define X_SERIAL_RX_PIN PC1
+
+ #define Y_SERIAL_TX_PIN PC0
+ #define Y_SERIAL_RX_PIN PC0
+
+ #define Z_SERIAL_TX_PIN PA15
+ #define Z_SERIAL_RX_PIN PA15
+
+ #define E0_SERIAL_TX_PIN PC14
+ #define E0_SERIAL_RX_PIN PC14
+
+ // Reduce baud rate to improve software serial reliability
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
+
+//
+// SD Card
+//
+#define ONBOARD_SPI_DEVICE 1
+#define ONBOARD_SD_CS_PIN PA4 // SDSS
diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h
index 6ec4864a7c..48b419e708 100644
--- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h
+++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h
@@ -247,18 +247,16 @@
#endif
/**
- * Default pins for TMC software SPI
+ * Default pins for TMC SPI
*/
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI 66
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO 44
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK 64
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI 66
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO 44
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK 64
#endif
#if HAS_TMC_UART
@@ -373,9 +371,37 @@
#endif
#endif
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
+/** 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
+
+//
+// LCD / Controller
+//
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
@@ -387,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
@@ -406,11 +433,11 @@
#define SPI_FLASH_MOSI_PIN SD_MOSI_PIN
#endif
- #define TFT_BUFFER_SIZE 0xFFFF
+ #define TFT_BUFFER_WORDS 0xFFFF
#ifndef TFT_DRIVER
#define TFT_DRIVER ST7796
#endif
- #ifndef TOUCH_SCREEN_CALIBRATION
+ #if DISABLED(TOUCH_SCREEN_CALIBRATION)
#if ENABLED(TFT_RES_320x240)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 20525
@@ -475,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)
@@ -492,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)
@@ -512,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
//
@@ -553,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
@@ -615,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
@@ -675,7 +692,6 @@
#else
- // Beeper on AUX-4
#define BEEPER_PIN 33
// Buttons are directly attached to AUX-2
@@ -691,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/env_validate.h b/Marlin/src/pins/lpc1768/env_validate.h
index adb3ea938d..8a6a1cebd3 100644
--- a/Marlin/src/pins/lpc1768/env_validate.h
+++ b/Marlin/src/pins/lpc1768/env_validate.h
@@ -19,7 +19,8 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if ENABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
@@ -28,3 +29,5 @@
#endif
#undef REQUIRE_LPC1769
+
+#endif
diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
index 7d843803d5..c498af3a64 100644
--- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
+++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
@@ -73,18 +73,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P0_18 // ETH
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_17 // ETH
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_15 // ETH
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P0_18 // ETH
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_17 // ETH
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_15 // ETH
#endif
//
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
index a198af6884..9c901e249d 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
//
@@ -139,18 +146,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P4_28
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_05
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_04
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P4_28
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_05
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
@@ -188,8 +193,11 @@
#define E1_SERIAL_RX_PIN P1_01
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
/**
* ------ ------
@@ -284,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
@@ -310,28 +319,15 @@
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
- #define TFT_A0_PIN EXP1_08_PIN
- #define TFT_DC_PIN EXP1_08_PIN
- #define TFT_CS_PIN EXP1_07_PIN
- #define TFT_RESET_PIN EXP1_04_PIN
- #define TFT_BACKLIGHT_PIN EXP1_03_PIN
-
- //#define TFT_RST_PIN EXP2_07_PIN
- #define TFT_MOSI_PIN EXP2_06_PIN
- #define TFT_SCK_PIN EXP2_02_PIN
- #define TFT_MISO_PIN EXP2_01_PIN
-
- #define BTN_EN2 EXP2_05_PIN
- #define BTN_EN1 EXP2_03_PIN
- #define BTN_ENC EXP1_02_PIN
-
- #define BEEPER_PIN EXP1_01_PIN
#define SDCARD_CONNECTION ONBOARD
- #define TOUCH_BUTTONS_HW_SPI
- #define TOUCH_BUTTONS_HW_SPI_DEVICE 1
+ #define BEEPER_PIN EXP1_01_PIN
- #define TFT_BUFFER_SIZE 2400
+ #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
#ifndef TFT_WIDTH
#define TFT_WIDTH 480
@@ -340,21 +336,84 @@
#define TFT_HEIGHT 320
#endif
- #define LCD_READ_ID 0xD3
- #define LCD_USE_DMA_SPI
+ #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.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
+ * 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 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
@@ -369,7 +428,7 @@
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -367
#endif
- #define TFT_BUFFER_SIZE 2400
+ #define TFT_BUFFER_WORDS 2400
#endif
#elif IS_TFTGLCD_PANEL
@@ -399,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
@@ -472,14 +529,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 e7744b221a..fa222bdac2 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
//
@@ -196,18 +203,16 @@
#define TEMP_BED_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_BED_PIN
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P1_17
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_05
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_04
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P1_17
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_05
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
@@ -245,8 +250,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
/** ------ ------
* 1.30 | 1 2 | 0.28 0.17 | 1 2 | 0.15
@@ -394,26 +402,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_A0_PIN EXP1_08_PIN
- #define TFT_DC_PIN EXP1_08_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
+ #define SDCARD_CONNECTION ONBOARD
- #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 BEEPER_PIN EXP1_01_PIN
- // SPI 1
- #define SD_SCK_PIN EXP2_02_PIN
- #define SD_MISO_PIN EXP2_01_PIN
- #define SD_MOSI_PIN EXP2_06_PIN
+ #define BTN_ENC EXP1_02_PIN
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
- #define TFT_BUFFER_SIZE 2400
+ #define TFT_A0_PIN TFT_DC_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_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 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 -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
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
index 75eea8e0f6..c7393e6546 100644
--- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
+++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
@@ -111,8 +111,9 @@
//
// 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_EMOTRONIC.h b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h
index 43a9b786eb..5c4e8d40e8 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_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
index 92c405b267..a9184073c5 100644
--- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
+++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
@@ -106,7 +106,9 @@
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
#else
#error "TMC2208 UART configuration is required for GMarsh X6."
#endif
diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
index cc4674bc2f..fe21e1824e 100644
--- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
+++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
@@ -110,31 +110,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
//
@@ -170,21 +164,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
@@ -205,41 +197,52 @@
#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
//
+
#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
@@ -257,9 +260,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 LCD_PINS_EN // EXP1.3 (LCD_EN on FYSETC schematic)
- #define DOGLCD_A0 LCD_PINS_RS // 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
@@ -267,16 +270,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)
@@ -293,25 +296,23 @@
#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:
// https://github.com/makerbase-mks/MKS-SBASE/issues/25
#define TMC_USE_SW_SPI
- #if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P0_03 // AUX1
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_02 // AUX1
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_26 // TH4
- #endif
+ #ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P0_03 // AUX1
+ #endif
+ #ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_02 // AUX1
+ #endif
+ #ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_26 // TH4
#endif
#endif
@@ -325,21 +326,24 @@
* 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
#define E0_SERIAL_RX_PIN P0_26 // TH4
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
// UNUSED
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
index e6f306c9ac..e507f7b7fa 100644
--- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
+++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
@@ -134,18 +134,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P4_28
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_05
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_04
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P4_28
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_05
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
@@ -186,7 +184,10 @@
#define Z2_SERIAL_RX_PIN P1_17
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
#endif // HAS_TMC_UART
//
@@ -311,8 +312,8 @@
#define LCD_PINS_EN -1
#define LCD_PINS_RS -1
- #ifndef TFT_BUFFER_SIZE
- #define TFT_BUFFER_SIZE 1200
+ #ifndef TFT_BUFFER_WORDS
+ #define TFT_BUFFER_WORDS 1200
#endif
#ifndef TFT_QUEUE_SIZE
#define TFT_QUEUE_SIZE 6144
diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
index e7dade8844..84c2eca919 100644
--- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
+++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
@@ -99,18 +99,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P1_00 // ETH
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P1_08 // ETH
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P1_09 // ETH
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P1_00 // ETH
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P1_08 // ETH
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P1_09 // ETH
#endif
#if HAS_TMC_UART
@@ -153,8 +151,11 @@
#endif
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -166,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
//
@@ -292,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)
@@ -324,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
@@ -366,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.
@@ -395,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
@@ -420,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
@@ -440,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/env_validate.h b/Marlin/src/pins/lpc1769/env_validate.h
index 2e2b63d520..0f62412453 100644
--- a/Marlin/src/pins/lpc1769/env_validate.h
+++ b/Marlin/src/pins/lpc1769/env_validate.h
@@ -19,8 +19,11 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
+
+#endif
diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
index 7a341e7a4a..8412f1c12d 100644
--- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
+++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
@@ -108,7 +108,6 @@
//
// Display
//
-
#if ANY(VIKI2, miniVIKI)
#define BEEPER_PIN P1_31
#define DOGLCD_A0 P2_06
diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h
index 92e97ca875..f1753d0e2b 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 c26eaba578..966ff5ef95 100644
--- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
+++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
@@ -153,8 +153,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// TMC Low Power Standby pins
@@ -171,7 +174,10 @@
#define TEMP_0_PIN P0_24
#define TEMP_1_PIN P0_23
#define TEMP_BED_PIN P0_25
-#define TEMP_BOARD_PIN P1_30 // Onboard thermistor, NTC100K
+
+#ifndef TEMP_BOARD_PIN
+ #define TEMP_BOARD_PIN P1_30 // Onboard thermistor, NTC100K
+#endif
//
// Heaters / Fans
diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
index c826d240c4..70781cb0b5 100644
--- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
+++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
@@ -72,16 +72,14 @@
//
// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
#endif
//
diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
index 5f5e2ddc3a..a6acde35ff 100644
--- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
+++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
@@ -89,16 +89,14 @@
//
// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
#endif
//
@@ -160,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
//
@@ -173,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
@@ -232,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
@@ -259,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_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h
index 19ad7eda39..d5a7a38c23 100644
--- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h
+++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h
@@ -94,18 +94,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P0_20
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_19
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_21
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P0_20
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_19
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_21
#endif
#if HAS_TMC_UART
@@ -128,8 +126,11 @@
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
index 1e71fccfe5..5e552353cd 100644
--- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
+++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
@@ -56,5 +56,8 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
index ec43bde621..1257f1805b 100644
--- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
+++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
@@ -148,18 +148,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI P1_16
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO P0_05
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK P0_04
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI P1_16
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO P0_05
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
@@ -197,7 +195,10 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
#endif // HAS_TMC_UART
//
@@ -360,8 +361,8 @@
#define LCD_PINS_EN -1
#define LCD_PINS_RS -1
- #ifndef TFT_BUFFER_SIZE
- #define TFT_BUFFER_SIZE 1200
+ #ifndef TFT_BUFFER_WORDS
+ #define TFT_BUFFER_WORDS 1200
#endif
#ifndef TFT_QUEUE_SIZE
#define TFT_QUEUE_SIZE 6144
@@ -428,6 +429,9 @@
#endif // HAS_WIRED_LCD
+//
+// SD Card
+//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
index 3db18e4acf..0134e93631 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/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
index e3db713e57..634e50c223 100644
--- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
+++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
@@ -99,8 +99,11 @@
#define E0_SERIAL_RX_PIN P0_21
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temp Sensors
diff --git a/Marlin/src/pins/mega/env_validate.h b/Marlin/src/pins/mega/env_validate.h
index 97c52d4e5e..7b6462ab7a 100644
--- a/Marlin/src/pins/mega/env_validate.h
+++ b/Marlin/src/pins/mega/env_validate.h
@@ -19,7 +19,8 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(__AVR_ATmega2560__)
#if DISABLED(ALLOW_MEGA1280)
@@ -30,3 +31,5 @@
#endif
#undef ALLOW_MEGA1280
+
+#endif
diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h
index 60d68a8607..1c0623aea8 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 5c92f92e29..4864a6d83c 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 813cbf7dc4..92c85c1211 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_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h
index cf07091826..55632e97bf 100644
--- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h
+++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h
@@ -47,14 +47,12 @@
#define Y_MAX_PIN 28
#define Z_MIN_PIN 30
-#if ENABLED(BLTOUCH)
- #if MB(GT2560_REV_A_PLUS)
- #define SERVO0_PIN 11
- #define Z_MAX_PIN 32
- #else
- #define SERVO0_PIN 32
- #define Z_MAX_PIN -1
- #endif
+#if ENABLED(BLTOUCH) && !defined(SERVO0_PIN)
+ #define SERVO0_PIN 32
+#endif
+
+#if SERVO0_PIN == 32
+ #define Z_MAX_PIN -1
#else
#define Z_MAX_PIN 32
#endif
@@ -102,64 +100,100 @@
//
// Misc. Functions
//
-#define SDSS 53
+
+// Power monitoring pins - set to 0 for main VIN, 1 for dedicated bed supply rail.
+// Don't forget to enable POWER_MONITOR_VOLTAGE in Configuration_adv.h
+// and set POWER_MONITOR_VOLTS_PER_VOLT to 0.090909.
+#define POWER_MONITOR_VOLTAGE_PIN 0
+
+/** LCD SDCARD
+ * ------ ------
+ * (TX1) 18 | 1 2 | 19 (RX1) (MISO) 50 | 1 2 | 52 (SCK)
+ * (RX2) 17 | 3 4 | 20 (SDA) 42 | 3 4 | 53 (SS)
+ * (TX2) 16 | 5 6 21 (SCL) 40 | 5 6 51 (MOSI)
+ * 5 | 7 8 | 6 38 | 7 8 | RESET
+ * GND | 9 10 | 5V GND | 9 10 | 5V/3V3
+ * ------ ------
+ * SV1 SV3
+ *
+ * GT2560 LCD & SD headers follow typical EXP1 & EXP2 format.
+ * SD header voltage pin set by link pads beneath the header; R25 for 5V, R44 for 3.3V (default)
+ * Pins 20 (SDA) and 21 (SCL) have external 10K pull-ups on the board.
+ */
+
+#define EXP1_01_PIN 18 // TX1 / BEEPER
+#define EXP1_02_PIN 19 // RX1 / ENC
+#define EXP1_03_PIN 17 // RX2 / CS
+#define EXP1_04_PIN 20 // SDA / A0
+#define EXP1_05_PIN 16 // TX2 / LCD_RS
+#define EXP1_06_PIN 21 // SCL / CS
+#define EXP1_07_PIN 5 // D6 / A0
+#define EXP1_08_PIN 6 // D7 / D4
+
+#define EXP2_01_PIN 50 // MISO
+#define EXP2_02_PIN 52 // SCK
+#define EXP2_03_PIN 42 // EN2
+#define EXP2_04_PIN 53 // SDSS
+#define EXP2_05_PIN 40 // EN1
+#define EXP2_06_PIN 51 // MOSI
+#define EXP2_07_PIN 38 // SD_DET
+#define EXP2_08_PIN -1 // RESET
+
+#define SDSS EXP2_04_PIN
#define LED_PIN 13
-#define PS_ON_PIN 12
-#define SUICIDE_PIN 54 // Must be enabled at startup to keep power flowing
-#define KILL_PIN -1
#if HAS_WIRED_LCD
- #define BEEPER_PIN 18
+ #define BEEPER_PIN EXP1_01_PIN
#if IS_NEWPANEL
#if ENABLED(MKS_MINI_12864)
- #define DOGLCD_A0 5
- #define DOGLCD_CS 21
- #define BTN_EN1 40
- #define BTN_EN2 42
+ #define DOGLCD_CS EXP1_06_PIN
+ #define DOGLCD_A0 EXP1_07_PIN
+ #define BTN_EN1 EXP2_05_PIN
+ #define BTN_EN2 EXP2_03_PIN
#elif ENABLED(FYSETC_MINI_12864)
// Disconnect EXP2-1 and EXP2-2, otherwise future firmware upload won't work.
- #define DOGLCD_A0 20
- #define DOGLCD_CS 17
+ #define DOGLCD_CS EXP1_03_PIN
+ #define DOGLCD_A0 EXP1_04_PIN
- #define NEOPIXEL_PIN 21
- #define BTN_EN1 42
- #define BTN_EN2 40
+ #define NEOPIXEL_PIN EXP1_06_PIN
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
- #define LCD_RESET_PIN 16
+ #define LCD_RESET_PIN EXP1_05_PIN
#define LCD_CONTRAST_INIT 220
#define LCD_BACKLIGHT_PIN -1
#else
- #define LCD_PINS_RS 20
- #define LCD_PINS_EN 17
- #define LCD_PINS_D4 16
- #define LCD_PINS_D5 21
- #define LCD_PINS_D6 5
- #define LCD_PINS_D7 6
- #define BTN_EN1 42
- #define BTN_EN2 40
+ #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
#endif
- #define BTN_ENC 19
- #define SD_DETECT_PIN 38
+ #define BTN_ENC EXP1_02_PIN
+ #define SD_DETECT_PIN EXP2_07_PIN
#else // !IS_NEWPANEL
- #define SHIFT_CLK_PIN 38
- #define SHIFT_LD_PIN 42
- #define SHIFT_OUT_PIN 40
- #define SHIFT_EN_PIN 17
+ #define SHIFT_CLK_PIN EXP2_07_PIN
+ #define SHIFT_LD_PIN EXP2_03_PIN
+ #define SHIFT_OUT_PIN EXP2_05_PIN
+ #define SHIFT_EN_PIN EXP1_03_PIN
- #define LCD_PINS_RS 16
- #define LCD_PINS_EN 5
- #define LCD_PINS_D4 6
- #define LCD_PINS_D5 21
- #define LCD_PINS_D6 20
- #define LCD_PINS_D7 19
+ #define LCD_PINS_RS EXP1_05_PIN
+ #define LCD_PINS_EN EXP1_07_PIN
+ #define LCD_PINS_D4 EXP1_08_PIN
+ #define LCD_PINS_D5 EXP1_06_PIN
+ #define LCD_PINS_D6 EXP1_04_PIN
+ #define LCD_PINS_D7 EXP1_02_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/mega/pins_GT2560_REV_A_PLUS.h b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
index a982a0e00e..a90c075be5 100644
--- a/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
+++ b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
@@ -30,8 +30,6 @@
#define BOARD_INFO_NAME "GT2560 Rev.A+"
-#include "pins_GT2560_REV_A.h"
+#define SERVO0_PIN 11
-#if DISABLED(BLTOUCH)
- #define SERVO0_PIN 32
-#endif
+#include "pins_GT2560_REV_A.h"
diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h
index b04962bbb3..b684214c69 100644
--- a/Marlin/src/pins/mega/pins_GT2560_V3.h
+++ b/Marlin/src/pins/mega/pins_GT2560_V3.h
@@ -33,6 +33,10 @@
#define ALLOW_MEGA1280
#include "env_validate.h"
+#if HOTENDS > 3 || E_STEPPERS > 3
+ #error "GT2560 supports up to 3 hotends / E steppers."
+#endif
+
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "GT2560 3.x"
#endif
@@ -91,7 +95,7 @@
#endif
//
-// Power Recovery
+// Power Loss Detection
//
#define POWER_LOSS_PIN 69 // Pin to detect power loss
#define POWER_LOSS_STATE LOW
@@ -164,17 +168,17 @@
#define BEEPER_PIN 18
#if ENABLED(YHCB2004)
- #ifndef YHCB2004_CLK
- #define YHCB2004_CLK 5
- #define DIO52 YHCB2004_CLK
+ #ifndef YHCB2004_MOSI_PIN
+ #define YHCB2004_MOSI_PIN 21
#endif
- #ifndef YHCB2004_MOSI
- #define YHCB2004_MOSI 21
- #define DIO50 YHCB2004_MOSI
+ #ifndef YHCB2004_MISO_PIN
+ #define YHCB2004_MISO_PIN 36
#endif
- #ifndef YHCB2004_MISO
- #define YHCB2004_MISO 36
- #define DIO51 YHCB2004_MISO
+ #ifndef YHCB2004_SCK_PIN
+ #define YHCB2004_SCK_PIN 5
+ #endif
+ #ifndef YHCB2004_SS_PIN
+ #define YHCB2004_SS_PIN SS
#endif
#elif HAS_WIRED_LCD
#ifndef LCD_PINS_RS
diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h
index cc33fd5f9e..2422dfdd73 100644
--- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h
+++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h
@@ -26,12 +26,16 @@
* ATmega2560
*/
-#define LCD_PINS_RS 5
-#define LCD_PINS_EN 36
-#define LCD_PINS_D4 21
-#define LCD_PINS_D7 6
+#if HAS_WIRED_LCD
+ #define LCD_PINS_RS 5
+ #define LCD_PINS_EN 36
+ #define LCD_PINS_D4 21
+ #define LCD_PINS_D7 6
+#endif
-#define SPEAKER // The speaker can produce tones
+#ifndef SPEAKER
+ #define SPEAKER // The speaker can produce tones
+#endif
#if IS_NEWPANEL
#define BTN_EN1 16
diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h
index ef1233f525..405a3aba5b 100644
--- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h
+++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h
@@ -28,12 +28,16 @@
#define BOARD_INFO_NAME "GT2560 4.x"
-#define LCD_PINS_RS 5
-#define LCD_PINS_EN 36
-#define LCD_PINS_D4 21
-#define LCD_PINS_D7 6
+#if HAS_WIRED_LCD
+ #define LCD_PINS_RS 5
+ #define LCD_PINS_EN 36
+ #define LCD_PINS_D4 21
+ #define LCD_PINS_D7 6
+#endif
-#define SPEAKER // The speaker can produce tones
+#ifndef SPEAKER
+ #define SPEAKER // The speaker can produce tones
+#endif
#if IS_NEWPANEL
#define BTN_EN1 16
diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h
index 512da02834..638465f3b9 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_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h
index 4eb7928825..a4bc98a147 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
diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h
index 19808817c9..688c147a68 100644
--- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h
+++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h
@@ -129,31 +129,60 @@
//
// 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
@@ -162,6 +191,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 7 // Pullup!
-#define SPINDLE_DIR_PIN 8
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 7 // Pullup!
+ #define SPINDLE_DIR_PIN 8
+#endif
diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h
index 0e2ac291b2..066b577c62 100644
--- a/Marlin/src/pins/mega/pins_MEGATRONICS.h
+++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h
@@ -130,6 +130,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 4 // Pullup!
-#define SPINDLE_DIR_PIN 11
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 4 // Pullup!
+ #define SPINDLE_DIR_PIN 11
+#endif
diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h
index d6840de8d0..ff118e7323 100644
--- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h
+++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h
@@ -122,9 +122,11 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 16 // Pullup!
-#define SPINDLE_DIR_PIN 11
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 16 // Pullup!
+ #define SPINDLE_DIR_PIN 11
+#endif
//
// LCD / Controller
diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
index 24d8d07983..22c14fc5e8 100644
--- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
+++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
@@ -146,39 +146,34 @@
//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN
//
-// FET Pin Mapping - FET 1 is closest to the input power connector
+// FET Pin Mapping - FET A is closest to the input power connector
//
-#define MOSFET_1_PIN 6 // Plug EX1 Pin 1-2 -> PH3 #15 -> Logical 06
-#define MOSFET_2_PIN 7 // Plug EX1 Pin 3-4 -> PH4 #16 -> Logical 07
-#define MOSFET_3_PIN 11 // Plug EX2 1-2 -> PB5 #24 -> Logical 11
-#define MOSFET_4_PIN 12 // Plug EX2 3-4 -> PB6 #25 -> Logical 12
-#define MOSFET_5_PIN 45 // Plug HBD 1-2 -> PL4 #39 -> Logical 45
-#define MOSFET_6_PIN 44 // Plug Extra 1-2 -> PL5 #40 -> Logical 44 (FET not soldered in all boards)
+#define MOSFET_A_PIN 6 // Plug EX1 Pin 1-2 -> PH3 #15 -> Logical 06
+#define MOSFET_B_PIN 11 // Plug EX2 1-2 -> PB5 #24 -> Logical 11
+#define MOSFET_C_PIN 45 // Plug HBD 1-2 -> PL4 #39 -> Logical 45
+#define MOSFET_D_PIN 7 // Plug EX1 Pin 3-4 -> PH4 #16 -> Logical 07
+#define MOSFET_E_PIN 12 // Plug EX2 3-4 -> PB6 #25 -> Logical 12
+#define MOSFET_F_PIN 44 // Plug Extra 1-2 -> PL5 #40 -> Logical 44 (FET not soldered in all boards)
//
// Heaters / Fans (24V)
//
-#define HEATER_0_PIN MOSFET_1_PIN // EX1
-#define HEATER_1_PIN MOSFET_3_PIN // EX2
-#define HEATER_BED_PIN MOSFET_5_PIN // HBP
+#define HEATER_0_PIN MOSFET_A_PIN // EX1
+#define HEATER_1_PIN MOSFET_B_PIN // EX2
+#define HEATER_BED_PIN MOSFET_C_PIN // HBP
-// EX1 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans)
#ifndef E0_AUTO_FAN_PIN
- #define E0_AUTO_FAN_PIN MOSFET_2_PIN
-#else
- #ifndef FAN0_PIN
- #define FAN0_PIN MOSFET_2_PIN
- #endif
+ #define E0_AUTO_FAN_PIN MOSFET_D_PIN
+#elif !defined(FAN0_PIN)
+ #define FAN0_PIN MOSFET_D_PIN
#endif
-// EX2 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans)
+
#ifndef E1_AUTO_FAN_PIN
- #define E1_AUTO_FAN_PIN MOSFET_4_PIN
-#else
- #ifndef FAN1_PIN
- #define FAN1_PIN MOSFET_4_PIN
- #endif
+ #define E1_AUTO_FAN_PIN MOSFET_E_PIN
+#elif !defined(FAN1_PIN)
+ #define FAN1_PIN MOSFET_E_PIN
#endif
//
@@ -192,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 1ae9e69af0..332d7d4cb4 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_PICA.h b/Marlin/src/pins/mega/pins_PICA.h
index 0541e1af58..0a6478439c 100644
--- a/Marlin/src/pins/mega/pins_PICA.h
+++ b/Marlin/src/pins/mega/pins_PICA.h
@@ -35,19 +35,14 @@
#include "env_validate.h"
+#if HOTENDS > 2 || E_STEPPERS > 2
+ #error "PICA supports up to 2 hotends / E steppers."
+#endif
+
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "PICA"
#endif
-/*
-// 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
//
@@ -132,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 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 47
- #define BTN_EN2 48
- #define BTN_ENC 31
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+ #define BTN_ENC EXP1_02_PIN
- #define LCD_SDSS 53
+ #define LCD_SDSS EXP2_04_PIN
#endif
diff --git a/Marlin/src/pins/mega/pins_WEEDO_62A.h b/Marlin/src/pins/mega/pins_WEEDO_62A.h
index d13de7ed30..436529cb35 100644
--- a/Marlin/src/pins/mega/pins_WEEDO_62A.h
+++ b/Marlin/src/pins/mega/pins_WEEDO_62A.h
@@ -25,7 +25,6 @@
* Copyright (c) 2019 WEEDO3D Perron
* ATmega2560
*/
-
#pragma once
#include "env_validate.h"
@@ -93,6 +92,7 @@
//
// LCD / Controller
//
+
#if HAS_WIRED_LCD
#define BEEPER_PIN 37
diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h
index e51e0f2e2e..199ddc3355 100644
--- a/Marlin/src/pins/pins_postprocess.h
+++ b/Marlin/src/pins/pins_postprocess.h
@@ -482,8 +482,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
@@ -492,7 +504,7 @@
#undef NEEDS_Z_MINMAX
//
-// Assign endstop pins for boards with only 3 connectors
+// Assign endstop pins, with handling for boards that have only 3 connectors
//
#ifdef X_STOP_PIN
#if X_HOME_TO_MIN
diff --git a/Marlin/src/pins/rambo/env_validate.h b/Marlin/src/pins/rambo/env_validate.h
index 84cf8392cd..ce2818f596 100644
--- a/Marlin/src/pins/rambo/env_validate.h
+++ b/Marlin/src/pins/rambo/env_validate.h
@@ -19,8 +19,11 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'"
#endif
+
+#endif
diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
index ced9c722f4..ada4885752 100644
--- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
+++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
@@ -118,10 +118,13 @@
//
#define TEMP_0_PIN 0 // Analog Input, Header J2
#define TEMP_1_PIN 1 // Analog Input, Header J3
-#define TEMP_BOARD_PIN 91 // Onboard thermistor, 100k TDK NTCG104LH104JT1
#define TEMP_BED_PIN 2 // Analog Input, Header J6
#define TEMP_PROBE_PIN 3 // Analog Input, Header J15
+#ifndef TEMP_BOARD_PIN
+ #define TEMP_BOARD_PIN 91 // Onboard thermistor, 100k TDK NTCG104LH104JT1
+#endif
+
//
// Heaters / Fans
//
@@ -186,10 +189,12 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-// use P1 connector for spindle pins
-#define SPINDLE_LASER_PWM_PIN EXP1_02_PIN // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 18 // Pullup!
-#define SPINDLE_DIR_PIN 19
+#if HAS_CUTTER
+ // Use P1 connector for spindle pins
+ #define SPINDLE_LASER_PWM_PIN EXP1_02_PIN // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 18 // Pullup!
+ #define SPINDLE_DIR_PIN 19
+#endif
//
// Průša i3 MK2 Multiplexer Support
@@ -203,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 10736d34a9..75d0974b0a 100644
--- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h
+++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h
@@ -153,10 +153,12 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-// use P1 connector for spindle pins
-#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 18 // Pullup!
-#define SPINDLE_DIR_PIN 19
+#if HAS_CUTTER
+ // Use P1 connector for spindle pins
+ #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 18 // Pullup!
+ #define SPINDLE_DIR_PIN 19
+#endif
//
// Průša i3 MK2 Multiplexer Support
@@ -167,9 +169,40 @@
#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
//
+
#if ANY(HAS_WIRED_LCD, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
#define KILL_PIN 32
@@ -177,26 +210,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/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h
index e2ad4e3815..f176efcc71 100644
--- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h
+++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h
@@ -126,10 +126,12 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-// use P1 connector for spindle pins
-#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 18 // Pullup!
-#define SPINDLE_DIR_PIN 19
+#if HAS_CUTTER
+ // Use P1 connector for spindle pins
+ #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 18 // Pullup!
+ #define SPINDLE_DIR_PIN 19
+#endif
//
// Průša i3 MK2 Multiplexer Support
@@ -145,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 9127e2360d..8ea3c15b46 100644
--- a/Marlin/src/pins/rambo/pins_RAMBO.h
+++ b/Marlin/src/pins/rambo/pins_RAMBO.h
@@ -168,9 +168,11 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_PWM_PIN 45 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 31 // Pullup!
-#define SPINDLE_DIR_PIN 32
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 45 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 31 // Pullup!
+ #define SPINDLE_DIR_PIN 32
+#endif
//
// SPI for MAX Thermocouple
@@ -197,6 +199,7 @@
//
// LCD / Controller
//
+
#if HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL
#define KILL_PIN 80
diff --git a/Marlin/src/pins/ramps/env_validate.h b/Marlin/src/pins/ramps/env_validate.h
index 6006a78f01..86d7bce16c 100644
--- a/Marlin/src/pins/ramps/env_validate.h
+++ b/Marlin/src/pins/ramps/env_validate.h
@@ -19,7 +19,8 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if ENABLED(ALLOW_SAM3X8E)
#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__)
@@ -33,3 +34,5 @@
#undef ALLOW_SAM3X8E
#undef REQUIRE_MEGA2560
+
+#endif
diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h
index d3064f43c0..3a2d7ea195 100644
--- a/Marlin/src/pins/ramps/pins_3DRAG.h
+++ b/Marlin/src/pins/ramps/pins_3DRAG.h
@@ -117,7 +117,7 @@
#define SPINDLE_LASER_PWM_PIN 46 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 62 // Pullup!
#define SPINDLE_DIR_PIN 48
- #elif !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use
+ #elif !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use
#define SPINDLE_LASER_ENA_PIN 16 // Pullup or pulldown!
#define SPINDLE_DIR_PIN 17
#if !NUM_SERVOS // Use servo connector if possible
@@ -131,6 +131,7 @@
//
// LCD / Controller
//
+
#if HAS_WIRED_LCD && IS_NEWPANEL
#undef BEEPER_PIN
diff --git a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
index f3439aa6bb..cf237fb9c1 100644
--- a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
+++ b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
@@ -37,9 +37,11 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 66 // Pullup or pulldown!
-#define SPINDLE_DIR_PIN 67
-#define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 66 // Pullup or pulldown!
+ #define SPINDLE_DIR_PIN 67
+#endif
//
// Temperature Sensors
diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
index 4a96d58fd9..08d4492ccb 100644
--- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
+++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
@@ -95,9 +95,11 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown!
-#define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
-#define SPINDLE_DIR_PIN 42
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown!
+ #define SPINDLE_DIR_PIN 42
+#endif
//
// Misc. Functions
@@ -126,4 +128,5 @@
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
#undef HEATER_BED_PIN
#define HEATER_BED_PIN 8
+ #define HEATER_BED_INVERTING true
#endif
diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h
index 90f46fe386..83045bdfe0 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 34bd29d19f..746de8581a 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 824dbd9f2d..640d938245 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 53
#define LED_PIN 13
#define KILL_PIN 41
@@ -201,80 +200,104 @@
#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
+// SD Card
+//
+
+#define SDSS EXP2_04_PIN
+#define SD_DETECT_PIN EXP2_07_PIN
+
+//
+// LCD / Controller
//
-#define SD_DETECT_PIN 49
#if ENABLED(FYSETC_242_OLED_12864)
- #define BTN_EN1 37
- #define BTN_EN2 29
- #define BTN_ENC 35
- #define BEEPER_PIN 31
+ #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 25
- #define LCD_PINS_RS 33
- #define DOGLCD_CS 16
- #define DOGLCD_MOSI 23
- #define DOGLCD_SCK 17
+ #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 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 +307,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_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h
index 04ee8740ae..abcffe484d 100644
--- a/Marlin/src/pins/ramps/pins_K8400.h
+++ b/Marlin/src/pins/ramps/pins_K8400.h
@@ -53,6 +53,11 @@
#define X_STOP_PIN 3
#define Y_STOP_PIN 14
+//
+// Fans
+//
+#define FAN0_PIN 8
+
#if ANY(BLTOUCH, TOUCH_MI_PROBE)
#define INVERTED_PROBE_STATE
#endif
diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h
index eacaf95b38..170401bf1c 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_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
index 63868f2e1d..9877877ffd 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
@@ -33,11 +33,6 @@
#define BOARD_INFO_NAME "MKS BASE 1.4"
#define MKS_BASE_VERSION 14
-//
-// Heaters / Fans
-//
-#define FAN0_PIN 9 // PH6 ** Pin18 ** PWM9
-
// Other Mods
#define SERVO3_PIN 12 // PB6 ** Pin25 ** D12
diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h
index 2b1b9fe047..b0f0866bc6 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h
@@ -34,8 +34,8 @@
//
// Heaters / Fans
//
- // Power outputs EFBF or EFBE
- #define MOSFET_D_PIN 7
+ #define MOSFET_B_PIN 7
+ #define FAN0_PIN 9
//
// M3/M4/M5 - Spindle/Laser Control
diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h
index 9afdc62a53..6ef77909d1 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_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
index 50b7eb395f..73e7aa577d 100644
--- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
+++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
@@ -37,14 +37,11 @@
//
// Heaters / Fans
//
-// Power outputs EFBF or EFBE
-#define MOSFET_D_PIN 7
-// Hotend, Hotend, Bed + Fan on D9
-#if FET_ORDER_EEB
- #define MOSFET_B_PIN 7
- #define FAN0_PIN 9
-#endif
+#define MOSFET_A_PIN 10 // HE0
+#define MOSFET_B_PIN 7 // HE1 or FAN Hotend Cooling
+#define MOSFET_C_PIN 8 // HBED
+#define FAN0_PIN 9 // FAN Part Cooling
//
// CS Pins wired to avoid conflict with the LCD
diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h
index d82c4353fd..931843de7c 100644
--- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h
+++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h
@@ -37,8 +37,8 @@
//
// Heaters / Fans
//
-// Power outputs EFBF or EFBE
-#define MOSFET_D_PIN 7
+#define MOSFET_B_PIN 7
+#define FAN0_PIN 9
//
// CS Pins wired to avoid conflict with the LCD
diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
index c2ab34c825..6cea92c15b 100644
--- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
+++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
@@ -37,8 +37,8 @@
//
// Heaters / Fans
//
-// Power outputs EFBF or EFBE
-#define MOSFET_D_PIN 7
+#define MOSFET_B_PIN 7
+#define FAN0_PIN 9
//
// CS Pins wired to avoid conflict with the LCD
diff --git a/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/src/pins/ramps/pins_ORTUR_4.h
index d2adf9971c..e8a87911d1 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 2dc77b0469..0195f3a1bc 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
//
@@ -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
@@ -273,12 +275,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 +296,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 +305,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
@@ -320,15 +322,15 @@
//
// TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
+#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 +358,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 +371,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 +384,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 +397,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 +451,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 +467,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 +478,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 +493,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,71 +525,75 @@
*/
#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
#endif
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
+//
+// 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 LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
@@ -602,12 +608,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 +637,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 +678,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 +713,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 +746,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 +843,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 +889,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 +908,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_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h
index 8c65b2e0b4..49a8c196d0 100644
--- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h
+++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h
@@ -57,6 +57,8 @@
#define CASE_LIGHT_PIN 65
#endif
+#define SERVO1_PIN 12
+
#include "pins_RAMPS.h"
#ifndef BEEPER_PIN
diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h
index 1296305706..fa24dd35b3 100644
--- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h
+++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h
@@ -113,6 +113,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 41 // Pullup or pulldown!
-#define SPINDLE_LASER_PWM_PIN 45 // Hardware PWM
-#define SPINDLE_DIR_PIN 43
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 45 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 41 // Pullup or pulldown!
+ #define SPINDLE_DIR_PIN 43
+#endif
diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h
index f93c6919d9..a7f5a79009 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_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h
index 7dad472a4e..9565adad2f 100644
--- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h
+++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h
@@ -219,16 +219,14 @@
//
// TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI 51
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO 50
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK 53
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI 51
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO 50
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK 53
#endif
//
@@ -246,13 +244,10 @@
#endif
#endif
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
+//
+// LCD / Controller
+//
-//
-// LCD Display output pins
-//
#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 b9038522ac..9a4a384e4a 100644
--- a/Marlin/src/pins/ramps/pins_RUMBA.h
+++ b/Marlin/src/pins/ramps/pins_RUMBA.h
@@ -53,9 +53,6 @@
#ifndef X_MIN_PIN
#define X_MIN_PIN 37
#endif
-#ifndef X_MIN_PIN
- #define X_MIN_PIN 37
-#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN 36
#endif
@@ -193,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_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
index e31696f06f..d3c921a5f6 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
@@ -119,7 +119,9 @@
// Chiron uses AUX header for Y and Z endstops
#define Y_STOP_PIN 42 // AUX (1)
#define Z_STOP_PIN 43 // AUX (2)
- #define Z2_MIN_PIN 18 // Z-
+ #ifndef Z2_STOP_PIN
+ #define Z2_STOP_PIN 18 // Z-
+ #endif
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 2 // X+
diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h
index 2eca360dec..ed4f373c54 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
@@ -152,16 +156,14 @@
//
// Default pins for TMC software SPI
//
-//#if ENABLED(TMC_USE_SW_SPI)
-// #ifndef TMC_SPI_MOSI
-// #define TMC_SPI_MOSI 66
-// #endif
-// #ifndef TMC_SPI_MISO
-// #define TMC_SPI_MISO 44
-// #endif
-// #ifndef TMC_SPI_SCK
-// #define TMC_SPI_SCK 64
-// #endif
+//#ifndef TMC_SPI_MOSI
+// #define TMC_SPI_MOSI 66
+//#endif
+//#ifndef TMC_SPI_MISO
+// #define TMC_SPI_MISO 44
+//#endif
+//#ifndef TMC_SPI_SCK
+// #define TMC_SPI_SCK 64
//#endif
//
@@ -211,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.
@@ -259,16 +261,52 @@
#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
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
+/** 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
+
+//
+// LCD / Controller
+//
#if HAS_WIRED_LCD
@@ -277,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)
@@ -371,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)
@@ -390,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)
@@ -399,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)
@@ -415,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
@@ -433,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)
@@ -449,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
@@ -469,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
@@ -500,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_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h
index 0f87e1fd10..b4eea9d488 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
@@ -162,6 +163,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
-#define SPINDLE_LASER_ENA_PIN 10 // Pullup!
-#define SPINDLE_DIR_PIN 11 // use the EXP3 PWM header
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 10 // Pullup!
+ #define SPINDLE_DIR_PIN 11 // use the EXP3 PWM header
+#endif
diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h
index 01fc6b416d..5cf143a09c 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 c928a1fb65..ee3d7f0185 100644
--- a/Marlin/src/pins/ramps/pins_VORON.h
+++ b/Marlin/src/pins/ramps/pins_VORON.h
@@ -29,14 +29,10 @@
#define BOARD_INFO_NAME "VORON Design v2"
-#define MOSFET_C_PIN 11
-
-#include "pins_RAMPS.h"
-
//
// Heaters / Fans
//
-#undef FAN0_PIN
+#define MOSFET_C_PIN 11
#define FAN0_PIN 5 // Using the pin for the controller fan since controller fan is always on.
#define CONTROLLER_FAN_PIN 8
@@ -50,7 +46,9 @@
#define E1_AUTO_FAN_PIN 6 // Servo pin 6 for E3D Fan (same pin for both extruders since it's the same fan)
#endif
+#include "pins_RAMPS.h"
+
//
-// LCDs and Controllers
+// LCD / Controller
//
#undef BEEPER_PIN
diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h
index 3fe77ecdc0..5eada31c9c 100644
--- a/Marlin/src/pins/ramps/pins_ZRIB_V52.h
+++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h
@@ -39,8 +39,6 @@
//
// Heaters / Fans
//
-#define HEATER_1_PIN 7
-#define FAN0_PIN 9 // PH6 ** Pin18 ** PWM9
#define FAN1_PIN 6
//
diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h
index fc8c9055b6..85420bdec3 100644
--- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h
+++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h
@@ -329,16 +329,16 @@
#define EXP2_08_PIN 41
#endif
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
+//
+// LCD / Controller
+//
#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_ENABLE (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_ENABLE
- #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/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h
index 6db4661bd8..f63ca83723 100644
--- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h
+++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h
@@ -183,16 +183,14 @@
//
// TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI 66
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO 44
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK 64
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI 66
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO 44
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK 64
#endif
#if HAS_TMC_UART
diff --git a/Marlin/src/pins/sam/env_validate.h b/Marlin/src/pins/sam/env_validate.h
index b1976075e2..c51583f0a1 100644
--- a/Marlin/src/pins/sam/env_validate.h
+++ b/Marlin/src/pins/sam/env_validate.h
@@ -19,7 +19,8 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if ALL(ALLOW_MEGA1280, ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__)
#error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'"
@@ -31,3 +32,5 @@
#undef ALLOW_MEGA1280
#undef ALLOW_MEGA2560
+
+#endif
diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h
index 87a1260c40..ceaeb8a587 100644
--- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h
+++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h
@@ -148,12 +148,12 @@
//
// LCD / Controller
//
+
#if IS_RRD_FG_SC
#define LCD_PINS_RS 18
#define LCD_PINS_EN 15
#define LCD_PINS_D4 19
#define BEEPER_PIN 64
- #undef UI_VOLTAGE_LEVEL
#define UI_VOLTAGE_LEVEL 1
#endif
diff --git a/Marlin/src/pins/sam/pins_ARCHIM1.h b/Marlin/src/pins/sam/pins_ARCHIM1.h
index a6ac53e5ec..e7530f981b 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 28b12d3437..31ed50194c 100644
--- a/Marlin/src/pins/sam/pins_ARCHIM2.h
+++ b/Marlin/src/pins/sam/pins_ARCHIM2.h
@@ -145,19 +145,17 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers.
+// SPI pins for TMC2130 stepper drivers.
// Required for the Archim2 board.
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI 28 // PD3
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO 26 // PD1
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK 27 // PD2
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI 28 // PD3
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO 26 // PD1
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK 27 // PD2
#endif
//
@@ -237,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 bd6cb7a6cd..66aa581271 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 41d43c0b04..b9f73adfe9 100644
--- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h
+++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h
@@ -69,7 +69,10 @@
#define TEMP_0_PIN 0 // Analog Input (HOTEND0 thermistor)
#define TEMP_1_PIN 2 // Analog Input (unused)
#define TEMP_BED_PIN 1 // Analog Input (BED thermistor)
-#define TEMP_BOARD_PIN 5 // Analog Input (OnBoard thermistor beta 3950)
+
+#ifndef TEMP_BOARD_PIN
+ #define TEMP_BOARD_PIN 5 // Analog Input (OnBoard thermistor beta 3950)
+#endif
// SPI for MAX Thermocouple
#if !HAS_MEDIA
@@ -100,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 74da7a78f6..bebe2b82a3 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 9a3edff0c9..4f713391fc 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 04a106526a..6b7bf51466 100644
--- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h
+++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h
@@ -45,21 +45,16 @@
#define BOARD_INFO_NAME "RAMPS Duo"
-#define ALLOW_SAM3X8E
-#include "../ramps/pins_RAMPS.h"
-
//
// Temperature Sensors
//
-#undef TEMP_0_PIN
#define TEMP_0_PIN 9 // Analog Input
-
-#undef TEMP_1_PIN
#define TEMP_1_PIN 11 // Analog Input
-
-#undef TEMP_BED_PIN
#define TEMP_BED_PIN 10 // Analog Input
+#define ALLOW_SAM3X8E
+#include "../ramps/pins_RAMPS.h"
+
// SPI for MAX Thermocouple
#undef TEMP_0_CS_PIN
#if !HAS_MEDIA
@@ -71,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 9c17be136b..2b9c8fd7eb 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)
@@ -164,8 +166,8 @@
//
// LCD / Controller
//
+
#if HAS_WIRED_LCD
- // ramps-fd lcd adaptor
#define BEEPER_PIN EXP1_01_PIN
@@ -181,8 +183,8 @@
#endif
#if ENABLED(FYSETC_MINI_12864)
- #define DOGLCD_CS LCD_PINS_EN
- #define DOGLCD_A0 LCD_PINS_RS
+ #define DOGLCD_CS EXP1_08_PIN
+ #define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h
index 2a0733c601..90e9b99697 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 64fad0e081..f083f01d4f 100644
--- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h
+++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h
@@ -195,27 +195,28 @@
* ------ ------
* 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
//
// 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 1b66b766db..fa27868ff9 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 8c5884b6a1..39061efb2d 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
//
@@ -164,18 +179,16 @@
#endif
//
-// TMC software SPI
+// TMC SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI 58 // Mega/Due:66 - AGCM4:58
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO 44
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK 56 // Mega/Due:64 - AGCM4:56
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI 58 // Mega/Due:66 - AGCM4:58
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO 44
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK 56 // Mega/Due:64 - AGCM4:56
#endif
#if HAS_TMC_UART
@@ -262,79 +275,233 @@
#define SDSS 53
#endif
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
+//
+// 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
-#if HAS_WIRED_LCD
+//
+// 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
+
+//
+// LCD / Controller
+//
+
+#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
@@ -343,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
//
@@ -357,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 DOGLCD_CS AUX4_05
+ #define DOGLCD_A0 AUX2_07
+ #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
- //#define BEEPER_PIN 33
- //#define STAT_LED_RED_PIN 32
- //#define STAT_LED_BLUE_PIN 35
+ #define BEEPER_PIN EXP2_05_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 39
+ #define BTN_EN1 22
+ #define BTN_EN2 7
+ #define BTN_ENC AUX4_08
- //#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
- //#define KILL_PIN 31
-
- //#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 BEEPER_PIN AUX2_08
+ #define LCD_BACKLIGHT_PIN AUX2_10
- //#define DOGLCD_A0 44
- //#define DOGLCD_CS 58 // Mega/Due:66 - AGCM4:58
+ #define DOGLCD_A0 AUX2_07
+ #define DOGLCD_CS AUX2_09
- //#define BTN_EN1 40
- //#define BTN_EN2 55 // Mega/Due:63 - AGCM4:55
- //#define BTN_ENC 72 // Mega/Due:59 - AGCM4:72
+ #define BTN_EN1 AUX2_06
+ #define BTN_EN2 AUX2_04
+ #define BTN_ENC AUX2_03
- //#define SD_DETECT_PIN 49
- //#define KILL_PIN 56 // Mega/Due:64 - AGCM4:56
-
- //#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
+
+ #elif ENABLED(G3D_PANEL)
+
+ #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
#else
- // Beeper on AUX-4
- //#define BEEPER_PIN 33
+ #define BEEPER_PIN EXP2_05_PIN
- // 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
+ #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
- // TO TEST
- //#define BTN_EN1 37
- //#define BTN_EN2 35
- //#define BTN_ENC 31
- #endif
-
- #if ENABLED(G3D_PANEL)
- // TO TEST
- //#define SD_DETECT_PIN 49
- //#define KILL_PIN 41
+ #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/env_validate.h b/Marlin/src/pins/sanguino/env_validate.h
index d229b6f102..bd7947f469 100644
--- a/Marlin/src/pins/sanguino/env_validate.h
+++ b/Marlin/src/pins/sanguino/env_validate.h
@@ -19,7 +19,8 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if ENABLED(ALLOW_MEGA644)
#if NOT_TARGET(__AVR_ATmega644__, __AVR_ATmega644P__, __AVR_ATmega1284P__)
@@ -40,3 +41,5 @@
#undef ALLOW_MEGA644
#undef ALLOW_MEGA644P
#undef REQUIRE_MEGA644P
+
+#endif
diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h
index b80031186f..b0780d5928 100644
--- a/Marlin/src/pins/sanguino/pins_ANET_10.h
+++ b/Marlin/src/pins/sanguino/pins_ANET_10.h
@@ -158,66 +158,124 @@
#define SDSS 31
#define LED_PIN -1
+/**
+ * Connector pinouts
+ *
+ * ------ ------ ----
+ * (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
+ */
+#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(_ALT_WIRING)?
+ * ANET_FULL_GRAPHICS_LCD
+ * ANET_FULL_GRAPHICS_LCD_ALT_WIRING
* 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
// 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(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
+
+ /**
+ * ANET_FULL_GRAPHICS_LCD_ALT_WIRING 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
@@ -233,11 +291,11 @@
* published by oderwat on Thingiverse at https://www.thingiverse.com/thing:2103748.
*
* Using that adapter requires changing the pin definition as follows:
- * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch
- * #define BEEPER_PIN 28
- * #define LCD_PINS_RS 30
- * #define LCD_PINS_EN 29
- * #define LCD_PINS_D4 17
+ * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch
+ * #define BEEPER_PIN 28
+ * #define LCD_PINS_RS 30
+ * #define LCD_PINS_EN 29
+ * #define LCD_PINS_D4 17
*
* The BLTouch pin becomes LCD:3
*/
diff --git a/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/src/pins/sanguino/pins_GEN6.h
index 75138845f4..4a6136e081 100644
--- a/Marlin/src/pins/sanguino/pins_GEN6.h
+++ b/Marlin/src/pins/sanguino/pins_GEN6.h
@@ -117,6 +117,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 5 // Pullup or pulldown!
-#define SPINDLE_LASER_PWM_PIN 16 // Hardware PWM
-#define SPINDLE_DIR_PIN 6
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 16 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 5 // Pullup or pulldown!
+ #define SPINDLE_DIR_PIN 6
+#endif
diff --git a/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/src/pins/sanguino/pins_GEN7_14.h
index 698bd06606..db80c45eee 100644
--- a/Marlin/src/pins/sanguino/pins_GEN7_14.h
+++ b/Marlin/src/pins/sanguino/pins_GEN7_14.h
@@ -118,6 +118,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 20 // Pullup or pulldown!
-#define SPINDLE_LASER_PWM_PIN 16 // Hardware PWM
-#define SPINDLE_DIR_PIN 21
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 16 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 20 // Pullup or pulldown!
+ #define SPINDLE_DIR_PIN 21
+#endif
diff --git a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h
index 3927250b15..154e26725f 100644
--- a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h
+++ b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h
@@ -134,6 +134,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 5 // Pullup or pulldown!
-#define SPINDLE_LASER_PWM_PIN 16 // Hardware PWM
-#define SPINDLE_DIR_PIN 6
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 16 // Hardware PWM
+ #define SPINDLE_LASER_ENA_PIN 5 // Pullup or pulldown!
+ #define SPINDLE_DIR_PIN 6
+#endif
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
index a561218180..1dd261feca 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
@@ -38,6 +38,50 @@
#define BOARD_INFO_NAME "Melzi (Creality)"
+/** ------
+ * 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 // BEEP
+#define EXP1_02_PIN 16 // ENC
+#define EXP1_03_PIN 11 // EN1
+#define EXP1_04_PIN -1 // RESET
+#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 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
+ #endif
+ #if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
+ #define DOGLCD_CS EXP1_07_PIN
+ #define DOGLCD_A0 EXP1_06_PIN
+ #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 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
@@ -45,108 +89,65 @@
#define BOARD_ST7920_DELAY_3 125
#endif
-//
-// LCD / Controller
-//
-#if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
- #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
- #define LCD_PINS_RS 28 // ST9720 CS
- #define LCD_PINS_EN 17 // ST9720 DAT
- #define LCD_PINS_D4 30 // ST9720 CLK
- #endif
- #if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
- #define DOGLCD_CS 28
- #define DOGLCD_A0 30
- #endif
-
- #define LCD_SDSS 31 // Controller's SD card
-
- #define BTN_ENC 16
- #define BTN_EN1 11
- #define BTN_EN2 10
- #define BEEPER_PIN 27
-
- #define LCD_PINS_DEFINED
-
-#endif
-
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
#if ENABLED(BLTOUCH)
#ifndef SERVO0_PIN
- #define SERVO0_PIN 27
- #endif
- #if SERVO0_PIN == BEEPER_PIN
- #undef BEEPER_PIN
+ #define SERVO0_PIN EXP1_01_PIN
#endif
#elif HAS_FILAMENT_SENSOR
#ifndef FIL_RUNOUT_PIN
- #define FIL_RUNOUT_PIN 27
- #endif
- #if FIL_RUNOUT_PIN == BEEPER_PIN
- #undef BEEPER_PIN
+ #define FIL_RUNOUT_PIN EXP1_01_PIN
#endif
#endif
-
-#if ENABLED(MINIPANEL)
- #undef DOGLCD_CS
- #define DOGLCD_CS LCD_PINS_RS
+#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
*/
-
-/**
- * EXP1 Connector EXP1 as CR10 STOCKDISPLAY
- * ------ ------
- * PA4 | 1 2 | PC0 BEEPER_PIN | 1 2 | BTN_ENC
- * PD3 | 3 4 | RESET BTN_EN1 | 3 4 | RESET
- * PD2 5 6 | PA1 BTN_EN2 5 6 | LCD_PINS_D4 (ST9720 CLK)
- * PA3 | 7 8 | PC1 (ST9720 CS) LCD_PINS_RS | 7 8 | LCD_PINS_EN (ST9720 DAT)
- * GND | 9 10 | 5V GND | 9 10 | 5V
- * ------ ------
- */
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
index 323ecaa029..dc1ea950a7 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 7e4cc22bbe..99cdfd0b42 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 2cd949e095..b48e77a5c3 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 05c3022994..bee2a30e44 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,26 @@
* 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 +172,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 +228,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 +261,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 +292,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 +319,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_SETHI.h b/Marlin/src/pins/sanguino/pins_SETHI.h
index 6c66988168..31d5585cc8 100644
--- a/Marlin/src/pins/sanguino/pins_SETHI.h
+++ b/Marlin/src/pins/sanguino/pins_SETHI.h
@@ -97,13 +97,8 @@
#define HEATER_0_PIN 4
#define HEATER_BED_PIN 3
-#ifndef FAN0_PIN
- #if GEN7_VERSION >= 13
- // Gen7 v1.3 removed the fan pin
- #define FAN0_PIN -1
- #else
- #define FAN0_PIN 31
- #endif
+#if !defined(FAN0_PIN) && GEN7_VERSION < 13 // Gen7 v1.3 removed the fan pin
+ #define FAN0_PIN 31
#endif
//
diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h
index 438acb79c7..ade9c08aa0 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/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h
index 820d56de1a..803b38c42d 100644
--- a/Marlin/src/pins/sensitive_pins.h
+++ b/Marlin/src/pins/sensitive_pins.h
@@ -24,44 +24,51 @@
//
// Prepare a list of protected pins for M42/M43
//
+#if HAS_X_AXIS
-#if PIN_EXISTS(X_MIN)
- #define _X_MIN X_MIN_PIN,
-#else
- #define _X_MIN
-#endif
-#if PIN_EXISTS(X_MAX)
- #define _X_MAX X_MAX_PIN,
-#else
- #define _X_MAX
-#endif
-#if PIN_EXISTS(X_CS) && AXIS_HAS_SPI(X)
- #define _X_CS X_CS_PIN,
-#else
- #define _X_CS
-#endif
-#if PIN_EXISTS(X_MS1)
- #define _X_MS1 X_MS1_PIN,
-#else
- #define _X_MS1
-#endif
-#if PIN_EXISTS(X_MS2)
- #define _X_MS2 X_MS2_PIN,
-#else
- #define _X_MS2
-#endif
-#if PIN_EXISTS(X_MS3)
- #define _X_MS3 X_MS3_PIN,
-#else
- #define _X_MS3
-#endif
-#if PIN_EXISTS(X_ENABLE)
- #define _X_ENABLE_PIN X_ENABLE_PIN,
-#else
- #define _X_ENABLE_PIN
-#endif
+ #if PIN_EXISTS(X_MIN)
+ #define _X_MIN X_MIN_PIN,
+ #else
+ #define _X_MIN
+ #endif
+ #if PIN_EXISTS(X_MAX)
+ #define _X_MAX X_MAX_PIN,
+ #else
+ #define _X_MAX
+ #endif
+ #if PIN_EXISTS(X_CS) && AXIS_HAS_SPI(X)
+ #define _X_CS X_CS_PIN,
+ #else
+ #define _X_CS
+ #endif
+ #if PIN_EXISTS(X_MS1)
+ #define _X_MS1 X_MS1_PIN,
+ #else
+ #define _X_MS1
+ #endif
+ #if PIN_EXISTS(X_MS2)
+ #define _X_MS2 X_MS2_PIN,
+ #else
+ #define _X_MS2
+ #endif
+ #if PIN_EXISTS(X_MS3)
+ #define _X_MS3 X_MS3_PIN,
+ #else
+ #define _X_MS3
+ #endif
+ #if PIN_EXISTS(X_ENABLE)
+ #define _X_ENABLE_PIN X_ENABLE_PIN,
+ #else
+ #define _X_ENABLE_PIN
+ #endif
-#define _X_PINS X_STEP_PIN, X_DIR_PIN, _X_ENABLE_PIN _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS
+ #define _X_PINS X_STEP_PIN, X_DIR_PIN, _X_ENABLE_PIN _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS
+
+#else
+
+ #define _X_PINS
+
+#endif
#if HAS_Y_AXIS
diff --git a/Marlin/src/pins/stm32f1/env_validate.h b/Marlin/src/pins/stm32f1/env_validate.h
index 2d325428ac..47399a062d 100644
--- a/Marlin/src/pins/stm32f1/env_validate.h
+++ b/Marlin/src/pins/stm32f1/env_validate.h
@@ -19,7 +19,8 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(__STM32F1__, STM32F1)
#if DISABLED(ALLOW_STM32F4)
@@ -30,3 +31,5 @@
#endif
#undef ALLOW_STM32F4
+
+#endif
diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h
index 06646e2e59..fb11bbe55f 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_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h
index ecf346e20a..f3b3f8fec7 100644
--- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h
+++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h
@@ -94,18 +94,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PB5
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PB4
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PB3
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PB5
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB4
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB3
#endif
#if HAS_TMC_UART
@@ -133,8 +131,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -175,6 +176,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)
@@ -250,13 +264,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
*
@@ -339,9 +353,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 44d4f23435..c345a27b76 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
@@ -46,5 +46,8 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
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 7e6798deaf..b16cedb5cd 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"
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 42c950d09f..eb043cbe30 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
@@ -124,16 +124,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
/**
@@ -291,14 +304,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:
*
@@ -330,9 +343,9 @@
#define DOGLCD_SCK PA2
#define DOGLCD_MOSI PA3
- #define BTN_ENC PA15
+ #define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_06_PIN
- #define BTN_EN2 PB15
+ #define BTN_EN2 EXP1_08_PIN
#define FORCE_SOFT_SPI
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 c46e87662e..d0bd2944bc 100644
--- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h
+++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h
@@ -68,16 +68,15 @@
#define E0_DIR_PIN PB0
#define E0_ENABLE_PIN PC4
-#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PB3
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PB4
- #endif
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PB5
- #endif
+// Shared with EXP2
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB3
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB4
+#endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PB5
#endif
#if HAS_TMC_UART // Shared with EXP1
@@ -94,8 +93,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Heaters / Fans
@@ -140,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
@@ -169,7 +172,7 @@
#define LCD_READ_ID 0xD3
#define LCD_USE_DMA_SPI
- #define TFT_BUFFER_SIZE 9600
+ #define TFT_BUFFER_WORDS 9600
#elif HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h
index 930b7cae6a..47b32176be 100644
--- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h
+++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h
@@ -100,7 +100,9 @@
#endif
// Reduce baud rate to improve software serial reliability
-#define TMC_BAUD_RATE 19200
+#ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+#endif
//
// Temperature Sensors
@@ -143,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_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h
index dcc5a5ac1c..e595801103 100644
--- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h
+++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h
@@ -119,14 +119,12 @@
#define SPI_FLASH
#if ENABLED(SPI_FLASH)
#define SPI_FLASH_SIZE 0x200000 // 2MB
+ #define SPI_FLASH_CS_PIN PB12
+ #define SPI_FLASH_SCK_PIN PB13
+ #define SPI_FLASH_MISO_PIN PB14
+ #define SPI_FLASH_MOSI_PIN PB15
#endif
-// SPI 2
-#define SPI_FLASH_CS_PIN PB12
-#define SPI_FLASH_MOSI_PIN PB15
-#define SPI_FLASH_MISO_PIN PB14
-#define SPI_FLASH_SCK_PIN PB13
-
//
// TFT with FSMC interface
//
@@ -159,7 +157,7 @@
#define HAS_LOGO_IN_FLASH 0
#elif ENABLED(TFT_COLOR_UI)
// Color UI
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#endif
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available
@@ -173,7 +171,7 @@
//
// SD Card
//
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SD_DETECT_PIN -1 // PF0, but it isn't connected
#define SDIO_CLOCK 4500000
#define SDIO_READ_RETRIES 16
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
index f7a73de284..058dcdf94f 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
@@ -25,6 +25,11 @@
* Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender-7
*/
+#if HAS_MULTI_HOTEND || E_STEPPERS > 1
+ #error "Creality 2.4.S1 V101 only supports 1 hotend / E stepper."
+ #define E_ERROR 1
+#endif
+
#define BOARD_INFO_NAME "Creality v2.4.S1 V101"
#define DEFAULT_MACHINE_NAME "Creality3D"
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
index d42ee738ee..a99143bad9 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
@@ -30,6 +30,7 @@
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "Creality v24S1 only supports 1 hotend / E stepper."
+ #define E_ERROR 1
#endif
#if ALL(BLTOUCH, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
@@ -88,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/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h
index cd232dcfbf..93be4978d3 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h
@@ -61,19 +61,16 @@
//
#define X_STOP_PIN PC4
#define Y_STOP_PIN PC5
+#define Z_STOP_PIN PC15
+//
+// Probe
+//
#if ENABLED(BLTOUCH)
- #define Z_STOP_PIN -1
#define SERVO0_PIN PC14 // BLTouch OUT PIN
- #ifndef Z_MIN_PROBE_PIN
- #define Z_MIN_PROBE_PIN PC15 // BLTouch IN PIN
- #endif
-#else
- #define Z_STOP_PIN PC15
- #if ENABLED(PROBE_ACTIVATION_SWITCH)
- #define PROBE_TARE_PIN PC14
- #define PROBE_ACTIVATION_SWITCH_PIN PB2
- #endif
+#elif ENABLED(PROBE_ACTIVATION_SWITCH)
+ #define PROBE_TARE_PIN PC14
+ #define PROBE_ACTIVATION_SWITCH_PIN PB2
#endif
//
@@ -127,7 +124,7 @@
#define SDCARD_CONNECTION ONBOARD
#define ON_BOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PC12 // SDSS
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
//
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
index f1459754b3..96b3007ca6 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
@@ -27,7 +27,7 @@
#include "env_validate.h"
-#if HAS_MULTI_HOTEND || E_STEPPERS > 1
+#if !E_ERROR && (HAS_MULTI_HOTEND || E_STEPPERS > 1)
#error "Creality v4 only supports 1 hotend / E stepper."
#endif
@@ -159,7 +159,7 @@
//
#define SD_DETECT_PIN PC7
#define SDCARD_CONNECTION ONBOARD
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
@@ -299,11 +299,3 @@
#define UART4_RX_PIN PC11 // default uses sdcard SDIO_D3
#define UART5_TX_PIN PC12 // default uses sdcard SDIO_CK
#define UART5_RX_PIN PD2 // default uses sdcard SDIO_CMD
-
-// SDIO pins
-#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
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
index cdf2864ef8..2e0de87641 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
@@ -140,7 +140,7 @@
#define SDCARD_CONNECTION ONBOARD
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PA4 // SDSS
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h
index 2d9b9f38f5..a225fe11be 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h
@@ -27,10 +27,6 @@
#include "env_validate.h"
-#if HAS_MULTI_HOTEND || E_STEPPERS > 1
- #error "Creality v4.2.5 only supports 1 hotend / E stepper."
-#endif
-
#define BOARD_INFO_NAME "Creality V4.2.5"
#define DEFAULT_MACHINE_NAME "CR200B"
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h
index a9ff02d1f4..d592b4808a 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h
@@ -105,7 +105,7 @@
#define SD_DETECT_PIN PC7
#define NO_SD_HOST_DRIVE // SD is only seen by the printer
-#define SDIO_SUPPORT // Extra added by Creality
+#define ONBOARD_SDIO // Extra added by Creality
#define SDIO_CLOCK 6000000 // In original source code overridden by Creality in sdio.h
//
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
index 099d4a54c6..2660b6e505 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
@@ -135,7 +135,7 @@
#define FAN0_PIN PB14 // FAN
#define FAN1_PIN PB12 // FAN
-#define FAN_SOFT_PWM
+#define FAN_SOFT_PWM_REQUIRED
//
// SD Card
@@ -144,7 +144,7 @@
#define SDCARD_CONNECTION ONBOARD
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PC11 // SDSS
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
@@ -219,8 +219,3 @@
#endif
#endif
-
-// DGUS LCDs
-#if HAS_DGUS_LCD
- #define LCD_SERIAL_PORT 3
-#endif
diff --git a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h
index 5a4c4caa8d..b18bd09de8 100644
--- a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h
+++ b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h
@@ -152,15 +152,18 @@
//
// Temperature Sensors
//
-#define TEMP_BOARD_PIN PC3
-#ifndef TEMP_SENSOR_BOARD
- #define TEMP_SENSOR_BOARD 13
-#endif
#define TEMP_BED_PIN PC2 // TB
#define TEMP_0_PIN PC1 // TH1
//#define TEMP_1_PIN PC3 // TH2
#define FIL_RUNOUT_PIN PA10 // MT_DET
+#ifndef TEMP_BOARD_PIN
+ #define TEMP_BOARD_PIN PC3
+#endif
+#if TEMP_BOARD_PIN == PC3 && TEMP_SENSOR_BOARD != 13
+ #warning "The built-in TEMP_SENSOR_BOARD is 13 for ERYONE Ery32 mini."
+#endif
+
//
// LCD Pins
//
diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
index 6572a84b04..941f9dd183 100644
--- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
+++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
@@ -132,7 +132,9 @@
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN PC7 // IO1
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
#else
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_XY_PIN PA6 // VREF2/3 CONTROL XY
@@ -173,7 +175,6 @@
#if AXIS_DRIVER_TYPE_E0(TMC2208) || AXIS_DRIVER_TYPE_E0(TMC2209)
#define E0_SERIAL_TX_PIN PA8 // IO0
#define E0_SERIAL_RX_PIN PA8 // IO0
- #define TMC_BAUD_RATE 19200
#else
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_E_PIN PB0 // VREF1 CONTROL E
@@ -260,7 +261,7 @@
#define SD_SS_PIN -1
#define SD_DETECT_PIN PD12 // SD_CD (if -1 no detection)
#else
- #define SDIO_SUPPORT
+ #define ONBOARD_SDIO
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SDIO_READ_RETRIES 16
#define ONBOARD_SPI_DEVICE 1 // SPI1
@@ -271,6 +272,7 @@
//
// LCD / Controller
//
+
#ifndef BEEPER_PIN
#define BEEPER_PIN PC5
#endif
@@ -314,7 +316,7 @@
#define TFT_BTARROWS_COLOR 0xDEE6 // Yellow
#define TFT_BTOKMENU_COLOR 0x145F // Cyan
#endif
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#elif HAS_GRAPHICAL_TFT
diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h
index 1dffc97282..e31d11f408 100644
--- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h
+++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h
@@ -83,16 +83,14 @@
#define E0_CS_PIN PC2
#endif
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI EXP2_06_PIN
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO EXP2_01_PIN
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK EXP2_02_PIN
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI EXP2_06_PIN
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO EXP2_01_PIN
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK EXP2_02_PIN
#endif
#if HAS_TMC_UART
@@ -152,6 +150,7 @@
//
// LCD / Controller
//
+
#if HAS_WIRED_LCD
#define SPI_DEVICE 2 // Maple
diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h
index 9d65a974ce..93ef7b75d4 100644
--- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h
+++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h
@@ -118,8 +118,11 @@
#endif
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Stepper current PWM
diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h
index 120d6d6f0a..96e90b701c 100644
--- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h
+++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h
@@ -55,5 +55,8 @@
#define E0_SERIAL_RX_PIN PA3
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
index b97ccc8ec7..94c6dc2bfa 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 4bb8c5dee6..5f66f9bc3b 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 57abf7aca7..9f7efa99c4 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 34f7dba91f..3f6ae1414b 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_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h
index a1ebd86e86..b913532fbb 100644
--- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h
+++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h
@@ -152,7 +152,7 @@
#define DOGLCD_SCK -1
// Buffer for Color UI
- #define TFT_BUFFER_SIZE 3200
+ #define TFT_BUFFER_WORDS 3200
#endif
#if defined(TFT_BACKLIGHT_PWM) && !defined(MAPLE_STM32F1)
@@ -160,7 +160,7 @@
#define LCD_BRIGHTNESS_DEFAULT TFT_BACKLIGHT_PWM
#endif
-#if ENABLED(SDIO_SUPPORT)
+#if ENABLED(ONBOARD_SDIO)
#define SD_SS_PIN -1 // else SDSS set to PA4 in M43 (spi_pins.h)
#endif
diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h
index bff8abddad..233d6f1d37 100644
--- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h
+++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h
@@ -120,7 +120,7 @@
#define SDCARD_CONNECTION ONBOARD
#endif
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SDIO_READ_RETRIES 16
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
index 2230cf8ad7..20df1b8c5c 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
@@ -184,7 +184,7 @@
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#endif
#if NEED_TOUCH_PINS
@@ -199,10 +199,10 @@
// SPI1(PA7) & SPI3(PB5) not available
#define SPI_DEVICE 2 // Maple
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SDIO_CLOCK 4500000
#define SDIO_READ_RETRIES 16
-#if ENABLED(SDIO_SUPPORT)
+#if ENABLED(ONBOARD_SDIO)
#define SD_SCK_PIN PB13 // SPI2
#define SD_MISO_PIN PB14 // SPI2
#define SD_MOSI_PIN PB15 // SPI2
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h
index 51ea58ff33..6d88897332 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h
@@ -50,18 +50,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_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
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PB15
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB14
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB13
#endif
#include "pins_MKS_ROBIN_E3_common.h"
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
index df42e8aeb1..89fda7ab67 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
@@ -50,18 +50,17 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
+// Software and hardware actually, they are connected to SPI2 bus.
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_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
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PB15
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB14
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB13
#endif
#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
index 6111c8e7f8..b4cec047d1 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
@@ -112,18 +112,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PD14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PD1
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PD0
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PD14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PD1
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PD0
#endif
#if HAS_TMC_UART
@@ -158,7 +156,10 @@
#define E0_SERIAL_RX_PIN PD9
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
#endif // HAS_TMC_UART
//
@@ -241,7 +242,7 @@
#endif
#if SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT
+ #define ONBOARD_SDIO
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SD_DETECT_PIN PD12
#define ONBOARD_SD_CS_PIN PC11
@@ -264,6 +265,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
@@ -294,27 +306,16 @@
#define LCD_USE_DMA_SPI
-#endif
+#elif HAS_WIRED_LCD
-#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_SIZE 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
+
+ #define LCD_PINS_EN EXP1_03_PIN
+ #define LCD_PINS_RS EXP1_04_PIN
#if ENABLED(MKS_MINI_12864)
@@ -355,7 +356,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
@@ -373,10 +374,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
@@ -386,10 +391,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 ebf3d44a83..4cf83765f2 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
@@ -112,8 +112,11 @@
#define E0_SERIAL_RX_PIN PC11
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Heaters 0,1 / Fans / Bed
@@ -210,7 +213,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
@@ -224,7 +227,7 @@
#endif
- #endif // !MKS_MINI_12864
+ #endif // !FYSETC_MINI_12864_2_1
#endif // HAS_WIRED_LCD
@@ -254,7 +257,7 @@
#define ONBOARD_SPI_DEVICE 2
#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 10ddc76a01..50e2419018 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_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
index 858b7a387b..b39a2660b2 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
@@ -133,7 +133,7 @@
#define SDCARD_CONNECTION ONBOARD
#endif
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SD_DETECT_PIN PD12
#define ONBOARD_SPI_DEVICE 1 // SPI1
@@ -149,31 +149,32 @@
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
-#if ANY(HAS_FSMC_GRAPHICAL_TFT, TFT_320x240)
- #define FSMC_CS_PIN PD7 // NE4
- #define FSMC_RS_PIN PD11 // A0
+#if HAS_FSMC_TFT
- #define TFT_CS_PIN FSMC_CS_PIN
- #define TFT_RS_PIN FSMC_RS_PIN
+ #define TFT_CS_PIN PD7 // NE4
+ #define TFT_RS_PIN PD11 // A0
+ #define LCD_RESET_PIN PC6 // FSMC_RST
+ #define LCD_BACKLIGHT_PIN PD13
+
+ #define FSMC_CS_PIN TFT_CS_PIN // NE4
+ #define FSMC_RS_PIN TFT_RS_PIN // A0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
- #define LCD_RESET_PIN PC6 // FSMC_RST
- #define LCD_BACKLIGHT_PIN PD13
-#endif
+ #if NEED_TOUCH_PINS
+ #define TOUCH_CS_PIN PC2 // SPI2_NSS
+ #define TOUCH_SCK_PIN PB13 // SPI2_SCK
+ #define TOUCH_MISO_PIN PB14 // SPI2_MISO
+ #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
+ #endif
-#if ALL(NEED_TOUCH_PINS, HAS_FSMC_GRAPHICAL_TFT) || ENABLED(TFT_320x240)
- #define TOUCH_CS_PIN PC2 // SPI2_NSS
- #define TOUCH_SCK_PIN PB13 // SPI2_SCK
- #define TOUCH_MISO_PIN PB14 // SPI2_MISO
- #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif
#if ENABLED(TFT_320x240) // TFT32/28
#define TFT_DRIVER ILI9341
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#define ILI9341_COLOR_RGB
// YV for normal screen mounting
#define ILI9341_ORIENTATION ILI9341_MADCTL_MY | ILI9341_MADCTL_MV
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 55ceac4c80..b83a52a173 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
@@ -122,18 +122,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PD14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PD1
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PD0
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PD14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PD1
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PD0
#endif
#if HAS_TMC_UART
@@ -165,7 +163,10 @@
#define E1_SERIAL_RX_PIN PD8
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
#endif // HAS_TMC_UART
//
@@ -241,19 +242,47 @@
#endif
#if SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT
+ #define ONBOARD_SDIO
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SD_DETECT_PIN PD12
#define ONBOARD_SD_CS_PIN PC11
#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
//
@@ -264,29 +293,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
@@ -294,27 +334,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_SIZE 14400
-#endif
+ #define BEEPER_PIN EXP1_01_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 BTN_ENC EXP1_02_PIN
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #define LCD_PINS_EN EXP1_03_PIN
+ #define LCD_PINS_RS EXP1_04_PIN
#if ENABLED(MKS_MINI_12864)
@@ -323,18 +352,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
@@ -342,26 +371,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
@@ -375,7 +404,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
@@ -389,7 +418,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_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h
index b2a301381d..2b5014096e 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h
@@ -163,7 +163,7 @@
#define SDCARD_CONNECTION ONBOARD
#endif
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SD_DETECT_PIN PD12
#define ONBOARD_SD_CS_PIN PC11
@@ -205,7 +205,7 @@
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#endif
#define SPI_FLASH
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
index 82737a9ee8..ad4e45c70f 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"
@@ -104,19 +105,18 @@
#ifndef E2_CS_PIN
#define E2_CS_PIN PG9
#endif
+
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_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
+#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
@@ -206,19 +206,101 @@
#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 SDIO_SUPPORT
+ #define ONBOARD_SDIO
#define SD_DETECT_PIN PD12
#define ONBOARD_SD_CS_PIN PC11
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#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
//
@@ -231,31 +313,31 @@
#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_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
+ #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_SIZE 14400
+ #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
@@ -266,30 +348,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
#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
@@ -297,9 +379,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/stm32f1/pins_ORCA_3D_SPRINGER.h b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h
new file mode 100644
index 0000000000..a376feb93a
--- /dev/null
+++ b/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h
@@ -0,0 +1,342 @@
+/**
+ * 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 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
+
+ #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/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h
index ccd4b1b171..33440e30dd 100644
--- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h
+++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h
@@ -88,18 +88,16 @@
#define E0_DIR_PIN PB14
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PB5
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PB4
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PB3
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PB5
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB4
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB3
#endif
#if HAS_TMC_UART
@@ -127,8 +125,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -167,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_SOVOL_V131.h b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h
deleted file mode 100644
index 97ba7f7fec..0000000000
--- a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * Marlin 3D Printer Firmware
- * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- *
- * Based on Sprinter and grbl.
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- */
-#pragma once
-
-/**
- * Sovol 1.3.1 (GD32F103RET6) board pin assignments
- */
-
-#include "env_validate.h"
-
-#if HOTENDS > 1 || E_STEPPERS > 1
- #error "SOVOL V131 only supports 1 hotend / E-stepper."
-#endif
-
-#ifndef BOARD_INFO_NAME
- #define BOARD_INFO_NAME "Sovol V131"
-#endif
-#ifndef DEFAULT_MACHINE_NAME
- #define DEFAULT_MACHINE_NAME "Sovol SV06"
-#endif
-
-//#define BOARD_NO_NATIVE_USB
-
-//
-// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
-//
-#ifndef DISABLE_DEBUG
- #define DISABLE_DEBUG
-#endif
-
-//
-// EEPROM
-//
-#if NO_EEPROM_SELECTED
- #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
- //#define SDCARD_EEPROM_EMULATION
- #undef NO_EEPROM_SELECTED
-#endif
-
-#if ENABLED(IIC_BL24CXX_EEPROM)
- #define IIC_EEPROM_SDA PA11
- #define IIC_EEPROM_SCL PA12
- #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
-#elif ENABLED(SDCARD_EEPROM_EMULATION)
- #define MARLIN_EEPROM_SIZE 0x800 // 2K
-#endif
-
-//
-// Servos
-//
-#ifndef SERVO0_PIN
- #ifndef HAS_PIN_27_BOARD
- #define SERVO0_PIN PB0 // BLTouch OUT
- #else
- #define SERVO0_PIN PC6
- #endif
-#endif
-
-//
-// Limit Switches
-//
-#ifndef X_STOP_PIN
- #define X_STOP_PIN PA5
-#endif
-#ifndef Y_STOP_PIN
- #define Y_STOP_PIN PA6
-#endif
-#ifndef Z_STOP_PIN
- #define Z_STOP_PIN PA7
-#endif
-
-#ifndef Z_MIN_PROBE_PIN
- #define Z_MIN_PROBE_PIN PB1 // BLTouch IN
-#endif
-
-//
-// Filament Runout Sensor
-//
-#ifndef FIL_RUNOUT_PIN
- #define FIL_RUNOUT_PIN PA4 // "Pulled-high"
-#endif
-
-//
-// Steppers
-//
-#ifndef X_STEP_PIN
- #define X_STEP_PIN PC2
-#endif
-#ifndef X_DIR_PIN
- #define X_DIR_PIN PB9
-#endif
-#define X_ENABLE_PIN PC3 // Shared
-
-#ifndef Y_STEP_PIN
- #define Y_STEP_PIN PB8
-#endif
-#ifndef Y_DIR_PIN
- #define Y_DIR_PIN PB7
-#endif
-#define Y_ENABLE_PIN X_ENABLE_PIN
-
-#ifndef Z_STEP_PIN
- #define Z_STEP_PIN PB6
-#endif
-#ifndef Z_DIR_PIN
- #define Z_DIR_PIN PB5
-#endif
-#define Z_ENABLE_PIN X_ENABLE_PIN
-
-#ifndef E0_STEP_PIN
- #define E0_STEP_PIN PB4
-#endif
-#ifndef E0_DIR_PIN
- #define E0_DIR_PIN PB3
-#endif
-#define E0_ENABLE_PIN X_ENABLE_PIN
-
-#if HAS_TMC_UART
-
- /**
- * TMC2208/TMC2209 stepper drivers
- *
- * Hardware serial communication ports.
- * If undefined software serial is used according to the pins below
- */
-
- #define X_SERIAL_TX_PIN PC1
- #define X_SERIAL_RX_PIN PC1
-
- #define Y_SERIAL_TX_PIN PC0
- #define Y_SERIAL_RX_PIN PC0
-
- #define Z_SERIAL_TX_PIN PA15
- #define Z_SERIAL_RX_PIN PA15
-
- #define E0_SERIAL_TX_PIN PC14
- #define E0_SERIAL_RX_PIN PC14
-
- // Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-
-#endif // HAS_TMC_UART
-
-//
-// Temperature Sensors
-//
-#define TEMP_0_PIN PC5 // TH1
-#define TEMP_BED_PIN PC4 // TB1
-
-//
-// Heaters / Fans
-//
-#ifndef HEATER_0_PIN
- #define HEATER_0_PIN PA1 // HEATER1
-#endif
-#ifndef HEATER_BED_PIN
- #define HEATER_BED_PIN PA2 // HOT BED
-#endif
-#ifndef FAN0_PIN
- #define FAN0_PIN PA0 // FAN
-#endif
-#define FAN_SOFT_PWM_REQUIRED
-
-//
-// SD Card
-//
-#define SD_DETECT_PIN PC7
-#define SDCARD_CONNECTION ONBOARD
-#define ONBOARD_SPI_DEVICE 1
-#define ONBOARD_SD_CS_PIN PA4 // SDSS
-#define SDIO_SUPPORT
-#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
-
-#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
- /**
- * RET6 12864 LCD
- * ------
- * PC6 | 1 2 | PB2
- * PB10 | 3 4 | PB11
- * PB14 5 6 | PB13
- * PB12 | 7 8 | PB15
- * GND | 9 10 | 5V
- * ------
- */
- #define EXP3_01_PIN PC6
- #define EXP3_02_PIN PB2
- #define EXP3_03_PIN PB10
- #define EXP3_04_PIN PB11
- #define EXP3_05_PIN PB14
- #define EXP3_06_PIN PB13
- #define EXP3_07_PIN PB12
- #define EXP3_08_PIN PB15
-#endif
-
-#if ENABLED(CR10_STOCKDISPLAY)
-
- #if ENABLED(RET6_12864_LCD)
-
- #define LCD_PINS_RS EXP3_07_PIN
- #define LCD_PINS_EN EXP3_08_PIN
- #define LCD_PINS_D4 EXP3_06_PIN
-
- #define BTN_ENC EXP3_02_PIN
- #define BTN_EN1 EXP3_03_PIN
- #define BTN_EN2 EXP3_05_PIN
-
- #ifndef HAS_PIN_27_BOARD
- #define BEEPER_PIN EXP3_01_PIN
- #endif
-
- #else
-
- #error "Only the RET6_12864_LCD variant of CR10_STOCKDISPLAY is supported."
-
- #endif
-
-#endif
diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
index 174458f1b0..a62bc535db 100644
--- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
+++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
@@ -188,7 +188,7 @@
// SPI1(PA7) & SPI3(PB5) not available
#define SPI_DEVICE 2 // Maple
-#if ENABLED(SDIO_SUPPORT)
+#if ENABLED(ONBOARD_SDIO)
#define SD_SCK_PIN PB13 // SPI2 ok
#define SD_MISO_PIN PB14 // SPI2 ok
#define SD_MOSI_PIN PB15 // SPI2 ok
diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
index 8997a5f1db..c1e5a46f70 100644
--- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
+++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
@@ -190,6 +190,7 @@
#define Z2_DIR_PIN PD0
#endif
+// TODO: Use different pin names for auto-remapping
#ifdef OPTION_Z2_ENDSTOP
#define Z2_MIN_PIN PD1
#define Z2_MAX_PIN PB12
@@ -277,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/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
index b60cca831b..24c7404360 100644
--- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
+++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
@@ -156,6 +156,7 @@
#define Y_MAX_PIN PB14
#define Z_MAX_PIN PB13
+// TODO: Use different pin names for auto-remapping
#ifdef OPTION_Z2_ENDSTOP
#define Z2_MIN_PIN PD1
#define Z2_MAX_PIN PB12
diff --git a/Marlin/src/pins/stm32f4/env_validate.h b/Marlin/src/pins/stm32f4/env_validate.h
index c01401f06c..91adbfc869 100644
--- a/Marlin/src/pins/stm32f4/env_validate.h
+++ b/Marlin/src/pins/stm32f4/env_validate.h
@@ -19,10 +19,13 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(STM32F4) && (DISABLED(ALLOW_STM32DUINO) || NOT_TARGET(STM32F4xx))
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#endif
#undef ALLOW_STM32DUINO
+
+#endif
diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h
index bd8a2d9762..c2b2512f4a 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
@@ -195,7 +196,7 @@
//
// SD Card
//
-//#define SDIO_SUPPORT
+//#define ONBOARD_SDIO
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION CUSTOM_CABLE
@@ -203,7 +204,7 @@
#if HAS_MEDIA
- #if DISABLED(SDIO_SUPPORT)
+ #if DISABLED(ONBOARD_SDIO)
#define SOFTWARE_SPI
#define SDSS PC11
#define SD_SS_PIN SDSS
diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h
index 390981e606..b466122638 100644
--- a/Marlin/src/pins/stm32f4/pins_ARMED.h
+++ b/Marlin/src/pins/stm32f4/pins_ARMED.h
@@ -223,5 +223,8 @@
#define Z2_SERIAL_RX_PIN EXT4_PIN
#define Z2_SERIAL_TX_PIN EXT4_PIN
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h
index 02ad9bb4ad..502ec19bed 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_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h
index a4af3f8fe3..025a1fc9f1 100644
--- a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h
+++ b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h
@@ -145,8 +145,8 @@
#endif
#if SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT // Use SDIO for onboard SD
- #if DISABLED(SDIO_SUPPORT)
+ #define ONBOARD_SDIO // Use SDIO for onboard SD
+ #if DISABLED(ONBOARD_SDIO)
#define SOFTWARE_SPI // Use soft SPI for onboard SD
#define SDSS PC11
#define SD_SCK_PIN PC12
diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
index b9c4cb07da..2abbf3452b 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
@@ -108,18 +108,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_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
+#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
@@ -154,18 +152,24 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
//
#define TEMP_0_PIN PA2 // T0 <-> E0
#define TEMP_1_PIN PA0 // T1 <-> E1
-#define TEMP_BOARD_PIN PC2 // Onboard thermistor, NTC100K
#define TEMP_BED_PIN PA1 // T2 <-> Bed
#define TEMP_PROBE_PIN PC3 // Shares J4 connector with PD1
+#ifndef TEMP_BOARD_PIN
+ #define TEMP_BOARD_PIN PC2 // Onboard thermistor, NTC100K
+#endif
+
//
// Heaters / Fans
//
@@ -234,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_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
index 6b8b1476ae..271b7d9cfe 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
@@ -135,8 +135,11 @@
#endif
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -183,9 +186,7 @@
#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)
@@ -194,20 +195,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)
@@ -251,24 +260,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
@@ -310,7 +319,7 @@
* EXP1-1 ----------- EXP1-7 SD_DET
*/
- #define TFTGLCD_CS PE7
+ #define TFTGLCD_CS EXP1_03_PIN
#endif
@@ -367,10 +376,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
@@ -383,7 +392,7 @@
#endif
#if SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT // Use SDIO for onboard SD
+ #define ONBOARD_SDIO // Use SDIO for onboard SD
//#define SDIO_CLOCK 48000000
#define SD_DETECT_PIN PC4
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
index 2832ee473b..7e021c534e 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
@@ -106,11 +106,21 @@
// Pins on the extender
//
#if ENABLED(M5_EXTENDER)
- #define X2_STOP_PIN PI4 // M5 M1_STOP
- #define Y2_STOP_PIN PF12 // M5 M5_STOP
- #define Z2_STOP_PIN PF4 // M5 M2_STOP
- #define Z3_STOP_PIN PI7 // M5 M4_STOP
- #define Z4_STOP_PIN PF6 // M5 M3_STOP
+ #ifndef X2_STOP_PIN
+ #define X2_STOP_PIN PI4 // M5 M1_STOP
+ #endif
+ #ifndef Y2_STOP_PIN
+ #define Y2_STOP_PIN PF12 // M5 M5_STOP
+ #endif
+ #ifndef Z2_STOP_PIN
+ #define Z2_STOP_PIN PF4 // M5 M2_STOP
+ #endif
+ #ifndef Z3_STOP_PIN
+ #define Z3_STOP_PIN PI7 // M5 M4_STOP
+ #endif
+ #ifndef Z4_STOP_PIN
+ #define Z4_STOP_PIN PF6 // M5 M3_STOP
+ #endif
#endif
#ifndef Z_MIN_PROBE_PIN
@@ -202,18 +212,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PG15
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PB6
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PB3
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PG15
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB6
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB3
#endif
#if HAS_TMC_UART
@@ -274,8 +282,11 @@
#endif
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -392,8 +403,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 ce3177cd51..2eae84f1ab 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
@@ -164,6 +164,11 @@
#define POWER_LOSS_PIN PC0 // PWRDET
#endif
+//
+// Misc. Functions
+//
+#define LED_PIN PA13
+
//
// Steppers
//
@@ -260,18 +265,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PA7
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PA6
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PA5
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PA7
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PA6
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PA5
#endif
#if HAS_TMC_UART
@@ -318,8 +321,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
/** ------ ------
* (BEEPER) PE8 | 1 2 | PE7 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
@@ -353,7 +359,7 @@
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
//
#if SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT // Use SDIO for onboard SD
+ #define ONBOARD_SDIO // Use SDIO for onboard SD
#ifndef SD_DETECT_STATE
#define SD_DETECT_STATE HIGH
#elif SD_DETECT_STATE == LOW
@@ -421,8 +427,9 @@
#endif // BTT_MOTOR_EXPANSION
//
-// LCDs and Controllers
+// LCD / Controller
//
+
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
@@ -510,6 +517,7 @@
#endif
#endif
+
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
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 a2f445476b..3e3f4fda33 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
@@ -23,7 +23,7 @@
#include "env_validate.h"
-#define USES_DIAG_JUMPERS
+#define USES_DIAG_PINS
// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
@@ -172,18 +172,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PC12
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PC11
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PC10
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PC12
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PC11
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PC10
#endif
#if HAS_TMC_UART
@@ -224,8 +222,11 @@
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -424,8 +425,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 0ffe5f6218..e22056ad6e 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
@@ -270,18 +270,16 @@
#endif // SPINDLE_FEATURE || LASER_FEATURE
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PE14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PA14
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PE15
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PE14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PA14
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PE15
#endif
#if HAS_TMC_UART
@@ -322,8 +320,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// SD Connection
@@ -372,7 +373,7 @@
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#elif SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT // Use SDIO for onboard SD
+ #define ONBOARD_SDIO // Use SDIO for onboard SD
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
@@ -436,8 +437,9 @@
#endif // BTT_MOTOR_EXPANSION
//
-// LCDs and Controllers
+// LCD / Controller
//
+
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
@@ -511,6 +513,118 @@
#endif // HAS_WIRED_LCD
+#if HAS_SPI_TFT
+
+ #define TFT_SCK_PIN EXP2_02_PIN
+ #define TFT_MISO_PIN EXP2_01_PIN
+ #define TFT_MOSI_PIN EXP2_06_PIN
+
+ #define BTN_ENC EXP1_02_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 // HAS_SPI_TFT
+
// Alter timing for graphical display
#if IS_U8GLIB_ST7920
#ifndef BOARD_ST7920_DELAY_1
@@ -524,29 +638,6 @@
#endif
#endif
-#if HAS_SPI_TFT
-
- #define BTN_EN1 EXP2_03_PIN
- #define BTN_EN2 EXP2_05_PIN
- #define BTN_ENC EXP1_02_PIN
-
- //
- // e.g., BTT_TFT35_SPI_V1_0 (480x320, 3.5", SPI Stock Display with Rotary Encoder in BIQU B1 SE)
- //
- #define TFT_CS_PIN EXP2_04_PIN
- #define TFT_A0_PIN EXP2_07_PIN
- #define TFT_SCK_PIN EXP2_02_PIN
- #define TFT_MISO_PIN EXP2_01_PIN
- #define TFT_MOSI_PIN EXP2_06_PIN
-
- #define TOUCH_INT_PIN EXP1_07_PIN
- #define TOUCH_MISO_PIN EXP1_06_PIN
- #define TOUCH_MOSI_PIN EXP1_03_PIN
- #define TOUCH_SCK_PIN EXP1_05_PIN
- #define TOUCH_CS_PIN EXP1_04_PIN
-
-#endif
-
//
// NeoPixel LED
//
diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h
index 4e5cd55162..d41a6eac75 100644
--- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h
+++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h
@@ -214,9 +214,9 @@
#if SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT // Use SDIO for onboard SD
+ #define ONBOARD_SDIO // Use SDIO for onboard SD
- #if DISABLED(SDIO_SUPPORT)
+ #if DISABLED(ONBOARD_SDIO)
#define SOFTWARE_SPI // Use soft SPI for onboard SD
#define SDSS PC11
#define SD_SCK_PIN PC12
@@ -235,18 +235,16 @@
#endif
//
-// Trinamic Software SPI
+// Trinamic SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK EXP2_02_PIN
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO EXP2_01_PIN
- #endif
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI EXP2_06_PIN
- #endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK EXP2_02_PIN
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO EXP2_01_PIN
+#endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI EXP2_06_PIN
#endif
//
@@ -285,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_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
index 3cc8c5554e..16973b344f 100644
--- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
+++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
@@ -178,22 +178,31 @@
#define EXP2_07_PIN PC3
#define EXP2_08_PIN -1
-#if HAS_WIRED_LCD
+#define EXP3_01_PIN PC9
+#define EXP3_02_PIN PC12
+#define EXP3_03_PIN PC10
+#define EXP3_04_PIN PB14
+#define EXP3_05_PIN PC11
+#define EXP3_06_PIN PB13
+#define EXP3_07_PIN PB12
+#define EXP3_08_PIN PB15
+
+#if ENABLED(CR10_STOCKDISPLAY)
+
+ #define BEEPER_PIN EXP3_01_PIN
+ #define BTN_ENC EXP3_02_PIN
+ #define BTN_EN1 EXP3_03_PIN
+ #define BTN_EN2 EXP3_05_PIN
+ #define LCD_PINS_D4 EXP3_06_PIN
+ #define LCD_PINS_RS EXP3_07_PIN
+ #define LCD_PINS_EN EXP3_08_PIN
+
+#elif HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
- #if ENABLED(CR10_STOCKDISPLAY)
-
- #define LCD_PINS_RS EXP1_04_PIN
-
- #define BTN_EN1 EXP2_03_PIN
- #define BTN_EN2 EXP2_05_PIN
-
- #define LCD_PINS_EN EXP1_03_PIN
- #define LCD_PINS_D4 EXP1_05_PIN
-
- #elif ENABLED(MKS_MINI_12864)
+ #if ENABLED(MKS_MINI_12864)
#define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_CS EXP1_06_PIN
diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h
index 3daa813952..26e8cc0eb1 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_S6_V2_0.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h
index 78b6450fea..a6035c2c6f 100644
--- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h
+++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h
@@ -53,19 +53,17 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
#define TMC_USE_SW_SPI
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PE14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PE13
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PE12
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PE14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PE13
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PE12
#endif
#include "pins_FYSETC_S6.h"
diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h
index 953aa37021..368f464f86 100644
--- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h
+++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h
@@ -101,19 +101,17 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
#define TMC_USE_SW_SPI
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PE14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PE13
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PE12
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PE14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PE13
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PE12
#endif
#if HOTENDS > 3 || E_STEPPERS > 3
diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h
index 5471613679..da11ce05ef 100644
--- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h
+++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h
@@ -159,8 +159,11 @@
//#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN
//#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -217,10 +220,10 @@
//
// SD support
//
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SDIO_CLOCK 4800000
#define SD_DETECT_PIN PA8
-#if DISABLED(SDIO_SUPPORT)
+#if DISABLED(ONBOARD_SDIO)
#define SOFTWARE_SPI
#define SD_SCK_PIN PC12
#define SD_MISO_PIN PC8
diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h
index 180235019a..c7c9e3db3b 100644
--- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h
+++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h
@@ -160,10 +160,10 @@
//
// SD support
//
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SDIO_CLOCK 4800000
#define SD_DETECT_PIN PG15
-#if DISABLED(SDIO_SUPPORT)
+#if DISABLED(ONBOARD_SDIO)
#define SOFTWARE_SPI
#define SD_SCK_PIN PC12
#define SD_MISO_PIN PC8
diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h
index 20985f263c..22e7f6e2e2 100644
--- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h
+++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h
@@ -118,10 +118,10 @@
//
// SD support (On board)
//
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SD_DETECT_PIN PA8
#define SDIO_CLOCK 4800000
-#if DISABLED(SDIO_SUPPORT)
+#if DISABLED(ONBOARD_SDIO)
#define SOFTWARE_SPI
#define SD_SCK_PIN PC12
#define SD_MISO_PIN PC8
diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h
index d70e935f0a..772a93605a 100644
--- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h
+++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h
@@ -58,6 +58,9 @@
#define WIFI_RESET_PIN PD14 // MKS ESP WIFI RESET PIN
#endif
-#define NEOPIXEL_PIN PC5
+// 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
#include "pins_MKS_MONSTER8_common.h"
diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
index 2a81984cee..5b5c4fea87 100644
--- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
+++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
@@ -126,22 +126,23 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
// This board only supports SW SPI for stepper drivers
//
#if HAS_TMC_SPI
#define TMC_USE_SW_SPI
#endif
-#if ENABLED(TMC_USE_SW_SPI)
- #if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1
- #define TMC_SPI_MOSI PE14
- #endif
- #if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1
- #define TMC_SPI_MISO PE13
- #endif
- #if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1
- #define TMC_SPI_SCK PE12
- #endif
+#if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1
+ #undef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PE14
+#endif
+#if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1
+ #undef TMC_SPI_MISO
+ #define TMC_SPI_MISO PE13
+#endif
+#if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1
+ #undef TMC_SPI_SCK
+ #define TMC_SPI_SCK PE12
#endif
#if HAS_TMC_UART
@@ -174,8 +175,11 @@
#define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -290,7 +294,7 @@
#define LCD_READ_ID 0xD3
#define LCD_USE_DMA_SPI
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -17253
diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
index 96f3d95861..b85b2357d3 100644
--- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
+++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
@@ -121,7 +121,7 @@
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#define BEEPER_PIN PG2
diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h
index 847e1f3052..96e19c987f 100644
--- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h
+++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h
@@ -51,22 +51,23 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
// This board only supports SW SPI for stepper drivers
//
#if HAS_TMC_SPI
#define TMC_USE_SW_SPI
#endif
-#if ENABLED(TMC_USE_SW_SPI)
- #if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1
- #define TMC_SPI_MOSI PD14
- #endif
- #if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1
- #define TMC_SPI_MISO PD1
- #endif
- #if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1
- #define TMC_SPI_SCK PD0
- #endif
+#if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1
+ #undef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PD14
+#endif
+#if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1
+ #undef TMC_SPI_MISO
+ #define TMC_SPI_MISO PD1
+#endif
+#if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1
+ #undef TMC_SPI_SCK
+ #define TMC_SPI_SCK PD0
#endif
#include "pins_MKS_ROBIN_NANO_V3_common.h"
diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h
index f2da2d5356..7cc24d6255 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
@@ -108,8 +108,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -224,13 +227,12 @@
#define SPI_FLASH
#if ENABLED(SPI_FLASH)
- #define SPI_FLASH
- #define SPI_DEVICE 2
- #define SPI_FLASH_SIZE 0x1000000
+ #define SPI_DEVICE 2 // Maple
+ #define SPI_FLASH_SIZE 0x1000000 // 16MB
#define SPI_FLASH_CS_PIN PB12
- #define SPI_FLASH_MOSI_PIN PC3
- #define SPI_FLASH_MISO_PIN PC2
#define SPI_FLASH_SCK_PIN PB13
+ #define SPI_FLASH_MISO_PIN PC2
+ #define SPI_FLASH_MOSI_PIN PC3
#endif
/**
@@ -276,6 +278,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
@@ -307,7 +310,7 @@
#define LCD_READ_ID 0xD3
#define LCD_USE_DMA_SPI
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -17253
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 3f51b98922..342b585fe9 100644
--- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
+++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
@@ -113,18 +113,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PD14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PD1
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PD0
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PD14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PD1
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PD0
#endif
#if HAS_TMC_UART
@@ -162,7 +160,10 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
#endif // HAS_TMC_UART
//
@@ -238,23 +239,23 @@
* ------ ------
* EXP1 EXP2
*/
-#define EXP1_01_PIN PC5
-#define EXP1_02_PIN PE13
-#define EXP1_03_PIN PD13
-#define EXP1_04_PIN PC6
-#define EXP1_05_PIN PE14
-#define EXP1_06_PIN PE15
-#define EXP1_07_PIN PD11
-#define EXP1_08_PIN PD10
+#define EXP1_01_PIN PC5
+#define EXP1_02_PIN PE13
+#define EXP1_03_PIN PD13
+#define EXP1_04_PIN PC6
+#define EXP1_05_PIN PE14
+#define EXP1_06_PIN PE15
+#define EXP1_07_PIN PD11
+#define EXP1_08_PIN PD10
-#define EXP2_01_PIN PA6
-#define EXP2_02_PIN PA5
-#define EXP2_03_PIN PE8
-#define EXP2_04_PIN PE10
-#define EXP2_05_PIN PE11
-#define EXP2_06_PIN PA7
-#define EXP2_07_PIN PE12
-#define EXP2_08_PIN -1 // RESET
+#define EXP2_01_PIN PA6
+#define EXP2_02_PIN PA5
+#define EXP2_03_PIN PE8
+#define EXP2_04_PIN PE10
+#define EXP2_05_PIN PE11
+#define EXP2_06_PIN PA7
+#define EXP2_07_PIN PE12
+#define EXP2_08_PIN -1 // RESET
//
// LCD SD
@@ -270,18 +271,19 @@
#endif
*/
+#define SPI_FLASH
+#if ENABLED(SPI_FLASH)
+ #define SPI_DEVICE 2 // Maple
+ #define SPI_FLASH_SIZE 0x1000000 // 16MB
+ #define SPI_FLASH_CS_PIN PB12
+ #define SPI_FLASH_SCK_PIN PB13
+ #define SPI_FLASH_MISO_PIN PB14
+ #define SPI_FLASH_MOSI_PIN PB15
+#endif
+
//
// LCD / Controller
-#define SPI_FLASH
-#define SPI_FLASH
-#define SPI_DEVICE 2
-#define SPI_FLASH_SIZE 0x1000000
-#if ENABLED(SPI_FLASH)
- #define SPI_FLASH_CS_PIN PB12
- #define SPI_FLASH_MOSI_PIN PB15
- #define SPI_FLASH_MISO_PIN PB14
- #define SPI_FLASH_SCK_PIN PB13
-#endif
+//
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
#ifndef TOUCH_CALIBRATION_X
@@ -335,7 +337,7 @@
#define LCD_USE_DMA_SPI
//#define TFT_DRIVER ST7796
- #define TFT_BUFFER_SIZE 14400
+ #define TFT_BUFFER_WORDS 14400
#elif HAS_WIRED_LCD
@@ -358,9 +360,8 @@
// Required for MKS_MINI_12864 with this board
//#define MKS_LCD12864B
- //#undef SHOW_BOOTSCREEN
- #else // !MKS_MINI_12864
+ #else // !MKS_MINI_12864
#define LCD_PINS_D4 EXP1_05_PIN
#if IS_ULTIPANEL
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 2074bbbbfa..3f55c7b291 100644
--- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
+++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
@@ -113,7 +113,7 @@
#endif
#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) || ENABLED(USE_PROBE_FOR_Z_HOMING)
- #ifndef Z_MIN_PROBE
+ #ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN E2_DIAG_PIN // defaults to 'Z+' connector
#endif
#endif
@@ -191,8 +191,8 @@
#define FAN2_PIN PA0 // Fan2
//
-// Software SPI pins for TMC2130 stepper drivers
-// This board doesn't support hardware SPI there
+// Default pins for TMC software SPI
+// This board only supports SW SPI for stepper drivers
//
#if HAS_TMC_SPI
#define TMC_USE_SW_SPI
@@ -228,8 +228,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
/** ------ ------
* (BEEPER) PB2 | 1 2 | PE10 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
@@ -287,8 +290,9 @@
#endif
//
-// LCDs and Controllers
+// LCD / Controller
//
+
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
@@ -350,7 +354,7 @@
#endif
#endif
-#endif // HAS_WIRED_LCD
+#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if IS_U8GLIB_ST7920
diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h
index eb6edb765e..447c6227d6 100644
--- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h
+++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h
@@ -144,9 +144,11 @@
#define K_SERIAL_RX_PIN K_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
-#endif
+#endif // HAS_TMC_UART
//
// Heaters / Fans
@@ -159,7 +161,7 @@
#define FAN_SOFT_PWM_REQUIRED
//
-// Neopixel
+// NeoPixel
//
#define 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 b44061a491..2f55fce4c3 100644
--- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h
+++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h
@@ -141,9 +141,11 @@
#define K_SERIAL_RX_PIN K_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
-#endif
+#endif // HAS_TMC_UART
//
// Heaters / Fans
@@ -156,7 +158,7 @@
#define FAN_SOFT_PWM_REQUIRED
//
-// Neopixel
+// NeoPixel
//
#define 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 7c6aca6bb6..4574df53ac 100644
--- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h
+++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h
@@ -91,16 +91,14 @@
#define E2_ENABLE_PIN PD0
#define E2_CS_PIN PD1
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PA7
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PA6
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PA5
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PA7
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PA6
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PA5
#endif
//
@@ -141,28 +139,57 @@
#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 faf6fc1ef1..d1a6da23b1 100644
--- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h
+++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h
@@ -45,7 +45,7 @@
#endif
//
-// Neopixels
+// NeoPixel
//
#define NEOPIXEL_PIN PA8
@@ -132,9 +132,6 @@
#define E0_SERIAL_TX_PIN PC10
#define E0_SERIAL_RX_PIN PC11
- // Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-
// Default TMC slave addresses
#ifndef X_SLAVE_ADDRESS
#define X_SLAVE_ADDRESS 0
@@ -148,7 +145,13 @@
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 3
#endif
-#endif
+
+ // Reduce baud rate to improve software serial reliability
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temp Sensors
diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
index 21158f7af9..4e8e5158c0 100644
--- a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
+++ b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
@@ -73,9 +73,9 @@
#if ENABLED(SPI_FLASH)
#define SPI_FLASH_SIZE 0x200000 // 2MB
#define SPI_FLASH_CS_PIN PG15 // SPI2
- #define SPI_FLASH_MOSI_PIN PB5
- #define SPI_FLASH_MISO_PIN PB4
#define SPI_FLASH_SCK_PIN PB3
+ #define SPI_FLASH_MISO_PIN PB4
+ #define SPI_FLASH_MOSI_PIN PB5
#endif
//
@@ -157,7 +157,7 @@
#define FAN2_PIN PG9 // FAN2
#define FAN3_PIN PF10 // FAN3
#define CONTROLLER_FAN_PIN PD7 // BOARD FAN
-#define FAN_SOFT_PWM
+#define FAN_SOFT_PWM_REQUIRED
//
// Laser / Spindle
@@ -211,7 +211,7 @@
//#define TFT_PIXEL_OFFSET_X 48
//#define TFT_PIXEL_OFFSET_Y 32
//#define TFT_DRIVER ILI9488
- //#define TFT_BUFFER_SIZE 14400
+ //#define TFT_BUFFER_WORDS 14400
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PD11 // SPI1_NSS
@@ -253,14 +253,7 @@
//
// SD Card
//
-#define SDIO_SUPPORT
+#define ONBOARD_SDIO
#define SD_DETECT_PIN -1 // PF0, but not connected
#define SDIO_CLOCK 4500000
#define SDIO_READ_RETRIES 16
-
-#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
diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h
index bf45f94ab8..d9c542c6a2 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/env_validate.h b/Marlin/src/pins/stm32g0/env_validate.h
index a7be76bd8b..03887eb7a4 100644
--- a/Marlin/src/pins/stm32g0/env_validate.h
+++ b/Marlin/src/pins/stm32g0/env_validate.h
@@ -19,8 +19,11 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx)
#error "Oops! Select an STM32G0 board in 'Tools > Board.'"
#endif
+
+#endif
diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
index 02c5e9888c..8b45900135 100644
--- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
+++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
@@ -80,17 +80,6 @@
//
// Steppers
//
-#define X_ENABLE_PIN -1
-#define X_STEP_PIN PA10 // Unused. Assigned so Marlin will compile
-#define X_DIR_PIN -1
-
-#define Y_ENABLE_PIN -1
-#define Y_STEP_PIN PA10 // Unused. Assigned so Marlin will compile
-#define Y_DIR_PIN -1
-
-#define Z_ENABLE_PIN -1
-#define Z_STEP_PIN PA10 // Unused. Assigned so Marlin will compile
-#define Z_DIR_PIN -1
#define E0_ENABLE_PIN PD2
#define E0_STEP_PIN PD0
@@ -110,7 +99,9 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
// Default TMC slave addresses
#ifndef E0_SLAVE_ADDRESS
@@ -134,7 +125,8 @@
//
// Heaters / Fans
//
-#define HEATER_0_PIN PA2 // "HE"
+#define HEATER_0_PIN PA2 // "HE" V1.1
+#define HEATER_1_PIN PB13 // "HE" V1.2
#define FAN0_PIN PA0 // "FAN0"
#define FAN1_PIN PA1 // "FAN1"
@@ -148,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_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h
index 01a2c28f15..c2c16ba696 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
@@ -141,18 +141,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3)
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PC11 // Shared with SPI header, Pin 6 (SPI3)
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PC10 // Shared with SPI header, Pin 4 (SPI3)
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3)
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PC11 // Shared with SPI header, Pin 6 (SPI3)
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PC10 // Shared with SPI header, Pin 4 (SPI3)
#endif
#if HAS_TMC_UART
@@ -172,8 +170,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -235,21 +236,36 @@
#define EXP1_10_PIN -1
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
+ /**
+ * ------ ------ ---
+ * (PC1) BEEP | 1 2 | | 1 2 | | 1 | (5V)
+ * | 3 4 | RX | 3 4 | TX | 2 | (GND)
+ * (PC0) ENT 5 6 | ENT 5 6 | BEEP | 3 | RX (PD8)
+ * (PA2) B | 7 8 | A (PA1) B | 7 8 | A | 4 | TX (PD9)
+ * GND | 9 10 | 5V GND | 9 10 | VCC | 5 | (RST)
+ * ------ ------ ---
+ * 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. DWIN TX/RX need to be connected to the Manta E3 EZ's TFT port, with DWIN TX->PD9, DWIN RX->PD8.
+ *
+ * Needs custom cable:
+ *
+ * Board Adapter Display
+ * ------------------------------------------
+ * (EXP1-1) PC1 <-----------> BEEP (DWIN-6)
+ * (EXP1-5) PC0 <-----------> ENT (DWIN-5)
+ * (TFT-4) PD9 <-----------> RX (DWIN-3)
+ * (TFT-3) PD8 <-----------> TX (DWIN-4)
+ * (EXP1-7) PA2 <-----------> B (DWIN-7)
+ * (EXP1-9) GND <-----------> GND (DWIN-9)
+ * (EXP1-8) PA1 <-----------> A (DWIN-8)
+ * (EXP1-10) 5V <-----------> VCC (DWIN-10)
+ */
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable with TX = PA0, RX = PC2. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
- /**
- * Ender-3 V2 display Manta E3 EZ V1.0 Ender-3 V2 display --> Manta E3 EZ V1.0
- * ------ ------ RX 3 --> 5 P0_15
- * -- | 1 2 | -- (BEEPER) PC1 | 1 2 | PC2 (BTN_ENC) TX 4 --> 9 P0_16
- * (MANTA TX1) RX | 3 4 | TX (MANTA RX1) (BTN_EN1) PC3 | 3 4 | RESET BEEPER 6 --> 10 P2_08
- * (BTN_ENC) ENT 5 6 | BEEPER (BTN_EN2) PC0 5 6 | PA0 (LCD_D4)
- * (BTN_E2) B | 7 8 | A (BTN_E1) (LCD_RS) PA2 | 7 8 | PA1 (LCD_EN)
- * GND | 9 10 | 5V GND | 9 10 | 5V
- * ------ ------
- */
-
#define BEEPER_PIN EXP1_01_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_07_PIN
@@ -307,7 +323,6 @@
//
// SD Support
//
-
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#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 be5a4752d8..4d1f0fb51c 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
@@ -55,10 +55,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
//
@@ -112,18 +110,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #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
+#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
@@ -140,8 +136,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -209,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 c770304478..35038ca2df 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
@@ -53,10 +53,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
//
@@ -79,8 +77,8 @@
// Z Probe (when not Z_STOP_PIN)
//
#ifndef Z_MIN_PROBE_PIN
- #define Z_MIN_PROBE_PIN PC13 // PROBE
- //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper)
+ #define Z_MIN_PROBE_PIN PC13 // PROBE
+ //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper)
#endif
//
@@ -129,18 +127,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2)
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PB14 // Shared with SPI header, Pin 6 (SPI2)
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PB13 // Shared with SPI header, Pin 4 (SPI2)
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2)
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PB14 // Shared with SPI header, Pin 6 (SPI2)
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PB13 // Shared with SPI header, Pin 4 (SPI2)
#endif
#if HAS_TMC_UART
@@ -160,8 +156,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -237,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_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h
index 4f8d30b6b7..824e44130f 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
@@ -64,8 +64,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// NeoPixel LED
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 a21bb59e69..d7c15eaa04 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
@@ -63,8 +63,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// NeoPixel LED
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 b13c12e393..8fc2bdf33c 100644
--- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
+++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
@@ -51,10 +51,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
//
@@ -179,18 +177,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PA7
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PA6
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PA5
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PA7
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PA6
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PA5
#endif
#if HAS_TMC_UART
@@ -210,8 +206,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
@@ -301,8 +300,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_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h
index a516768462..450e7b06b0 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
@@ -435,7 +435,7 @@
#define SD_MOSI_PIN PA7
//
-// Default NEOPIXEL_PIN
+// NeoPixel
//
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PA8 // LED driving pin
diff --git a/Marlin/src/pins/stm32h7/env_validate.h b/Marlin/src/pins/stm32h7/env_validate.h
index 0c515e5df6..7feaf20959 100644
--- a/Marlin/src/pins/stm32h7/env_validate.h
+++ b/Marlin/src/pins/stm32h7/env_validate.h
@@ -19,8 +19,11 @@
* along with this program. If not, see .
*
*/
-#pragma once
+#ifndef ENV_VALIDATE_H
+#define ENV_VALIDATE_H
#if NOT_TARGET(STM32H7)
#error "Oops! Select an STM32H7 board in 'Tools > Board.'"
#endif
+
+#endif
diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
index 1ae990a0c0..07c6d0d499 100644
--- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
+++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
@@ -45,20 +45,15 @@
//
#define SERVO0_PIN PB14
-//
-// Misc. Functions
-//
-#define LED_PIN PA14
-
//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN PF0 // M1-STOP
#define Y_DIAG_PIN PF2 // M2-STOP
#define Z_DIAG_PIN PF4 // M3-STOP
-#define Z2_DIAG_PIN PF3 // M4-STOP
-#define E0_DIAG_PIN PF1 // M5-STOP
-#define E1_DIAG_PIN PC15 // M6-STOP
+#define Z2_DIAG_PIN PF3 // M4-DET
+#define E0_DIAG_PIN PF1 // M5-DET
+#define E1_DIAG_PIN PC15 // M6-DET
#define E2_DIAG_PIN PF12 // PWRDET
//
@@ -91,16 +86,16 @@
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
- #define X_MAX_PIN E0_DIAG_PIN // E0DET
+ #define X_MAX_PIN E0_DIAG_PIN // M4-DET
#else
- #define X_MIN_PIN E0_DIAG_PIN // E0DET
+ #define X_MIN_PIN E0_DIAG_PIN // M4-DET
#endif
#elif ANY(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
#ifndef X_MIN_PIN
#define X_MIN_PIN X_DIAG_PIN // X-STOP
#endif
#ifndef X_MAX_PIN
- #define X_MAX_PIN E0_DIAG_PIN // E0DET
+ #define X_MAX_PIN E0_DIAG_PIN // M4-DET
#endif
#else
#define X_STOP_PIN X_DIAG_PIN // X-STOP
@@ -109,16 +104,16 @@
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
- #define Y_MAX_PIN E1_DIAG_PIN // E1DET
+ #define Y_MAX_PIN E1_DIAG_PIN // M5-DET
#else
- #define Y_MIN_PIN E1_DIAG_PIN // E1DET
+ #define Y_MIN_PIN E1_DIAG_PIN // M5-DET
#endif
#elif ENABLED(NEEDS_Y_MINMAX)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
#endif
#ifndef Y_MAX_PIN
- #define Y_MAX_PIN E1_DIAG_PIN // E1DET
+ #define Y_MAX_PIN E1_DIAG_PIN // M5-DET
#endif
#else
#define Y_STOP_PIN Y_DIAG_PIN // Y-STOP
@@ -142,25 +137,18 @@
#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
#endif
+//
+// Z Probe (when not Z_MIN_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PB15
+#endif
+
//
// Filament Runout Sensor
//
-#define FIL_RUNOUT_PIN PF1 // E0DET
-#define FIL_RUNOUT2_PIN PF15 // E1DET
-
-//
-// Power Supply Control
-//
-#ifndef PS_ON_PIN
- #define PS_ON_PIN PF13 // PS-ON
-#endif
-
-//
-// Power Loss Detection
-//
-#ifndef POWER_LOSS_PIN
- #define POWER_LOSS_PIN PF12 // PWRDET
-#endif
+#define FIL_RUNOUT_PIN PF1 // M5-DET
+#define FIL_RUNOUT2_PIN PC15 // M6-DET
//
// Steppers
@@ -261,6 +249,31 @@
#define FAN5_PIN PF8 // 4 wire Fan5
#define FAN6_PIN PA2 // 4 wire Fan6
+//
+// Power Supply Control
+//
+#ifndef PS_ON_PIN
+ #define PS_ON_PIN PF13 // PS-ON
+#endif
+
+//
+// Power Loss Detection
+//
+#ifndef POWER_LOSS_PIN
+ #define POWER_LOSS_PIN PF12 // PWRDET
+#endif
+
+//
+// Misc. Functions
+//
+#define LED_PIN PA14
+#ifndef FILWIDTH_PIN
+ #define FILWIDTH_PIN PC0
+#endif
+#ifndef FILWIDTH2_PIN
+ #define FILWIDTH2_PIN PF10
+#endif
+
//
// SD Support
//
@@ -273,18 +286,16 @@
#endif
//
-// Software SPI pins for TMC2130 stepper drivers
+// Default pins for TMC software SPI
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PE14
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PE13
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PE12
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PE14
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PE13
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PE12
#endif
#if HAS_TMC_UART
@@ -337,10 +348,14 @@
#define E5_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
/**
+ * 18-pin FPC Connector
* ----
* (MISO) PE13 | 1 |
* (SCK) PE12 | 2 |
@@ -412,102 +427,39 @@
#endif
//
-// LCDs and Controllers
+// LCD / Controller
//
-#if IS_TFTGLCD_PANEL
- #if ENABLED(TFTGLCD_PANEL_SPI)
- #define TFTGLCD_CS EXP2_03_PIN
- #endif
-
-#elif HAS_WIRED_LCD
+#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
-
- #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 DOGLCD_SCK EXP2_02_PIN
- #define DOGLCD_MOSI EXP2_06_PIN
-
- #define SOFTWARE_SPI
- #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
- // results in LCD soft SPI mode 3, SD soft SPI mode 0
- //#define LCD_BACKLIGHT_PIN -1
- #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
- #if 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
- #define TFT_CS_PIN EXP2_04_PIN
- #define TFT_A0_PIN EXP2_07_PIN
- #define TFT_SCK_PIN EXP2_02_PIN
- #define TFT_MISO_PIN EXP2_01_PIN
- #define TFT_MOSI_PIN EXP2_06_PIN
-
- #define TOUCH_INT_PIN EXP1_07_PIN
- #define TOUCH_MISO_PIN EXP1_06_PIN
- #define TOUCH_MOSI_PIN EXP1_03_PIN
- #define TOUCH_SCK_PIN EXP1_05_PIN
- #define TOUCH_CS_PIN EXP1_04_PIN
+ #define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
- #define BTN_ENC EXP1_02_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 the BIGTREE_OCTOPUS_MAX_EZ."
#endif
//
@@ -516,28 +468,26 @@
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PE10
#endif
-
#ifndef NEOPIXEL2_PIN
#define NEOPIXEL2_PIN PE9
#endif
+//
+// WiFi
+//
#if ENABLED(WIFISUPPORT)
- //
- // WIFI
- //
-
/**
- * -------
- * GND | 9 | | 8 | 3.3V
- * (ESP-CS) PG1 | 10 | | 7 | PB15 (ESP-MOSI)
- * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
- * (ESP-IO0) PG0 | 12 | | 5 | PB13 (ESP-CLK)
- * (ESP-IO4) PF15 | 13 | | 4 | --
- * -- | 14 | | 3 | 3.3V (ESP-EN)
- * (ESP-RX) PE7 | 15 | | 2 | --
- * (ESP-TX) PE8 | 16 | | 1 | PB2 (ESP-RST)
- * -------
- * WIFI
+ * --------
+ * GND | 9 8 | 3.3V
+ * (ESP-CS) PG1 | 10 7 | PB15 (ESP-MOSI)
+ * 3.3V | 11 6 | PB14 (ESP-MISO)
+ * (ESP-IO0) PG0 | 12 5 | PB13 (ESP-CLK)
+ * (ESP-IO4) PF15 | 13 4 | --
+ * -- | 14 3 | 3.3V (ESP-EN)
+ * (ESP-RX) PE7 | 15 2 | --
+ * (ESP-TX) PE8 | 16 1 | PB2 (ESP-RST)
+ * --------
+ * WIFI
*/
#define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
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 ccc53fda11..1d21dbde9b 100644
--- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
+++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
@@ -91,18 +91,16 @@
#define E1_CS_PIN PC8
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PC6
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PG3
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PC7
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PC6
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PG3
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PC7
#endif
#if HAS_TMC_UART
@@ -143,8 +141,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// Temperature Sensors
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 413b2db8c8..a3e4a84adc 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
@@ -119,6 +123,7 @@
#define Z_STOP_PIN PC0 // Z-STOP
#endif
#endif
+#define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups
//
// Z Probe (when not Z_MIN_PIN)
@@ -130,10 +135,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
//
@@ -260,18 +263,16 @@
#endif // SPINDLE_FEATURE || LASER_FEATURE
//
-// Software SPI pins for TMC2130 stepper drivers
+// SPI pins for TMC2130 stepper drivers
//
-#if ENABLED(TMC_USE_SW_SPI)
- #ifndef TMC_SPI_MOSI
- #define TMC_SPI_MOSI PE13
- #endif
- #ifndef TMC_SPI_MISO
- #define TMC_SPI_MISO PE15
- #endif
- #ifndef TMC_SPI_SCK
- #define TMC_SPI_SCK PE14
- #endif
+#ifndef TMC_SPI_MOSI
+ #define TMC_SPI_MOSI PE13
+#endif
+#ifndef TMC_SPI_MISO
+ #define TMC_SPI_MISO PE15
+#endif
+#ifndef TMC_SPI_SCK
+ #define TMC_SPI_SCK PE14
#endif
#if HAS_TMC_UART
@@ -312,8 +313,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
- #define TMC_BAUD_RATE 19200
-#endif
+ #ifndef TMC_BAUD_RATE
+ #define TMC_BAUD_RATE 19200
+ #endif
+
+#endif // HAS_TMC_UART
//
// SD Connection
@@ -362,7 +366,7 @@
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#elif SD_CONNECTION_IS(ONBOARD)
- #define SDIO_SUPPORT
+ #define ONBOARD_SDIO
#define SDIO_CLOCK 24000000 // 24MHz
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
@@ -427,8 +431,9 @@
#endif // BTT_MOTOR_EXPANSION
//
-// LCDs and Controllers
+// LCD / Controller
//
+
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
@@ -457,6 +462,115 @@
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
+ #elif 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
+
#else
#define LCD_PINS_RS EXP1_04_PIN
@@ -515,27 +629,6 @@
#endif
#endif
-#if HAS_SPI_TFT
- //
- // e.g., BTT_TFT35_SPI_V1_0 (480x320, 3.5", SPI Stock Display with Rotary Encoder in BIQU B1 SE)
- //
- #define TFT_CS_PIN EXP2_04_PIN
- #define TFT_A0_PIN EXP2_07_PIN
- #define TFT_SCK_PIN EXP2_02_PIN
- #define TFT_MISO_PIN EXP2_01_PIN
- #define TFT_MOSI_PIN EXP2_06_PIN
-
- #define TOUCH_INT_PIN EXP1_07_PIN
- #define TOUCH_MISO_PIN EXP1_06_PIN
- #define TOUCH_MOSI_PIN EXP1_03_PIN
- #define TOUCH_SCK_PIN EXP1_05_PIN
- #define TOUCH_CS_PIN EXP1_04_PIN
-
- #define BTN_EN1 EXP2_03_PIN
- #define BTN_EN2 EXP2_05_PIN
- #define BTN_ENC EXP1_02_PIN
-#endif
-
//
// NeoPixel LED
//
diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h
index c1eee00c2d..ab4427a889 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 2b65f17bc5..dac4c6c940 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
@@ -182,6 +183,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_ENA_PIN 5 // D5 Pin should have a pullup!
-#define SPINDLE_LASER_PWM_PIN 0 // D0 PWM0B MUST BE HARDWARE PWM
-#define SPINDLE_DIR_PIN 7 // D7
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 0 // D0 PWM0B MUST BE HARDWARE PWM
+ #define SPINDLE_LASER_ENA_PIN 5 // D5 Pin should have a pullup!
+ #define SPINDLE_DIR_PIN 7 // D7
+#endif
diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h
index 81bb56349f..a6a16f2be1 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
@@ -167,6 +168,8 @@
//
// M3/M4/M5 - Spindle/Laser Control
//
-#define SPINDLE_LASER_PWM_PIN 24 // B4 IO-3 PWM2A - MUST BE HARDWARE PWM
-#define SPINDLE_LASER_ENA_PIN 39 // F1 IO-11 - Pin should have a pullup!
-#define SPINDLE_DIR_PIN 40 // F2 IO-9
+#if HAS_CUTTER
+ #define SPINDLE_LASER_PWM_PIN 24 // B4 IO-3 PWM2A - MUST BE HARDWARE PWM
+ #define SPINDLE_LASER_ENA_PIN 39 // F1 IO-11 - Pin should have a pullup!
+ #define SPINDLE_DIR_PIN 40 // F2 IO-9
+#endif
diff --git a/Marlin/src/pins/teensy4/env_validate.h b/Marlin/src/pins/teensy4/env_validate.h
new file mode 100644
index 0000000000..5a89e8a409
--- /dev/null
+++ b/Marlin/src/pins/teensy4/env_validate.h
@@ -0,0 +1,26 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#if NOT_TARGET(IS_TEENSY41)
+ #error "Oops! Select 'Teensy 4.1' in 'Tools > Board.'"
+#endif
diff --git a/Marlin/src/pins/teensy4/pins_T41U5XBB.h b/Marlin/src/pins/teensy4/pins_T41U5XBB.h
index 5f62bb05a6..2ee4f2970e 100644
--- a/Marlin/src/pins/teensy4/pins_T41U5XBB.h
+++ b/Marlin/src/pins/teensy4/pins_T41U5XBB.h
@@ -27,9 +27,7 @@
* https://www.pjrc.com/teensy/teensyduino.html
****************************************************************************************/
-#if NOT_TARGET(IS_TEENSY41)
- #error "Oops! Select 'Teensy 4.1' in 'Tools > Board.'"
-#endif
+#include "env_validate.h"
#define BOARD_INFO_NAME "Teensy4.1"
diff --git a/Marlin/src/pins/teensy4/pins_TEENSY41.h b/Marlin/src/pins/teensy4/pins_TEENSY41.h
index 263d9e8f8b..2a8a76f17c 100644
--- a/Marlin/src/pins/teensy4/pins_TEENSY41.h
+++ b/Marlin/src/pins/teensy4/pins_TEENSY41.h
@@ -27,9 +27,7 @@
* https://www.pjrc.com/teensy/teensyduino.html
****************************************************************************************/
-#if NOT_TARGET(IS_TEENSY41)
- #error "Oops! Select 'Teensy 4.1' in 'Tools > Board.'"
-#endif
+#include "env_validate.h"
#define BOARD_INFO_NAME "Teensy4.1"