Browse Source

Merge patches from bugfix-2.0.x

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
efc19260a7
  1. 5
      Marlin/Configuration.h
  2. 17
      Marlin/Configuration_adv.h
  3. 2
      Marlin/Makefile
  4. 5
      Marlin/src/HAL/DUE/HAL.h
  5. 20
      Marlin/src/HAL/DUE/MarlinSerial.cpp
  6. 8
      Marlin/src/HAL/DUE/MarlinSerial.h
  7. 12
      Marlin/src/HAL/DUE/MarlinSerialUSB.cpp
  8. 12
      Marlin/src/HAL/DUE/MarlinSerialUSB.h
  9. 4
      Marlin/src/HAL/LPC1768/HAL.cpp
  10. 2
      Marlin/src/HAL/LPC1768/HAL.h
  11. 2
      Marlin/src/HAL/STM32/HAL.cpp
  12. 2
      Marlin/src/HAL/STM32/HAL.h
  13. 2
      Marlin/src/HAL/STM32F1/HAL.cpp
  14. 3
      Marlin/src/HAL/STM32F1/HAL.h
  15. 10
      Marlin/src/MarlinCore.cpp
  16. 1
      Marlin/src/core/boards.h
  17. 4
      Marlin/src/core/macros.h
  18. 2
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  19. 78
      Marlin/src/feature/controllerfan.cpp
  20. 54
      Marlin/src/feature/controllerfan.h
  21. 4
      Marlin/src/feature/power.cpp
  22. 2
      Marlin/src/gcode/config/M43.cpp
  23. 25
      Marlin/src/gcode/control/M42.cpp
  24. 2
      Marlin/src/gcode/feature/advance/M900.cpp
  25. 81
      Marlin/src/gcode/feature/controllerfan/M710.cpp
  26. 4
      Marlin/src/gcode/gcode.cpp
  27. 4
      Marlin/src/gcode/gcode.h
  28. 4
      Marlin/src/inc/Conditionals_LCD.h
  29. 8
      Marlin/src/inc/MarlinConfigPre.h
  30. 16
      Marlin/src/inc/SanityCheck.h
  31. 2
      Marlin/src/inc/Version.h
  32. 2
      Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
  33. 10
      Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp
  34. 10
      Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp
  35. 1
      Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.h
  36. 5
      Marlin/src/lcd/language/language_de.h
  37. 5
      Marlin/src/lcd/language/language_en.h
  38. 1
      Marlin/src/lcd/language/language_tr.h
  39. 4
      Marlin/src/lcd/menu/menu.cpp
  40. 22
      Marlin/src/lcd/menu/menu.h
  41. 14
      Marlin/src/lcd/menu/menu_advanced.cpp
  42. 33
      Marlin/src/lcd/menu/menu_configuration.cpp
  43. 2
      Marlin/src/lcd/menu/menu_delta_calibrate.cpp
  44. 2
      Marlin/src/lcd/menu/menu_mixer.cpp
  45. 8
      Marlin/src/lcd/menu/menu_tune.cpp
  46. 2
      Marlin/src/lcd/ultralcd.cpp
  47. 25
      Marlin/src/libs/numtostr.cpp
  48. 9
      Marlin/src/libs/numtostr.h
  49. 47
      Marlin/src/module/configuration_store.cpp
  50. 14
      Marlin/src/module/motion.cpp
  51. 69
      Marlin/src/module/thermistor/thermistor_202.h
  52. 3
      Marlin/src/module/thermistor/thermistors.h
  53. 2
      Marlin/src/pins/linux/pins_RAMPS_LINUX.h
  54. 5
      Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
  55. 1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
  56. 2
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
  57. 2
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
  58. 2
      Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
  59. 2
      Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
  60. 2
      Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
  61. 1
      Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
  62. 1
      Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
  63. 2
      Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
  64. 86
      Marlin/src/pins/pins.h
  65. 1
      Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
  66. 34
      Marlin/src/pins/ramps/pins_COPYMASTER_3D.h
  67. 2
      Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h
  68. 2
      Marlin/src/pins/ramps/pins_FYSETC_F6_13.h
  69. 2
      Marlin/src/pins/ramps/pins_FYSETC_F6_14.h
  70. 2
      Marlin/src/pins/ramps/pins_MKS_BASE_common.h
  71. 6
      Marlin/src/pins/ramps/pins_RAMPS.h
  72. 6
      Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
  73. 2
      Marlin/src/pins/ramps/pins_TT_OSCAR.h
  74. 2
      Marlin/src/pins/sam/pins_ARCHIM1.h
  75. 2
      Marlin/src/pins/sam/pins_RAMPS_FD_V1.h
  76. 2
      Marlin/src/pins/samd/pins_RAMPS_144.h
  77. 1
      Marlin/src/pins/sanguino/pins_GEN3_PLUS.h
  78. 1
      Marlin/src/pins/sanguino/pins_GEN7_12.h
  79. 4
      Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
  80. 201
      Marlin/src/pins/stm32/pins_ARMED.h
  81. 285
      Marlin/src/pins/stm32/pins_BEAST.h
  82. 155
      Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h
  83. 391
      Marlin/src/pins/stm32/pins_BTT_GTR_V1_0.h
  84. 191
      Marlin/src/pins/stm32/pins_BTT_SKR_MINI_E3.h
  85. 286
      Marlin/src/pins/stm32/pins_BTT_SKR_PRO_V1_1.h
  86. 283
      Marlin/src/pins/stm32/pins_CHITU3D.h
  87. 266
      Marlin/src/pins/stm32/pins_FLYF407ZG.h
  88. 266
      Marlin/src/pins/stm32/pins_FYSETC_S6.h
  89. 190
      Marlin/src/pins/stm32/pins_GENERIC_STM32F4.h
  90. 177
      Marlin/src/pins/stm32/pins_LERDGE_K.h
  91. 174
      Marlin/src/pins/stm32/pins_LERDGE_X.h
  92. 170
      Marlin/src/pins/stm32/pins_LONGER3D_LK.h
  93. 159
      Marlin/src/pins/stm32/pins_MKS_ROBIN.h
  94. 102
      Marlin/src/pins/stm32/pins_MKS_ROBIN2.h
  95. 137
      Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h
  96. 153
      Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE3.h
  97. 137
      Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h
  98. 274
      Marlin/src/pins/stm32/pins_MKS_ROBIN_PRO.h
  99. 133
      Marlin/src/pins/stm32/pins_REMRAM_V1.h
  100. 149
      Marlin/src/pins/stm32/pins_RUMBA32_common.h

5
Marlin/Configuration.h

@ -99,6 +99,7 @@
/**
* Select the serial port on the board to use for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port -1 is the USB emulated serial port, if available.
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
@ -107,9 +108,6 @@
/**
* Select a secondary serial port on the board to use for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port -1 is the USB emulated serial port, if available.
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
@ -363,6 +361,7 @@
* 331 : (3.3V scaled thermistor 1 table for MEGA)
* 332 : (3.3V scaled thermistor 1 table for DUE)
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 202 : 200k thermistor - Copymaster 3D
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)

17
Marlin/Configuration_adv.h

@ -338,15 +338,22 @@
* Controller Fan
* To cool down the stepper drivers and MOSFETs.
*
* The fan will turn on automatically whenever any stepper is enabled
* and turn off after a set period after all steppers are turned off.
* The fan turns on automatically whenever any driver is enabled and turns
* off (or reduces to idle speed) shortly after drivers are turned off.
*
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
#define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
#define CONTROLLERFAN_SPEED 255 // 255 == full speed
//#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
#define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
#define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
#define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
#define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#endif
#endif
// When first starting the main fan, run it at full speed for the

2
Marlin/Makefile

@ -267,6 +267,8 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1147)
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
# Copymaster 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
#
# RAMBo and derivatives

5
Marlin/src/HAL/DUE/HAL.h

@ -39,7 +39,7 @@
#include <stdint.h>
// Define MYSERIAL0/1 before MarlinSerial includes!
#if SERIAL_PORT == -1
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
#define MYSERIAL0 customizedSerial1
#elif SERIAL_PORT == 0
#define MYSERIAL0 Serial
@ -56,7 +56,7 @@
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
#elif SERIAL_PORT_2 == -1
#elif SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
#define MYSERIAL1 customizedSerial2
#elif SERIAL_PORT_2 == 0
#define MYSERIAL1 Serial
@ -94,7 +94,6 @@
#endif
#endif
#include "MarlinSerial.h"
#include "MarlinSerialUSB.h"

20
Marlin/src/HAL/DUE/MarlinSerial.cpp

@ -629,23 +629,13 @@ void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
// If not using the USB port as serial port
#if SERIAL_PORT >= 0
// Preinstantiate
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>;
// Instantiate
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>; // Define
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1; // Instantiate
#endif
#ifdef SERIAL_PORT_2
// Preinstantiate
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>;
// Instantiate
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>; // Define
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2; // Instantiate
#endif
#endif // ARDUINO_ARCH_SAM

8
Marlin/src/HAL/DUE/MarlinSerial.h

@ -172,13 +172,9 @@ struct MarlinSerialCfg {
};
#if SERIAL_PORT >= 0
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
#endif
#endif // SERIAL_PORT >= 0
#ifdef SERIAL_PORT_2
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
#endif

12
Marlin/src/HAL/DUE/MarlinSerialUSB.cpp

@ -29,7 +29,7 @@
#include "../../inc/MarlinConfig.h"
#if SERIAL_PORT == -1
#if HAS_USB_SERIAL
#include "MarlinSerialUSB.h"
@ -283,8 +283,12 @@ void MarlinSerialUSB::printFloat(double number, uint8_t digits) {
}
// Preinstantiate
MarlinSerialUSB customizedSerial1;
#endif // SERIAL_PORT == -1
#if SERIAL_PORT == -1
MarlinSerialUSB customizedSerial1;
#endif
#if SERIAL_PORT_2 == -1
MarlinSerialUSB customizedSerial2;
#endif
#endif // HAS_USB_SERIAL
#endif // ARDUINO_ARCH_SAM

12
Marlin/src/HAL/DUE/MarlinSerialUSB.h

@ -28,7 +28,7 @@
#include "../../inc/MarlinConfig.h"
#if SERIAL_PORT == -1
#if HAS_USB_SERIAL
#include <WString.h>
@ -88,6 +88,12 @@ private:
static void printFloat(double, uint8_t);
};
extern MarlinSerialUSB customizedSerial1;
#if SERIAL_PORT == -1
extern MarlinSerialUSB customizedSerial1;
#endif
#if SERIAL_PORT_2 == -1
extern MarlinSerialUSB customizedSerial2;
#endif
#endif // SERIAL_PORT == -1
#endif // HAS_USB_SERIAL

4
Marlin/src/HAL/LPC1768/HAL.cpp

@ -67,9 +67,7 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) {
return ind > -1 ? ind : dval;
}
void flashFirmware(int16_t value) {
NVIC_SystemReset();
}
void flashFirmware(const int16_t) { NVIC_SystemReset(); }
void HAL_clear_reset_source(void) {
#if ENABLED(USE_WATCHDOG)

2
Marlin/src/HAL/LPC1768/HAL.h

@ -195,7 +195,7 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
void HAL_idletask();
#define PLATFORM_M997_SUPPORT
void flashFirmware(int16_t value);
void flashFirmware(const int16_t);
/**
* set_pwm_frequency

2
Marlin/src/HAL/STM32/HAL.cpp

@ -133,6 +133,6 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) { HAL_adc_result = analogRe
uint16_t HAL_adc_get_result() { return HAL_adc_result; }
void flashFirmware(int16_t) { NVIC_SystemReset(); }
void flashFirmware(const int16_t) { NVIC_SystemReset(); }
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC

2
Marlin/src/HAL/STM32/HAL.h

@ -223,4 +223,4 @@ uint16_t HAL_adc_get_result();
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
#define PLATFORM_M997_SUPPORT
void flashFirmware(int16_t value);
void flashFirmware(const int16_t);

2
Marlin/src/HAL/STM32F1/HAL.cpp

@ -388,6 +388,6 @@ void analogWrite(pin_t pin, int pwm_val8) {
analogWrite(uint8_t(pin), pwm_val8);
}
void flashFirmware(int16_t value) { nvic_sys_reset(); }
void flashFirmware(const int16_t) { nvic_sys_reset(); }
#endif // __STM32F1__

3
Marlin/src/HAL/STM32F1/HAL.h

@ -160,6 +160,7 @@ void HAL_idletask();
#ifndef digitalPinHasPWM
#define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != nullptr)
#define NO_COMPILE_TIME_PWM
#endif
#define CRITICAL_SECTION_START() uint32_t primask = __get_primask(); (void)__iCliRetVal()
@ -287,4 +288,4 @@ void analogWrite(pin_t pin, int pwm_val8); // PWM only! mul by 257 in maple!?
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
#define PLATFORM_M997_SUPPORT
void flashFirmware(int16_t value);
void flashFirmware(const int16_t);

10
Marlin/src/MarlinCore.cpp

@ -567,7 +567,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
#endif
#if ENABLED(USE_CONTROLLER_FAN)
controllerfan_update(); // Check if fan should be turned on to cool stepper drivers down
controllerFan.update(); // Check if fan should be turned on to cool stepper drivers down
#endif
#if ENABLED(AUTO_POWER_CONTROL)
@ -984,6 +984,10 @@ void setup() {
SETUP_RUN(leds.setup());
#endif
#if ENABLED(USE_CONTROLLER_FAN) // Set up fan controller to initialize also the default configurations.
SETUP_RUN(controllerFan.setup());
#endif
SETUP_RUN(ui.init());
SETUP_RUN(ui.reset_status()); // Load welcome message early. (Retained if no errors exist.)
@ -1047,10 +1051,6 @@ void setup() {
SETUP_RUN(endstops.enable_z_probe(false));
#endif
#if ENABLED(USE_CONTROLLER_FAN)
SET_OUTPUT(CONTROLLER_FAN_PIN);
#endif
#if HAS_STEPPER_RESET
SETUP_RUN(enableStepperDrivers());
#endif

1
Marlin/src/core/boards.h

@ -103,6 +103,7 @@
#define BOARD_HJC2560C_REV2 1147 // ADIMLab Gantry v2
#define BOARD_TANGO 1148 // BIQU Tango V1
#define BOARD_MKS_GEN_L_V2 1149 // MKS GEN L V2
#define BOARD_COPYMASTER_3D 1150 // Copymaster 3D
//
// RAMBo and derivatives

4
Marlin/src/core/macros.h

@ -21,6 +21,10 @@
*/
#pragma once
#if !defined(__has_include)
#define __has_include(...) 1
#endif
#define ABCE 4
#define XYZE 4
#define ABC 3

2
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

@ -1611,7 +1611,7 @@
* numbers for those locations should be 0.
*/
#ifdef VALIDATE_MESH_TILT
auto d_from = []() { DEBUG_ECHOPGM("D from "); };
auto d_from = []{ DEBUG_ECHOPGM("D from "); };
auto normed = [&](const xy_pos_t &pos, const float &zadd) {
return normal.x * pos.x + normal.y * pos.y + zadd;
};

78
Marlin/src/feature/controllerfan.cpp

@ -24,60 +24,80 @@
#if ENABLED(USE_CONTROLLER_FAN)
#include "controllerfan.h"
#include "../module/stepper/indirection.h"
#include "../module/temperature.h"
uint8_t controllerfan_speed;
ControllerFan controllerFan;
void controllerfan_update() {
uint8_t ControllerFan::speed;
#if ENABLED(CONTROLLER_FAN_EDITABLE)
controllerFan_settings_t ControllerFan::settings; // {0}
#endif
void ControllerFan::setup() {
SET_OUTPUT(CONTROLLER_FAN_PIN);
init();
}
void ControllerFan::set_fan_speed(const uint8_t s) {
speed = s < (CONTROLLERFAN_SPEED_MIN) ? 0 : s; // Fan OFF below minimum
}
void ControllerFan::update() {
static millis_t lastMotorOn = 0, // Last time a motor was turned on
nextMotorCheck = 0; // Last time the state was checked
const millis_t ms = millis();
if (ELAPSED(ms, nextMotorCheck)) {
nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s
const bool xory = X_ENABLE_READ() == bool(X_ENABLE_ON) || Y_ENABLE_READ() == bool(Y_ENABLE_ON);
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
// If any of the drivers or the bed are enabled...
if (xory || Z_ENABLE_READ() == bool(Z_ENABLE_ON)
#if HAS_HEATED_BED
|| thermalManager.temp_bed.soft_pwm_amount > 0
#endif
#if HAS_X2_ENABLE
|| X2_ENABLE_READ() == bool(X_ENABLE_ON)
#endif
#if HAS_Y2_ENABLE
|| Y2_ENABLE_READ() == bool(Y_ENABLE_ON)
#endif
const bool motor_on = MOTOR_IS_ON(Z,Z)
#if HAS_Z2_ENABLE
|| Z2_ENABLE_READ() == bool(Z_ENABLE_ON)
|| MOTOR_IS_ON(Z2,Z)
#endif
#if HAS_Z3_ENABLE
|| Z3_ENABLE_READ() == bool(Z_ENABLE_ON)
|| MOTOR_IS_ON(Z3,Z)
#endif
#if HAS_Z4_ENABLE
|| Z4_ENABLE_READ() == bool(Z_ENABLE_ON)
|| MOTOR_IS_ON(Z4,Z)
#endif
|| (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && (
MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
#if HAS_X2_ENABLE
|| MOTOR_IS_ON(X2,X)
#endif
#if HAS_Y2_ENABLE
|| MOTOR_IS_ON(Y2,Y)
#endif
#if E_STEPPERS
#define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == bool(E_ENABLE_ON)
REPEAT(E_STEPPERS, _OR_ENABLED_E)
#endif
) {
lastMotorOn = ms; //... set time to NOW so the fan will turn on
}
)
)
;
// Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds
controllerfan_speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : (
#ifdef CONTROLLERFAN_SPEED_Z_ONLY
xory ? CONTROLLERFAN_SPEED : CONTROLLERFAN_SPEED_Z_ONLY
#else
CONTROLLERFAN_SPEED
// If any of the drivers or the heated bed are enabled...
if (motor_on
#if HAS_HEATED_BED
|| thermalManager.temp_bed.soft_pwm_amount > 0
#endif
) lastMotorOn = ms; //... set time to NOW so the fan will turn on
// Fan Settings. Set fan > 0:
// - If AutoMode is on and steppers have been enabled for CONTROLLERFAN_IDLE_TIME seconds.
// - If System is on idle and idle fan speed settings is activated.
set_fan_speed(
settings.auto_mode && lastMotorOn && PENDING(ms, lastMotorOn + settings.duration * 1000UL)
? settings.active_speed : settings.idle_speed
);
// Allow digital or PWM fan output (see M42 handling)
WRITE(CONTROLLER_FAN_PIN, controllerfan_speed);
analogWrite(pin_t(CONTROLLER_FAN_PIN), controllerfan_speed);
WRITE(CONTROLLER_FAN_PIN, speed);
analogWrite(pin_t(CONTROLLER_FAN_PIN), speed);
}
}

54
Marlin/src/feature/controllerfan.h

@ -21,4 +21,56 @@
*/
#pragma once
void controllerfan_update();
#include "../inc/MarlinConfigPre.h"
typedef struct {
uint8_t active_speed, // 0-255 (fullspeed); Speed with enabled stepper motors
idle_speed; // 0-255 (fullspeed); Speed after idle period with all motors are disabled
uint16_t duration; // Duration in seconds for the fan to run after all motors are disabled
bool auto_mode; // Default true
} controllerFan_settings_t;
#ifndef CONTROLLERFAN_SPEED_ACTIVE
#define CONTROLLERFAN_SPEED_ACTIVE 255
#endif
#ifndef CONTROLLERFAN_SPEED_IDLE
#define CONTROLLERFAN_SPEED_IDLE 0
#endif
#ifndef CONTROLLERFAN_IDLE_TIME
#define CONTROLLERFAN_IDLE_TIME 60
#endif
static constexpr controllerFan_settings_t controllerFan_defaults = {
CONTROLLERFAN_SPEED_ACTIVE,
CONTROLLERFAN_SPEED_IDLE,
CONTROLLERFAN_IDLE_TIME,
true
};
#if ENABLED(USE_CONTROLLER_FAN)
class ControllerFan {
private:
static uint8_t speed;
static void set_fan_speed(const uint8_t s);
public:
#if ENABLED(CONTROLLER_FAN_EDITABLE)
static controllerFan_settings_t settings;
#else
static const controllerFan_settings_t constexpr &settings = controllerFan_defaults;
#endif
static inline bool state() { return speed > 0; }
static inline void init() { reset(); }
static inline void reset() {
#if ENABLED(CONTROLLER_FAN_EDITABLE)
settings = controllerFan_defaults;
#endif
}
static void setup();
static void update();
};
extern ControllerFan controllerFan;
#endif

4
Marlin/src/feature/power.cpp

@ -46,8 +46,8 @@ bool Power::is_power_needed() {
HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true;
#endif
#if ENABLED(AUTO_POWER_CONTROLLERFAN, USE_CONTROLLER_FAN) && HAS_CONTROLLER_FAN
if (controllerfan_speed) return true;
#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
if (controllerFan.state()) return true;
#endif
#if ENABLED(AUTO_POWER_CHAMBER_FAN)

2
Marlin/src/gcode/config/M43.cpp

@ -67,6 +67,7 @@ inline void toggle_pins() {
else {
watchdog_refresh();
report_pin_state_extended(pin, ignore_protection, true, PSTR("Pulsing "));
const bool prior_mode = GET_PINMODE(pin);
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
if (pin == TEENSY_E2) {
SET_OUTPUT(TEENSY_E2);
@ -95,6 +96,7 @@ inline void toggle_pins() {
watchdog_refresh();
}
}
pinMode(pin, prior_mode);
}
SERIAL_EOL();
}

25
Marlin/src/gcode/control/M42.cpp

@ -37,16 +37,33 @@
*
* S<byte> Pin status from 0 - 255
* I Flag to ignore Marlin's pin protection
*
* M<mode> Pin mode: 0=INPUT 1=OUTPUT 2=INPUT_PULLUP 3=INPUT_PULLDOWN
*/
void GcodeSuite::M42() {
if (!parser.seenval('S')) return;
const byte pin_status = parser.value_byte();
const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
if (pin_index < 0) return;
const pin_t pin = GET_PIN_MAP_PIN(pin_index);
if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
if (parser.seenval('M')) {
switch (parser.value_byte()) {
case 0: pinMode(pin, INPUT); break;
case 1: pinMode(pin, OUTPUT); break;
case 2: pinMode(pin, INPUT_PULLUP); break;
#ifdef INPUT_PULLDOWN
case 3: pinMode(pin, INPUT_PULLDOWN); break;
#endif
default: SERIAL_ECHOLNPGM("Invalid Pin Mode");
}
return;
}
if (!parser.seenval('S')) return;
const byte pin_status = parser.value_byte();
#if FAN_COUNT > 0
switch (pin) {
#if HAS_FAN0
@ -76,8 +93,6 @@ void GcodeSuite::M42() {
}
#endif
if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
pinMode(pin, OUTPUT);
extDigitalWrite(pin, pin_status);
analogWrite(pin, pin_status);

2
Marlin/src/gcode/feature/advance/M900.cpp

@ -42,7 +42,7 @@
*/
void GcodeSuite::M900() {
auto echo_value_oor = [] (const char ltr, const bool ten=true) {
auto echo_value_oor = [](const char ltr, const bool ten=true) {
SERIAL_CHAR('?'); SERIAL_CHAR(ltr);
SERIAL_ECHOPGM(" value out of range");
if (ten) SERIAL_ECHOPGM(" (0-10)");

81
Marlin/src/gcode/feature/controllerfan/M710.cpp

@ -0,0 +1,81 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#include "../../gcode.h"
#include "../../../feature/controllerfan.h"
void M710_report(const bool forReplay) {
if (!forReplay) { SERIAL_ECHOLNPGM("; Controller Fan"); SERIAL_ECHO_START(); }
SERIAL_ECHOLNPAIR("M710 "
"S", int(controllerFan.settings.active_speed),
"I", int(controllerFan.settings.idle_speed),
"A", int(controllerFan.settings.auto_mode),
"D", controllerFan.settings.duration,
" ; (", (int(controllerFan.settings.active_speed) * 100) / 255, "%"
" ", (int(controllerFan.settings.idle_speed) * 100) / 255, "%)"
);
}
/**
* M710: Set controller fan settings
*
* R : Reset to defaults
* S[0-255] : Fan speed when motors are active
* I[0-255] : Fan speed when motors are idle
* A[0|1] : Turn auto mode on or off
* D : Set auto mode idle duration
*
* Examples:
* M710 ; Report current Settings
* M710 R ; Reset SIAD to defaults
* M710 I64 ; Set controller fan Idle Speed to 25%
* M710 S255 ; Set controller fan Active Speed to 100%
* M710 S0 ; Set controller fan Active Speed to OFF
* M710 I255 A0 ; Set controller fan Idle Speed to 100% with Auto Mode OFF
* M710 I127 A1 S255 D160 ; Set controller fan idle speed 50%, AutoMode On, Fan speed 100%, duration to 160 Secs
*/
void GcodeSuite::M710() {
const bool seenR = parser.seen('R');
if (seenR) controllerFan.reset();
const bool seenS = parser.seenval('S');
if (seenS) controllerFan.settings.active_speed = parser.value_byte();
const bool seenI = parser.seenval('I');
if (seenI) controllerFan.settings.idle_speed = parser.value_byte();
const bool seenA = parser.seenval('A');
if (seenA) controllerFan.settings.auto_mode = parser.value_bool();
const bool seenD = parser.seenval('D');
if (seenD) controllerFan.settings.duration = parser.value_ushort();
if (!(seenR || seenS || seenI || seenA || seenD))
M710_report(false);
}
#endif // CONTROLLER_FAN_EDITABLE

4
Marlin/src/gcode/gcode.cpp

@ -752,6 +752,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 702: M702(); break; // M702: Unload Filament
#endif
#if ENABLED(CONTROLLER_FAN_EDITABLE)
case 710: M710(); break; // M710: Set Controller Fan settings
#endif
#if ENABLED(GCODE_MACROS)
case 810: case 811: case 812: case 813: case 814:
case 815: case 816: case 817: case 818: case 819:

4
Marlin/src/gcode/gcode.h

@ -972,6 +972,10 @@ private:
static void M7219();
#endif
#if ENABLED(CONTROLLER_FAN_EDITABLE)
static void M710();
#endif
static void T(const uint8_t tool_index);
};

4
Marlin/src/inc/Conditionals_LCD.h

@ -683,6 +683,10 @@
#define SPI_SPEED SPI_FULL_SPEED
#endif
#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1
#define HAS_USB_SERIAL 1
#endif
/**
* This setting is also used by M109 when trying to calculate
* a ballpark safe margin to prevent wait-forever situation.

8
Marlin/src/inc/MarlinConfigPre.h

@ -37,12 +37,8 @@
#include "../../Configuration.h"
#ifdef CUSTOM_VERSION_FILE
#if defined(__has_include)
#if __has_include(XSTR(../../CUSTOM_VERSION_FILE))
#include XSTR(../../CUSTOM_VERSION_FILE)
#endif
#else
#include XSTR(../../CUSTOM_VERSION_FILE)
#if __has_include(STRINGIFY(../../CUSTOM_VERSION_FILE))
#include STRINGIFY(../../CUSTOM_VERSION_FILE)
#endif
#endif

16
Marlin/src/inc/SanityCheck.h

@ -270,6 +270,10 @@
#error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
#elif defined(CONTROLLERFAN_PIN)
#error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
#elif defined(CONTROLLERFAN_SPEED)
#error "CONTROLLERFAN_SPEED is now CONTROLLERFAN_SPEED_ACTIVE. Please update your Configuration_adv.h."
#elif defined(CONTROLLERFAN_SECS)
#error "CONTROLLERFAN_SECS is now CONTROLLERFAN_IDLE_TIME. Please update your Configuration_adv.h."
#elif defined(MIN_RETRACT)
#error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
#elif defined(ADVANCE)
@ -1983,7 +1987,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
/**
* Auto Fan check for PWM pins
*/
#if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
#if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255 && DISABLED(NO_COMPILE_TIME_PWM)
#define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
#if HAS_AUTO_FAN_0
static_assert(PWM_PIN(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
@ -2649,14 +2653,14 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#endif
#if ENABLED(BACKLASH_COMPENSATION)
#if IS_CORE
#error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
#endif
#ifndef BACKLASH_DISTANCE_MM
#error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM"
#endif
#ifndef BACKLASH_CORRECTION
#elif !defined(BACKLASH_CORRECTION)
#error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION"
#elif IS_CORE
constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM;
static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2],
"BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " with your CORE system.");
#endif
#endif

2
Marlin/src/inc/Version.h

@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2020-03-16"
#define STRING_DISTRIBUTION_DATE "2020-03-24"
#endif
/**

2
Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp

@ -118,7 +118,7 @@ static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = {
static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = {
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY, FYSETC_MINI_12864)
UC1701_START_LINE(0), // set display start line to 0
UC1701_ADC_REVERSE(0), // ADC set to reverse
UC1701_OUT_MODE(1), // common output mode

10
Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp

@ -30,10 +30,6 @@
#error "More than 2 hotends not implemented on the Display UI design."
#endif
#include "DGUSDisplay.h"
#include "DGUSVPVariable.h"
#include "DGUSDisplayDef.h"
#include "../../ui_api.h"
#include "../../../../MarlinCore.h"
@ -48,6 +44,10 @@
#include "../../../../feature/powerloss.h"
#endif
#include "DGUSDisplay.h"
#include "DGUSVPVariable.h"
#include "DGUSDisplayDef.h"
// Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable
constexpr uint8_t DGUS_HEADER1 = 0x5A;
constexpr uint8_t DGUS_HEADER2 = 0xA5;
@ -855,7 +855,7 @@ void DGUSScreenVariableHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable
void DGUSScreenVariableHandler::HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleProbeOffsetZChanged");
const float offset = float(swap16(*(uint16_t*)val_ptr)) / 100.0f;
const float offset = float(int16_t(swap16(*(uint16_t*)val_ptr))) / 100.0f;
ExtUI::setZOffset_mm(offset);
ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
return;

10
Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp

@ -283,6 +283,13 @@ const uint16_t VPList_FLCPrinting[] PROGMEM = {
0x0000
};
const uint16_t VPList_Z_Offset[] PROGMEM = {
#if HOTENDS >= 1
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const struct VPMapping VPMap[] PROGMEM = {
{ DGUSLCD_SCREEN_BOOT, VPList_Boot },
{ DGUSLCD_SCREEN_MAIN, VPList_Main },
@ -291,6 +298,7 @@ const struct VPMapping VPMap[] PROGMEM = {
{ DGUSLCD_SCREEN_STATUS2, VPList_Status2 },
{ DGUSLCD_SCREEN_PREHEAT, VPList_Preheat },
{ DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove },
{ DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset },
{ DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude },
{ DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating },
{ DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload },
@ -361,7 +369,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
#if HOTENDS >= 1
VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E0, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_EPos, &destination.e, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_MOVE_E0, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &DGUSScreenVariableHandler::HandleHeaterControl, nullptr),

1
Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.h

@ -35,6 +35,7 @@ enum DGUSLCD_Screens : uint8_t {
DGUSLCD_SCREEN_FILAMENT_LOADING = 76,
DGUSLCD_SCREEN_FILAMENT_UNLOADING = 82,
DGUSLCD_SCREEN_MANUALEXTRUDE = 84,
DGUSLCD_SCREEN_Z_OFFSET = 88,
DGUSLCD_SCREEN_SDFILELIST = 3,
DGUSLCD_SCREEN_SDPRINTMANIPULATION = 7,
DGUSLCD_SCREEN_SDPRINTTUNE = 9,

5
Marlin/src/lcd/language/language_de.h

@ -236,6 +236,11 @@ namespace Language_de {
PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Lüfter ~");
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Geschw. Extralüfter");
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Geschw. Extralüfter ~");
PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Lüfter Kontroller");
PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Lüfter Leerlauf");
PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Motorlast Modus");
PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Lüfter Motorlast");
PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Ausschalt Delay");
PROGMEM Language_Str MSG_FLOW = _UxGT("Flussrate");
PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flussrate ~");
PROGMEM Language_Str MSG_CONTROL = _UxGT("Einstellungen");

5
Marlin/src/lcd/language/language_en.h

@ -247,6 +247,11 @@ namespace Language_en {
PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ~");
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed");
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ~");
PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controller Fan");
PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Idle Speed");
PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto Mode");
PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Active Speed");
PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Idle Period");
PROGMEM Language_Str MSG_FLOW = _UxGT("Flow");
PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flow ~");
PROGMEM Language_Str MSG_CONTROL = _UxGT("Control");

1
Marlin/src/lcd/language/language_tr.h

@ -606,4 +606,3 @@ namespace Language_tr {
#define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
#define MSG_FIRST_EXTRA_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
#endif

4
Marlin/src/lcd/menu/menu.cpp

@ -193,7 +193,7 @@ DEFINE_MENU_EDIT_ITEM(uint16_3); // 123 right-justified
DEFINE_MENU_EDIT_ITEM(uint16_4); // 1234 right-justified
DEFINE_MENU_EDIT_ITEM(uint16_5); // 12345 right-justified
DEFINE_MENU_EDIT_ITEM(float3); // 123 right-justified
DEFINE_MENU_EDIT_ITEM(float52); // _2.34, 12.34, -2.34 or 123.45, -23.45
DEFINE_MENU_EDIT_ITEM(float42_52); // _2.34, 12.34, -2.34 or 123.45, -23.45
DEFINE_MENU_EDIT_ITEM(float43); // 1.234
DEFINE_MENU_EDIT_ITEM(float5); // 12345 right-justified
DEFINE_MENU_EDIT_ITEM(float5_25); // 12345 right-justified (25 increment)
@ -428,7 +428,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_HOTEND_OFFSET_Z), ftostr54sign(hotend_offset[active_extruder].z));
#endif
if (do_probe) {
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), ftostr52sign(probe.offset.z));
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), BABYSTEP_TO_STR(probe.offset.z));
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
_lcd_zoffset_overlay_gfx(probe.offset.z);
#endif

22
Marlin/src/lcd/menu/menu.h

@ -47,14 +47,18 @@ typedef void (*selectFunc_t)();
void _lcd_zoffset_overlay_gfx(const float zvalue);
#endif
#if Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
// Only values from -9.999 to 9.999
#define LCD_Z_OFFSET_FUNC(N) ftostr54sign(N)
#define LCD_Z_OFFSET_TYPE float43
#else
// Values from -99.99 to 99.99
#define LCD_Z_OFFSET_FUNC(N) ftostr52sign(N)
#define LCD_Z_OFFSET_TYPE float52
#if HAS_BED_PROBE
#if Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
#define LCD_Z_OFFSET_TYPE float43 // Values from -9.000 to +9.000
#else
#define LCD_Z_OFFSET_TYPE float42_52 // Values from -99.99 to 99.99
#endif
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) && Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
#define BABYSTEP_TO_STR(N) ftostr43sign(N)
#elif ENABLED(BABYSTEPPING)
#define BABYSTEP_TO_STR(N) ftostr53sign(N)
#endif
////////////////////////////////////////////
@ -289,7 +293,7 @@ DEFINE_MENU_EDIT_ITEM_TYPE(uint16_3 ,uint16_t ,ui16tostr3rj , 1 );
DEFINE_MENU_EDIT_ITEM_TYPE(uint16_4 ,uint16_t ,ui16tostr4rj , 0.1f ); // 1234 right-justified
DEFINE_MENU_EDIT_ITEM_TYPE(uint16_5 ,uint16_t ,ui16tostr5rj , 0.01f ); // 12345 right-justified
DEFINE_MENU_EDIT_ITEM_TYPE(float3 ,float ,ftostr3 , 1 ); // 123 right-justified
DEFINE_MENU_EDIT_ITEM_TYPE(float52 ,float ,ftostr42_52 , 100 ); // _2.34, 12.34, -2.34 or 123.45, -23.45
DEFINE_MENU_EDIT_ITEM_TYPE(float42_52 ,float ,ftostr42_52 , 100 ); // _2.34, 12.34, -2.34 or 123.45, -23.45
DEFINE_MENU_EDIT_ITEM_TYPE(float43 ,float ,ftostr43sign ,1000 ); // -1.234, _1.234, +1.234
DEFINE_MENU_EDIT_ITEM_TYPE(float5 ,float ,ftostr5rj , 1 ); // 12345 right-justified
DEFINE_MENU_EDIT_ITEM_TYPE(float5_25 ,float ,ftostr5rj , 0.04f ); // 12345 right-justified (25 increment)

14
Marlin/src/lcd/menu/menu_advanced.cpp

@ -112,10 +112,10 @@ void menu_cancelobject();
#if ENABLED(LIN_ADVANCE)
#if EXTRUDERS == 1
EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
#elif EXTRUDERS > 1
LOOP_L_N(n, EXTRUDERS)
EDIT_ITEM_N(float52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
#endif
#endif
@ -257,7 +257,7 @@ void menu_cancelobject();
EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
EDIT_ITEM(float52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
#endif
//
@ -376,12 +376,12 @@ void menu_cancelobject();
START_MENU();
BACK_ITEM(MSG_ADVANCED_SETTINGS);
static float max_accel = _MAX(planner.settings.max_acceleration_mm_per_s2[A_AXIS], planner.settings.max_acceleration_mm_per_s2[B_AXIS], planner.settings.max_acceleration_mm_per_s2[C_AXIS]);
const float max_accel = _MAX(planner.settings.max_acceleration_mm_per_s2[A_AXIS], planner.settings.max_acceleration_mm_per_s2[B_AXIS], planner.settings.max_acceleration_mm_per_s2[C_AXIS]);
// M204 P Acceleration
EDIT_ITEM_FAST(float5_25, MSG_ACC, &planner.settings.acceleration, 25, max_accel);
// M204 R Retract Acceleration
EDIT_ITEM_FAST(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, max_accel);
EDIT_ITEM_FAST(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)]);
// M204 T Travel Acceleration
EDIT_ITEM_FAST(float5_25, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 25, max_accel);
@ -556,10 +556,10 @@ void menu_advanced_settings() {
SUBMENU(MSG_FILAMENT, menu_advanced_filament);
#elif ENABLED(LIN_ADVANCE)
#if EXTRUDERS == 1
EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
#elif EXTRUDERS > 1
LOOP_L_N(n, E_STEPPERS)
EDIT_ITEM_N(float52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
#endif
#endif

33
Marlin/src/lcd/menu/menu_configuration.cpp

@ -138,12 +138,12 @@ void menu_advanced_settings();
START_MENU();
BACK_ITEM(MSG_CONFIGURATION);
#if ENABLED(DUAL_X_CARRIAGE)
EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
#else
EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
#endif
EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
#if ENABLED(EEPROM_SETTINGS)
ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
#endif
@ -227,6 +227,24 @@ void menu_advanced_settings();
}
#endif
#if ENABLED(CONTROLLER_FAN_MENU)
#include "../../feature/controllerfan.h"
void menu_controller_fan() {
START_MENU();
BACK_ITEM(MSG_CONFIGURATION);
EDIT_ITEM_FAST(percent, MSG_CONTROLLER_FAN_IDLE_SPEED, &controllerFan.settings.idle_speed, _MAX(1, CONTROLLERFAN_SPEED_MIN) - 1, 255);
EDIT_ITEM(bool, MSG_CONTROLLER_FAN_AUTO_ON, &controllerFan.settings.auto_mode);
if (controllerFan.settings.auto_mode) {
EDIT_ITEM_FAST(percent, MSG_CONTROLLER_FAN_SPEED, &controllerFan.settings.active_speed, _MAX(1, CONTROLLERFAN_SPEED_MIN) - 1, 255);
EDIT_ITEM(uint16_4, MSG_CONTROLLER_FAN_DURATION, &controllerFan.settings.duration, 0, 4800);
}
END_MENU();
}
#endif
#if ENABLED(CASE_LIGHT_MENU)
#include "../../feature/caselight.h"
@ -320,6 +338,13 @@ void menu_configuration() {
EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_ZPROBE_ZOFFSET, &probe.offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif
//
// Set Fan Controller speed
//
#if ENABLED(CONTROLLER_FAN_MENU)
SUBMENU(MSG_CONTROLLER_FAN, menu_controller_fan);
#endif
const bool busy = printer_busy();
if (!busy) {
#if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)

2
Marlin/src/lcd/menu/menu_delta_calibrate.cpp

@ -103,7 +103,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
#endif
void lcd_delta_settings() {
auto _recalc_delta_settings = []() {
auto _recalc_delta_settings = []{
#if HAS_LEVELING
reset_bed_level(); // After changing kinematics bed-level data is no longer valid
#endif

2
Marlin/src/lcd/menu/menu_mixer.cpp

@ -182,7 +182,7 @@ void lcd_mixer_mix_edit() {
#if CHANNEL_MIX_EDITING
LOOP_S_LE_N(n, 1, MIXING_STEPPERS)
EDIT_ITEM_FAST_N(float52, n, MSG_MIX_COMPONENT_N, &mixer.collector[n-1], 0, 10);
EDIT_ITEM_FAST_N(float42_52, n, MSG_MIX_COMPONENT_N, &mixer.collector[n-1], 0, 10);
ACTION_ITEM(MSG_CYCLE_MIX, _lcd_mixer_cycle_mix);
ACTION_ITEM(MSG_COMMIT_VTOOL, _lcd_mixer_commit_vtool);

8
Marlin/src/lcd/menu/menu_tune.cpp

@ -65,7 +65,7 @@
}
if (ui.should_draw()) {
const float spm = planner.steps_to_mm[axis];
MenuEditItemBase::draw_edit_screen(msg, LCD_Z_OFFSET_FUNC(spm * babystep.accum));
MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(spm * babystep.accum));
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
const bool in_view = (true
#if HAS_GRAPHICAL_LCD
@ -81,7 +81,7 @@
#endif
lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
lcd_put_wchar(':');
lcd_put_u8str(LCD_Z_OFFSET_FUNC(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
lcd_put_u8str(BABYSTEP_TO_STR(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
}
#endif
}
@ -232,10 +232,10 @@ void menu_tune() {
//
#if ENABLED(LIN_ADVANCE) && DISABLED(SLIM_LCD_MENUS)
#if EXTRUDERS == 1
EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
#elif EXTRUDERS > 1
LOOP_L_N(n, EXTRUDERS)
EDIT_ITEM_N(float52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
#endif
#endif

2
Marlin/src/lcd/ultralcd.cpp

@ -227,7 +227,7 @@ millis_t MarlinUI::next_button_update_ms; // = 0
SETCURSOR(col, row);
if (!string) return;
auto _newline = [&col, &row]() {
auto _newline = [&col, &row]{
col = 0; row++; // Move col to string len (plus space)
SETCURSOR(0, row); // Simulate carriage return
};

25
Marlin/src/libs/numtostr.cpp

@ -174,9 +174,9 @@ const char* ftostr12ns(const float &f) {
return &conv[3];
}
// Convert signed float to fixed-length string with 12.34 / -2.34 or 023.45 / -23.45 format
// Convert signed float to fixed-length string with 12.34 / _2.34 / -2.34 or -23.45 / 123.45 format
const char* ftostr42_52(const float &f) {
if (f <= -10 || f >= 100) return ftostr52(f); // need more digits
if (f <= -10 || f >= 100) return ftostr52(f); // -23.45 / 123.45
long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
conv[2] = (f >= 0 && f < 10) ? ' ' : MINUSOR(i, DIGIMOD(i, 1000));
conv[3] = DIGIMOD(i, 100);
@ -198,9 +198,9 @@ const char* ftostr52(const float &f) {
return &conv[1];
}
// Convert signed float to fixed-length string with 12.345 / -2.345 or 023.456 / -23.456 format
const char* ftostr43_53(const float &f) {
if (f <= -10 || f >= 100) return ftostr53(f); // need more digits
// Convert signed float to fixed-length string with 12.345 / _2.345 / -2.345 or -23.45 / 123.45 format
const char* ftostr53_63(const float &f) {
if (f <= -10 || f >= 100) return ftostr63(f); // -23.456 / 123.456
long i = (f * 10000 + (f < 0 ? -5: 5)) / 10;
conv[1] = (f >= 0 && f < 10) ? ' ' : MINUSOR(i, DIGIMOD(i, 10000));
conv[2] = DIGIMOD(i, 1000);
@ -212,7 +212,7 @@ const char* ftostr43_53(const float &f) {
}
// Convert signed float to fixed-length string with 023.456 / -23.456 format
const char* ftostr53(const float &f) {
const char* ftostr63(const float &f) {
long i = (f * 10000 + (f < 0 ? -5: 5)) / 10;
conv[0] = MINUSOR(i, DIGIMOD(i, 100000));
conv[1] = DIGIMOD(i, 10000);
@ -310,6 +310,19 @@ const char* ftostr52sign(const float &f) {
return conv;
}
// Convert signed float to string with +12.345 format
const char* ftostr53sign(const float &f) {
long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
conv[0] = MINUSOR(i, '+');
conv[1] = DIGIMOD(i, 10000);
conv[2] = DIGIMOD(i, 1000);
conv[3] = '.';
conv[4] = DIGIMOD(i, 100);
conv[5] = DIGIMOD(i, 10);
conv[6] = DIGIMOD(i, 1);
return conv;
}
// Convert unsigned float to string with ____4.5, __34.5, _234.5, 1234.5 format
const char* ftostr51rj(const float &f) {
const long i = ((f < 0 ? -f : f) * 100 + 5) / 10;

9
Marlin/src/libs/numtostr.h

@ -58,17 +58,17 @@ const char* i16tostr4signrj(const int16_t x);
// Convert unsigned float to string with 1.23 format
const char* ftostr12ns(const float &x);
// Convert signed float to fixed-length string with 12.34 / -2.34 or 023.45 / -23.45 format
// Convert signed float to fixed-length string with 12.34 / _2.34 / -2.34 or -23.45 / 123.45 format
const char* ftostr42_52(const float &x);
// Convert signed float to fixed-length string with 023.45 / -23.45 format
const char* ftostr52(const float &x);
// Convert signed float to fixed-length string with 12.345 / -2.345 or 023.456 / -23.456 format
const char* ftostr43_53(const float &x);
const char* ftostr53_63(const float &x);
// Convert signed float to fixed-length string with 023.456 / -23.456 format
const char* ftostr53(const float &x);
const char* ftostr63(const float &x);
// Convert float to fixed-length string with +123.4 / -123.4 format
const char* ftostr41sign(const float &x);
@ -91,6 +91,9 @@ const char* ftostr52sp(const float &x);
// Convert signed float to string with +123.45 format
const char* ftostr52sign(const float &x);
// Convert signed float to string with +12.345 format
const char* ftostr53sign(const float &f);
// Convert unsigned float to string with 1234.5 format omitting trailing zeros
const char* ftostr51rj(const float &x);

47
Marlin/src/module/configuration_store.cpp

@ -122,6 +122,11 @@
#include "../feature/probe_temp_comp.h"
#endif
#include "../feature/controllerfan.h"
#if ENABLED(CONTROLLER_FAN_EDITABLE)
void M710_report(const bool forReplay);
#endif
#pragma pack(push, 1) // No padding between variables
typedef struct { uint16_t X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5; } tmc_stepper_current_t;
@ -292,6 +297,11 @@ typedef struct SettingsDataStruct {
//
int16_t lcd_contrast; // M250 C
//
// Controller fan settings
//
controllerFan_settings_t controllerFan_settings; // M710
//
// POWER_LOSS_RECOVERY
//
@ -880,6 +890,19 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(lcd_contrast);
}
//
// Controller Fan
//
{
_FIELD_TEST(controllerFan_settings);
#if ENABLED(USE_CONTROLLER_FAN)
const controllerFan_settings_t &cfs = controllerFan.settings;
#else
controllerFan_settings_t cfs = controllerFan_defaults;
#endif
EEPROM_WRITE(cfs);
}
//
// Power-Loss Recovery
//
@ -1719,6 +1742,19 @@ void MarlinSettings::postprocess() {
#endif
}
//
// Controller Fan
//
{
_FIELD_TEST(controllerFan_settings);
#if ENABLED(CONTROLLER_FAN_EDITABLE)
const controllerFan_settings_t &cfs = controllerFan.settings;
#else
controllerFan_settings_t cfs = { 0 };
#endif
EEPROM_READ(cfs);
}
//
// Power-Loss Recovery
//
@ -2590,6 +2626,13 @@ void MarlinSettings::reset() {
ui.set_contrast(DEFAULT_LCD_CONTRAST);
#endif
//
// Controller Fan
//
#if ENABLED(USE_CONTROLLER_FAN)
controllerFan.reset();
#endif
//
// Power-Loss Recovery
//
@ -3154,6 +3197,10 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPAIR(" M250 C", ui.contrast);
#endif
#if ENABLED(CONTROLLER_FAN_EDITABLE)
M710_report(forReplay);
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
CONFIG_ECHO_HEADING("Power-Loss Recovery:");
CONFIG_ECHO_START();

14
Marlin/src/module/motion.cpp

@ -218,7 +218,6 @@ inline void report_more_positions() {
inline void report_logical_position(const xyze_pos_t &rpos) {
const xyze_pos_t lpos = rpos.asLogical();
SERIAL_ECHOPAIR_P(X_LBL, lpos.x, SP_Y_LBL, lpos.y, SP_Z_LBL, lpos.z, SP_E_LBL, lpos.e);
report_more_positions();
}
// Report the real current position according to the steppers.
@ -237,10 +236,14 @@ void report_real_position() {
#endif
report_logical_position(npos);
report_more_positions();
}
// Report the logical current position according to the most recent G-code command
void report_current_position() { report_logical_position(current_position); }
void report_current_position() {
report_logical_position(current_position);
report_more_positions();
}
/**
* Report the logical current position according to the most recent G-code command.
@ -1776,6 +1779,13 @@ void homeaxis(const AxisEnum axis) {
#endif
homing_feedrate(axis)
);
#if ENABLED(SENSORLESS_HOMING)
planner.synchronize();
#if IS_CORE
if (axis != NORMAL_AXIS) safe_delay(200); // Short delay to allow belts to spring back
#endif
#endif
}
#endif

69
Marlin/src/module/thermistor/thermistor_202.h

@ -0,0 +1,69 @@
//
// Unknown 200K thermistor on a Copymaster 3D hotend
// Temptable sent from dealer technologyoutlet.co.uk
//
const short temptable_202[][2] PROGMEM = {
{ OV( 1), 864 },
{ OV( 35), 300 },
{ OV( 38), 295 },
{ OV( 41), 290 },
{ OV( 44), 285 },
{ OV( 47), 280 },
{ OV( 51), 275 },
{ OV( 55), 270 },
{ OV( 60), 265 },
{ OV( 65), 260 },
{ OV( 70), 255 },
{ OV( 76), 250 },
{ OV( 83), 245 },
{ OV( 90), 240 },
{ OV( 98), 235 },
{ OV( 107), 230 },
{ OV( 116), 225 },
{ OV( 127), 220 },
{ OV( 138), 215 },
{ OV( 151), 210 },
{ OV( 164), 205 },
{ OV( 179), 200 },
{ OV( 195), 195 },
{ OV( 213), 190 },
{ OV( 232), 185 },
{ OV( 253), 180 },
{ OV( 275), 175 },
{ OV( 299), 170 },
{ OV( 325), 165 },
{ OV( 352), 160 },
{ OV( 381), 155 },
{ OV( 411), 150 },
{ OV( 443), 145 },
{ OV( 476), 140 },
{ OV( 511), 135 },
{ OV( 546), 130 },
{ OV( 581), 125 },
{ OV( 617), 120 },
{ OV( 652), 115 },
{ OV( 687), 110 },
{ OV( 720), 105 },
{ OV( 753), 100 },
{ OV( 783), 95 },
{ OV( 812), 90 },
{ OV( 839), 85 },
{ OV( 864), 80 },
{ OV( 886), 75 },
{ OV( 906), 70 },
{ OV( 924), 65 },
{ OV( 940), 60 },
{ OV( 954), 55 },
{ OV( 966), 50 },
{ OV( 976), 45 },
{ OV( 985), 40 },
{ OV( 992), 35 },
{ OV( 998), 30 },
{ OV(1003), 25 },
{ OV(1007), 20 },
{ OV(1011), 15 },
{ OV(1014), 10 },
{ OV(1016), 5 },
{ OV(1018), 0 }
};

3
Marlin/src/module/thermistor/thermistors.h

@ -151,6 +151,9 @@
#if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord
#include "thermistor_201.h"
#endif
#if ANY_THERMISTOR_IS(202) // 200K thermistor in Copymaker3D hotend
#include "thermistor_202.h"
#endif
#if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage for MEGA
#include "thermistor_331.h"
#endif

2
Marlin/src/pins/linux/pins_RAMPS_LINUX.h

@ -271,7 +271,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

5
Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h

@ -52,7 +52,6 @@
#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
//
// Steppers
//
@ -72,7 +71,6 @@
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
//
// Temperature Sensors
// 3.3V max when defined as an analog input
@ -80,7 +78,6 @@
#define TEMP_0_PIN P0_23_A0 // A0 (T0)
#define TEMP_BED_PIN P0_24_A1 // A1 (T1)
//
// Heaters / Fans
//
@ -129,7 +126,6 @@
#endif // HAS_SPI_LCD
/**
* SD Card Reader
*
@ -146,7 +142,6 @@
#endif // SDSUPPORT
/**
* PWMS
*

1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h

@ -172,7 +172,6 @@
#define E0_ENABLE_PIN -1
#endif
#if AXIS_DRIVER_TYPE_E1(TMC2130)
#define E1_CS_PIN P0_10
#undef E1_ENABLE_PIN

2
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h

@ -150,7 +150,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

2
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h

@ -175,7 +175,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

2
Marlin/src/pins/lpc1768/pins_MKS_SBASE.h

@ -313,7 +313,7 @@
#endif
#endif
#if MB(MKS_SBASE) && HAS_TMC220x
#if MB(MKS_SBASE) && HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers

2
Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h

@ -152,7 +152,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

2
Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h

@ -120,7 +120,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

1
Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h

@ -85,7 +85,6 @@
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
//
// Heaters / Fans
//

1
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h

@ -99,7 +99,6 @@
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
//
// Heaters / Fans
//

2
Marlin/src/pins/lpc1769/pins_MKS_SGEN.h

@ -50,7 +50,7 @@
//#define BTN_EN1 P1_23 // EXP2.5
//#define BTN_EN2 P1_22 // EXP2.3
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

86
Marlin/src/pins/pins.h

@ -188,6 +188,8 @@
#include "ramps/pins_TANGO.h" // ATmega2560 env:mega2560
#elif MB(MKS_GEN_L_V2)
#include "ramps/pins_MKS_GEN_L_V2.h" // ATmega2560 env:mega2560
#elif MB(COPYMASTER_3D)
#include "ramps/pins_COPYMASTER_3D.h" // ATmega2560 env:mega2560
//
// RAMBo and derivatives
@ -465,53 +467,53 @@
//
#elif MB(STM32F103RE)
#include "stm32/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
#elif MB(MALYAN_M200)
#include "stm32/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
#include "stm32f1/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
#elif MB(STM3R_MINI)
#include "stm32/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_PRO_VB)
#include "stm32/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI_A30)
#include "stm32/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI)
#include "stm32/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_REV_B)
#include "stm32/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
#elif MB(MORPHEUS)
#include "stm32/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
#elif MB(CHITU3D)
#include "stm32/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
#include "stm32f1/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
#elif MB(MKS_ROBIN)
#include "stm32/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin
#include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin
#elif MB(MKS_ROBIN_MINI)
#include "stm32/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
#include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
#elif MB(MKS_ROBIN_NANO)
#include "stm32/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
#elif MB(MKS_ROBIN_LITE)
#include "stm32/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
#include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
#elif MB(BTT_SKR_MINI_V1_1)
#include "stm32/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_MINI_E3_V1_0)
#include "stm32/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_MINI_E3_V1_2)
#include "stm32/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_E3_DIP)
#include "stm32/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#include "stm32f1/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(JGAURORA_A5S_A1)
#include "stm32/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
#include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
#elif MB(FYSETC_AIO_II)
#include "stm32/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
#include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(FYSETC_CHEETAH)
#include "stm32/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
#include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(FYSETC_CHEETAH_V12)
#include "stm32/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
#include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(LONGER3D_LK)
#include "stm32/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
#include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
#elif MB(MKS_ROBIN_LITE3)
#include "stm32/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
#include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
#elif MB(MKS_ROBIN_PRO)
#include "stm32/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
//
// ARM Cortex-M4F
@ -527,46 +529,46 @@
//
#elif MB(BEAST)
#include "stm32/pins_BEAST.h" // STM32F4 env:STM32F4
#include "stm32f4/pins_BEAST.h" // STM32F4 env:STM32F4
#elif MB(GENERIC_STM32F4)
#include "stm32/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4
#include "stm32f4/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4
#elif MB(ARMED)
#include "stm32/pins_ARMED.h" // STM32F4 env:ARMED
#include "stm32f4/pins_ARMED.h" // STM32F4 env:ARMED
#elif MB(RUMBA32_AUS3D)
#include "stm32/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve
#include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve
#elif MB(RUMBA32_MKS)
#include "stm32/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32_mks
#include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32_mks
#elif MB(BLACK_STM32F407VE)
#include "stm32/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
#include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
#elif MB(STEVAL_3DP001V1)
#include "stm32/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
#include "stm32f4/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
#elif MB(BTT_SKR_PRO_V1_1)
#include "stm32/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO
#include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO
#elif MB(BTT_GTR_V1_0)
#include "stm32/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0
#include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0
#elif MB(BTT_BTT002_V1_0)
#include "stm32/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
#include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
#elif MB(LERDGE_K)
#include "stm32/pins_LERDGE_K.h" // STM32F4 env:STM32F4
#include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:STM32F4
#elif MB(LERDGE_X)
#include "stm32/pins_LERDGE_X.h" // STM32F4 env:STM32F4
#include "stm32f4/pins_LERDGE_X.h" // STM32F4 env:STM32F4
#elif MB(VAKE403D)
#include "stm32/pins_VAKE403D.h" // STM32F4 env:STM32F4
#include "stm32f4/pins_VAKE403D.h" // STM32F4 env:STM32F4
#elif MB(FYSETC_S6)
#include "stm32/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6
#include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6
#elif MB(FLYF407ZG)
#include "stm32/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
#include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
#elif MB(MKS_ROBIN2)
#include "pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
#include "stm32f4/pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
//
// ARM Cortex M7
//
#elif MB(THE_BORG)
#include "stm32/pins_THE_BORG.h" // STM32F7 env:STM32F7
#include "stm32f7/pins_THE_BORG.h" // STM32F7 env:STM32F7
#elif MB(REMRAM_V1)
#include "stm32/pins_REMRAM_V1.h" // STM32F7 env:STM32F7
#include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:STM32F7
//
// Espressif ESP32

1
Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h

@ -96,7 +96,6 @@
#define CASE_LIGHT_PIN 44 // Hardware PWM
// This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team
// decided to ship the printer only with the probe and no additional Z-min
// endstop and the instruction manual advises the user to connect the probe to

34
Marlin/src/pins/ramps/pins_COPYMASTER_3D.h

@ -0,0 +1,34 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#define BOARD_INFO_NAME "Copymaster 3D RAMPS"
#define Z_STEP_PIN 47
#define Y_MAX_PIN 14
#define FIL_RUNOUT_PIN 15
#define SD_DETECT_PIN 66
//
// Import RAMPS 1.4 pins
//
#include "pins_RAMPS.h"

2
Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h

@ -117,8 +117,6 @@
#define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
#endif
//
// Heaters / Fans
//

2
Marlin/src/pins/ramps/pins_FYSETC_F6_13.h

@ -117,7 +117,7 @@
// the jumper next to the limit switch socket when using sensorless homing.
//
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

2
Marlin/src/pins/ramps/pins_FYSETC_F6_14.h

@ -29,7 +29,7 @@
#define Z_MAX_PIN 2
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*/

2
Marlin/src/pins/ramps/pins_MKS_BASE_common.h

@ -29,7 +29,7 @@
#define BOARD_INFO_NAME "MKS BASE"
#endif
#if MKS_BASE_VERSION == 14 || MKS_BASE_VERSION == 15
#if MKS_BASE_VERSION >= 14
//
// Heaters / Fans
//

6
Marlin/src/pins/ramps/pins_RAMPS.h

@ -133,7 +133,9 @@
#define Y_CS_PIN 49
#endif
#define Z_STEP_PIN 46
#ifndef Z_STEP_PIN
#define Z_STEP_PIN 46
#endif
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#ifndef Z_CS_PIN
@ -298,7 +300,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

6
Marlin/src/pins/ramps/pins_TRIGORILLA_14.h

@ -66,13 +66,13 @@
#define RAMPS_D8_PIN TRIGORILLA_FAN0_PIN
#else
// EEB
#define RAMPS_D8_PIN TRIGORILLA_HEATER_BED_PIN
#define RAMPS_D8_PINTRIGORILLA_HEATER_BED_PIN
#define FAN_PIN TRIGORILLA_FAN0_PIN // Override pin 4 in pins_RAMPS.h
#endif
#elif TEMP_SENSOR_BED
// EFB (Anycubic Kossel default)
#define RAMPS_D9_PIN TRIGORILLA_FAN0_PIN
#define RAMPS_D8_PIN TRIGORILLA_HEATER_BED_PIN
#define RAMPS_D8_PINTRIGORILLA_HEATER_BED_PIN
#else
// EFF
#define RAMPS_D9_PIN TRIGORILLA_FAN1_PIN
@ -83,7 +83,7 @@
#define FAN1_PIN TRIGORILLA_FAN1_PIN
#endif
#define FAN2_PIN TRIGORILLA_FAN2_PIN
#define ORIG_E0_AUTO_FAN_PIN TRIGORILLA_FAN2_PIN // Used in Anycubic Kossel example config
#define ORIG_E0_AUTO_FAN_PINTRIGORILLA_FAN2_PIN // Used in Anycubic Kossel example config
#include "pins_RAMPS.h"

2
Marlin/src/pins/ramps/pins_TT_OSCAR.h

@ -99,7 +99,7 @@
#define E4_ENABLE_PIN 47
#define E4_CS_PIN E0_CS_PIN
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

2
Marlin/src/pins/sam/pins_ARCHIM1.h

@ -59,7 +59,6 @@
#define SERVO0_PIN 20 // D20 PB12 (Header J20 20)
#define SERVO1_PIN 21 // D21 PB13 (Header J20 19)
//
// Limit Switches
//
@ -84,7 +83,6 @@
#define FIL_RUNOUT2_PIN 67 // D67 PB16 (Header J20 16)
#endif
//
// Steppers
//

2
Marlin/src/pins/sam/pins_RAMPS_FD_V1.h

@ -205,7 +205,7 @@
#endif // HAS_SPI_LCD
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

2
Marlin/src/pins/samd/pins_RAMPS_144.h

@ -171,7 +171,7 @@
#endif
#endif
#if HAS_TMC220x
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*

1
Marlin/src/pins/sanguino/pins_GEN3_PLUS.h

@ -50,7 +50,6 @@
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'"
#endif

1
Marlin/src/pins/sanguino/pins_GEN7_12.h

@ -74,7 +74,6 @@
#define Y_MAX_PIN 2
#define X_MAX_PIN 6
//
// Z Probe (when not Z_MIN_PIN)
//

4
Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h

@ -138,7 +138,7 @@
#define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
#endif
#if NONE(SPINDLE_FEATURE, LASER_FEATURE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header
#if NONE(SPINDLE_FEATURE, LASER_FEATURE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)// try to use IO Header
#define CASE_LIGHT_PIN 4 // Hardware PWM - see if IO Header is available
#endif
@ -277,7 +277,7 @@
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header
#if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)// try to use IO Header
#define SPINDLE_LASER_ENA_PIN 10 // Pullup or pulldown!
#define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM

201
Marlin/src/pins/stm32/pins_ARMED.h

@ -1,201 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
// https://github.com/ktand/Armed
#pragma once
#ifndef STM32F4
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "Arm'ed supports up to 2 hotends / E-steppers."
#endif
#ifndef ARMED_V1_0
#define ARMED_V1_1
#endif
#undef BOARD_INFO_NAME // Defined on the command line by Arduino Core STM32
#define BOARD_INFO_NAME "Arm'ed"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#define I2C_EEPROM
#undef E2END // Defined in Arduino Core STM32 to be used with EEPROM emulation. This board uses a real EEPROM.
#define E2END 0xFFF // 4KB
//
// Limit Switches
//
#define X_STOP_PIN PE0
#define Y_STOP_PIN PE1
#define Z_STOP_PIN PE14
//
// Z Probe (when not Z_MIN_PIN)
//
//#ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN PA4
//#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA3
#endif
//
// Steppers
//
#ifdef ARMED_SWAP_X_E1
#define X_STEP_PIN PE4
#define X_DIR_PIN PE2
#define X_ENABLE_PIN PE3
#define X_CS_PIN PE5
#else
#define X_STEP_PIN PD3
#define X_DIR_PIN PD2
#define X_ENABLE_PIN PD0
#define X_CS_PIN PD1
#endif
#define Y_STEP_PIN PE11
#define Y_DIR_PIN PE10
#define Y_ENABLE_PIN PE13
#define Y_CS_PIN PE12
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD7
#define Z_ENABLE_PIN PD4
#define Z_CS_PIN PD5
#define E0_STEP_PIN PB5
#define E0_DIR_PIN PB6
#ifdef ARMED_V1_1
#define E0_ENABLE_PIN PC12
#else
#define E0_ENABLE_PIN PB3
#endif
#define E0_CS_PIN PB4
#ifdef ARMED_SWAP_X_E1
#define E1_STEP_PIN PD3
#define E1_DIR_PIN PD2
#define E1_ENABLE_PIN PD0
#define E1_CS_PIN PD1
#else
#define E1_STEP_PIN PE4
#define E1_DIR_PIN PE2
#define E1_ENABLE_PIN PE3
#define E1_CS_PIN PE5
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC0 // Analog Input
#define TEMP_1_PIN PC1 // Analog Input
#define TEMP_BED_PIN PC2 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // Hardware PWM
#define HEATER_1_PIN PA2 // Hardware PWM
#define HEATER_BED_PIN PA0 // Hardware PWM
#define FAN_PIN PC6 // Hardware PWM, Part cooling fan
#define FAN1_PIN PC7 // Hardware PWM, Extruder fan
#define FAN2_PIN PC8 // Hardware PWM, Controller fan
//
// Misc functions
//
#define SDSS PE7
#define LED_PIN PB7 // Heart beat
#define PS_ON_PIN PA10
#define KILL_PIN PA8
#define PWR_LOSS PA4 // Power loss / nAC_FAULT
//
// LCD / Controller
//
#define SD_DETECT_PIN PA15
#define BEEPER_PIN PC9
#if ENABLED(FYSETC_MINI_12864)
//
// See https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
//
#define DOGLCD_A0 PE9
#define DOGLCD_CS PE8
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PB12 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB13
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PB14
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PB15
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PB13
#endif
#else
#define LCD_PINS_RS PE9
#define LCD_PINS_ENABLE PE8
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS PB13
#define DOGLCD_A0 PB14
#endif
#endif
#define BTN_EN1 PC4
#define BTN_EN2 PC5
#define BTN_ENC PC3
//
// Extension pins
//
#define EXT0_PIN PB0
#define EXT1_PIN PB1
#define EXT2_PIN PB2
#define EXT3_PIN PD8
#define EXT4_PIN PD9
#define EXT5_PIN PD10
#define EXT6_PIN PD11
#define EXT7_PIN PD12
#define EXT8_PIN PB10
#define EXT9_PIN PB11

285
Marlin/src/pins/stm32/pins_BEAST.h

@ -1,285 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#if !defined(__STM32F1__) && !defined(__STM32F4__)
#error "Oops! Select an STM32F1/4 board in 'Tools > Board.'"
#endif
/**
* 21017 Victor Perez Marlin for stm32f1 test
*/
#define BOARD_INFO_NAME "Beast STM32"
#define DEFAULT_MACHINE_NAME "STM32F103RET6"
// Enable I2C_EEPROM for testing
#define I2C_EEPROM
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Steppers
//
#define X_STEP_PIN PE0
#define X_DIR_PIN PE1
#define X_ENABLE_PIN PC0
#define X_MIN_PIN PD5
#define X_MAX_PIN -1
#define Y_STEP_PIN PE2
#define Y_DIR_PIN PE3
#define Y_ENABLE_PIN PC1
#define Y_MIN_PIN PD6
#define Y_MAX_PIN
#define Z_STEP_PIN PE4
#define Z_DIR_PIN PE5
#define Z_ENABLE_PIN PC2
#define Z_MIN_PIN PD7
#define Z_MAX_PIN -1
#define Y2_STEP_PIN -1
#define Y2_DIR_PIN -1
#define Y2_ENABLE_PIN -1
#define Z2_STEP_PIN -1
#define Z2_DIR_PIN -1
#define Z2_ENABLE_PIN -1
#define E0_STEP_PIN PE6
#define E0_DIR_PIN PE7
#define E0_ENABLE_PIN PC3
/**
* TODO: Currently using same Enable pin to all steppers.
*/
#define E1_STEP_PIN PE8
#define E1_DIR_PIN PE9
#define E1_ENABLE_PIN PC4
#define E2_STEP_PIN PE10
#define E2_DIR_PIN PE11
#define E2_ENABLE_PIN PC5
//
// Misc. Functions
//
#define SDSS PA15
#define LED_PIN PB2
#define PS_ON_PIN -1
#define KILL_PIN -1
//
// Heaters / Fans
//
#define HEATER_0_PIN PD12 // EXTRUDER 1
#define HEATER_1_PIN PD13
#define HEATER_2_PIN PD14
#define HEATER_BED_PIN PB9 // BED
#define HEATER_BED2_PIN -1 // BED2
#define HEATER_BED3_PIN -1 // BED3
#ifndef FAN_PIN
#define FAN_PIN PB10
#endif
#define FAN_SOFT_PWM
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA0 // Analog Input
#define TEMP_0_PIN PA1 // Analog Input
#define TEMP_1_PIN PA2 // Analog Input
#define TEMP_2_PIN PA3 // Analog Input
//
// LCD Pins
//
#if HAS_SPI_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#else
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#endif
#endif
#if ENABLED(NEWPANEL)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#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
#elif ANY(VIKI2, miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS 53
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_BACKLIGHT_PIN 33
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
// not connected to a pin
#define SD_DETECT_PIN 49
#else
// Beeper on AUX-4
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SHIFT_OUT 40
#define SHIFT_CLK 44
#define SHIFT_LD 42
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#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
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#else
//#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif
#endif // NEWPANEL
#endif // HAS_SPI_LCD

155
Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h

@ -1,155 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* STM32F407VET6 with RAMPS-like shield
* 'Black' STM32F407VET6 board - http://wiki.stm32duino.com/index.php?title=STM32F407
* Shield - https://github.com/jmz52/Hardware
*/
#if !defined(STM32F4) && !defined(STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "Black STM32F4VET6 supports up to 2 hotends / E-steppers."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Black STM32F4VET6"
#endif
#define DEFAULT_MACHINE_NAME "STM32F407VET6"
//#define I2C_EEPROM
//#define E2END 0x1FFF // 8KB
#define SRAM_EEPROM_EMULATION
//
// Servos
//
#define SERVO0_PIN PC6
#define SERVO1_PIN PC7
//
// Limit Switches
//
#define X_MIN_PIN PC13
#define X_MAX_PIN PA15
#define Y_MIN_PIN PA5
#define Y_MAX_PIN PD12
#define Z_MIN_PIN PD14
#define Z_MAX_PIN PD15
//
// Steppers
//
#define X_STEP_PIN PC4
#define X_DIR_PIN PA4
#define X_ENABLE_PIN PE7
#define Y_STEP_PIN PE5
#define Y_DIR_PIN PE2
#define Y_ENABLE_PIN PE6
#define Z_STEP_PIN PD5
#define Z_DIR_PIN PD3
#define Z_ENABLE_PIN PD6
#define E0_STEP_PIN PD7
#define E0_DIR_PIN PD0
#define E0_ENABLE_PIN PB9
#define E1_STEP_PIN PE0
#define E1_DIR_PIN PE1
#define E1_ENABLE_PIN PB8
//
// Temperature Sensors
//
#define TEMP_0_PIN PC0 // T0
#define TEMP_1_PIN PC1 // T1
#define TEMP_BED_PIN PC2 // TB
#ifndef TEMP_CHAMBER_PIN
#define TEMP_CHAMBER_PIN PC3 // TC
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN PA2 // Heater0
#define HEATER_1_PIN PA3 // Heater1
#define HEATER_BED_PIN PA1 // Hotbed
#define FAN_PIN PE9 // Fan0
#define FAN1_PIN PE11 // Fan1
#define FAN2_PIN PE13 // Fan2
#define FAN3_PIN PE14 // Fan3
//
// Misc. Functions
//
#define LED_PIN PA6
//#define LED_PIN PA7
#define KILL_PIN PB1
//
// LCD / Controller
//
//#define SD_DETECT_PIN PC5
//#define SD_DETECT_PIN PA8 // SDIO SD_DETECT_PIN, external SDIO card reader only
#define BEEPER_PIN PD10
#define LCD_PINS_RS PE15
#define LCD_PINS_ENABLE PD8
#define LCD_PINS_D4 PE10
#define LCD_PINS_D5 PE12
#define LCD_PINS_D6 PD1
#define LCD_PINS_D7 PE8
#define BTN_ENC PD9
#define BTN_EN1 PD4
#define BTN_EN2 PD13
#define DOGLCD_CS LCD_PINS_D5
#define DOGLCD_A0 LCD_PINS_D6
//
// Onboard SD support
//
#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
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
#define SDIO_SUPPORT // Use SDIO for onboard SD
#ifndef SDIO_SUPPORT
#define SOFTWARE_SPI // Use soft SPI for onboard SD
#define SDSS SDIO_D3_PIN
#define SCK_PIN SDIO_CK_PIN
#define MISO_PIN SDIO_D0_PIN
#define MOSI_PIN SDIO_CMD_PIN
#endif
#endif

391
Marlin/src/pins/stm32/pins_BTT_GTR_V1_0.h

@ -1,391 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef TARGET_STM32F4
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 8 || E_STEPPERS > 8
#error "BIGTREE GTR V1.0 supports up to 8 hotends / E-steppers."
#elif HOTENDS > MAX_EXTRUDERS || E_STEPPERS > MAX_EXTRUDERS
#error "Marlin extruder/hotends limit! Increase MAX_EXTRUDERS to continue."
#endif
#define BOARD_INFO_NAME "BIGTREE GTR 1.0"
// Use one of these or SDCard-based Emulation will be used
//#define I2C_EEPROM
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
#define TP // Enable to define servo and probe pins
//
// Servos
//
#if ENABLED(TP)
#define SERVO0_PIN PB11
#endif
#define PS_ON_PIN PH6
//
// Limit Switches
//
#define X_MIN_PIN PF2
#define X_MAX_PIN PG14
#define Y_MIN_PIN PC13
#define Y_MAX_PIN PG9
#define Z_MIN_PIN PE0
#define Z_MAX_PIN PD3
//
// Pins on the extender
//
//#define X_MIN_PIN PI4
//#define X2_MIN_PIN PF12
//#define Y_MIN_PIN PF4
//#define Y2_MIN_PIN PI7
//#define Z_MIN_PIN PF6
#if ENABLED(TP) && !defined(Z_MIN_PROBE_PIN)
#define Z_MIN_PROBE_PIN PH11 // Z Probe must be PH11
#endif
//
// Steppers
//
#define X_STEP_PIN PC15
#define X_DIR_PIN PF0
#define X_ENABLE_PIN PF1
#ifndef X_CS_PIN
#define X_CS_PIN PC14
#endif
#define Y_STEP_PIN PE3
#define Y_DIR_PIN PE2
#define Y_ENABLE_PIN PE4
#ifndef Y_CS_PIN
#define Y_CS_PIN PE1
#endif
#define Z_STEP_PIN PB8
#define Z_DIR_PIN PB7 // PB7
#define Z_ENABLE_PIN PB9
#ifndef Z_CS_PIN
#define Z_CS_PIN PB5
#endif
#define E0_STEP_PIN PG12
#define E0_DIR_PIN PG11
#define E0_ENABLE_PIN PG13
#ifndef E0_CS_PIN
#define E0_CS_PIN PG10
#endif
#define E1_STEP_PIN PD6
#define E1_DIR_PIN PD5
#define E1_ENABLE_PIN PD7
#ifndef E1_CS_PIN
#define E1_CS_PIN PD4
#endif
#define E2_STEP_PIN PD1
#define E2_DIR_PIN PD0
#define E2_ENABLE_PIN PD2
#ifndef E2_CS_PIN
#define E2_CS_PIN PC12
#endif
#define E3_STEP_PIN PF3
#define E3_DIR_PIN PG3
#define E3_ENABLE_PIN PF8
#ifndef E3_CS_PIN
#define E3_CS_PIN PG4
#endif
#define E4_STEP_PIN PD14
#define E4_DIR_PIN PD11
#define E4_ENABLE_PIN PG2
#ifndef E4_CS_PIN
#define E4_CS_PIN PE15
#endif
#define E5_STEP_PIN PE12
#define E5_DIR_PIN PE10
#define E5_ENABLE_PIN PF14
#ifndef E5_CS_PIN
#define E5_CS_PIN PE7
#endif
#define E6_STEP_PIN PG0
#define E6_DIR_PIN PG1
#define E6_ENABLE_PIN PE8
#ifndef E6_CS_PIN
#define E6_CS_PIN PF15
#endif
#define E7_STEP_PIN PH12
#define E7_DIR_PIN PH15
#define E7_ENABLE_PIN PI0
#ifndef E7_CS_PIN
#define E7_CS_PIN PH14
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PG15
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB6
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB3
#endif
#endif
#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//#define E5_HARDWARE_SERIAL Serial1
//#define E6_HARDWARE_SERIAL Serial1
//#define E7_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN PC14
#define X_SERIAL_RX_PIN PC14
#define Y_SERIAL_TX_PIN PE1
#define Y_SERIAL_RX_PIN PE1
#define Z_SERIAL_TX_PIN PB5
#define Z_SERIAL_RX_PIN PB5
#define E0_SERIAL_TX_PIN PG10
#define E0_SERIAL_RX_PIN PG10
#define E1_SERIAL_TX_PIN PD4
#define E1_SERIAL_RX_PIN PD4
#define E2_SERIAL_TX_PIN PC12
#define E2_SERIAL_RX_PIN PC12
#define E3_SERIAL_TX_PIN PG4
#define E3_SERIAL_RX_PIN PG4
#define E4_SERIAL_TX_PIN PE15
#define E4_SERIAL_RX_PIN PE15
#define E5_SERIAL_TX_PIN PE7
#define E5_SERIAL_RX_PIN PE7
#define E6_SERIAL_TX_PIN PF15
#define E6_SERIAL_RX_PIN PF15
#define E7_SERIAL_TX_PIN PH14
#define E7_SERIAL_RX_PIN PH14
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // T1 <-> E0
#define TEMP_1_PIN PC2 // T2 <-> E1
#define TEMP_2_PIN PC3 // T3 <-> E2
#define TEMP_3_PIN PA3 // T4 <-> E3
#define TEMP_4_PIN PF9 // T5 <-> E4
#define TEMP_5_PIN PF10 // T6 <-> E5
#define TEMP_6_PIN PF7 // T7 <-> E6
#define TEMP_7_PIN PF5 // T8 <-> E7
#define TEMP_BED_PIN PC0 // T0 <-> Bed
// SPI for Max6675 or Max31855 Thermocouple
// Uses a separate SPI bus
// If you have a two-way thermocouple, you can customize two THERMO_CSx_PIN pins (x:1~2)
#define THERMO_SCK_PIN PI1 // SCK
#define THERMO_DO_PIN PI2 // MISO
#define THERMO_CS1_PIN PH9 // CS1
#define THERMO_CS2_PIN PH2 // CS2
#define MAX6675_SS_PIN THERMO_CS1_PIN
#define MAX6675_SS2_PIN THERMO_CS2_PIN
#define MAX6675_SCK_PIN THERMO_SCK_PIN
#define MAX6675_DO_PIN THERMO_DO_PIN
//
// Heaters / Fans
//
#define HEATER_0_PIN PB1 // Heater0
#define HEATER_1_PIN PA1 // Heater1
#define HEATER_2_PIN PB0 // Heater2
#define HEATER_3_PIN PD15 // Heater3
#define HEATER_4_PIN PD13 // Heater4
#define HEATER_5_PIN PD12 // Heater5
#define HEATER_6_PIN PE13 // Heater6
#define HEATER_7_PIN PI6 // Heater7
#define HEATER_BED_PIN PA2 // Hotbed
#define FAN_PIN PE5 // Fan0
#define FAN1_PIN PE6 // Fan1
#define FAN2_PIN PC8 // Fan2
#define FAN3_PIN PI5 // Fan3
#define FAN4_PIN PE9 // Fan4
#define FAN5_PIN PE11 // Fan5
//#define FAN6_PIN PC9 // Fan6
//#define FAN7_PIN PE14 // Fan7
//
// By default the onboard SD (SPI1) is enabled
//
#define CUSTOM_SPI_PINS
#if DISABLED(CUSTOM_SPI_PINS)
#define SDSS PB12
#endif
// HAL SPI1 pins group
#if ENABLED(CUSTOM_SPI_PINS)
#define SDSS PA4
#define SD_DETECT_PIN PC4
#define LCD_SDSS PA4
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SS_PIN PA4 // Chip select for SD card used by Marlin
#endif
/**
* _____ _____
* NC | · · | GND 5V | · · | GND
* RESET | · · | PB10(SD_DETECT) (LCD_D7) PG5 | · · | PG6 (LCD_D6)
* (MOSI)PB15 | · · | PH10(BTN_EN2) (LCD_D5) PG7 | · · | PG8 (LCD_D4)
* (SD_SS)PB12 | · · | PD10(BTN_EN1) (LCD_RS) PA8 | · · | PC10 (LCD_EN)
* (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA15 | · · | PC11 (BEEPER)
*
* EXP2 EXP1
*/
//
// LCDs and Controllers
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC11
#define BTN_ENC PA15
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PA8
#define BTN_EN1 PD10
#define BTN_EN2 PH10
#define LCD_PINS_ENABLE PG7
#define LCD_PINS_D4 PG8
//#undef ST7920_DELAY_1
//#undef ST7920_DELAY_2
//#undef ST7920_DELAY_3
#else
#define LCD_PINS_RS PA8
#define BTN_EN1 PD10
#define BTN_EN2 PH10
#if DISABLED(CUSTOM_SPI_PINS)
#define SD_DETECT_PIN PB10
#define LCD_SDSS PB12
#endif
#define LCD_PINS_ENABLE PC10
#define LCD_PINS_D4 PG8
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS PC10
#define DOGLCD_A0 PA8
//#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PG8 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PG7
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PG6
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PG5
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PF13
#endif
#endif // !FYSETC_MINI_12864
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PG7
#define LCD_PINS_D6 PG6
#define LCD_PINS_D7 PG5
#endif
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
//#define DOGLCD_CS PB12
//#define DOGLCD_A0 PA8
//#define LCD_PINS_DC PB14
//#define DOGLCD_MOSI PB15
#endif // HAS_SPI_LCD

191
Marlin/src/pins/stm32/pins_BTT_SKR_MINI_E3.h

@ -1,191 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef TARGET_STM32F1
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
// Release PB3/PB4 (E0 STP/DIR) from JTAG pins
#define DISABLE_JTAG
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
//
// Servos
//
#define SERVO0_PIN PA1
//
// Limit Switches
//
#define X_STOP_PIN PC0
#define Y_STOP_PIN PC1
#define Z_STOP_PIN PC2
//
// Z Probe must be this pins
//
#define Z_MIN_PROBE_PIN PC14
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC15 // "E0-STOP"
#endif
//
// Steppers
//
#define X_ENABLE_PIN PB14
#define X_STEP_PIN PB13
#define X_DIR_PIN PB12
#define Y_ENABLE_PIN PB11
#define Y_STEP_PIN PB10
#define Y_DIR_PIN PB2
#define Z_ENABLE_PIN PB1
#define Z_STEP_PIN PB0
#define Z_DIR_PIN PC5
#define E0_ENABLE_PIN PD2
#define E0_STEP_PIN PB3
#define E0_DIR_PIN PB4
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // Analog Input
#define TEMP_BED_PIN PC3 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PC8 // EXTRUDER
#define HEATER_BED_PIN PC9 // BED
#define FAN_PIN PA8
//
// USB connect control
//
#define USB_CONNECT_PIN PC13
#define USB_CONNECT_INVERTING false
#define SD_DETECT_PIN PC4
/**
* _____
* 5V | 1 2 | GND
* (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS)
* (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2)
* RESET | 7 8 | PA9 (BTN_EN1)
* (BTN_ENC) PB6 | 9 10| PB5 (BEEPER)
* -----
* EXP1
*/
#define EXPA1_03_PIN PB7
#define EXPA1_04_PIN PB8
#define EXPA1_05_PIN PB9
#define EXPA1_06_PIN PA10
#define EXPA1_07_PIN -1
#define EXPA1_08_PIN PA9
#define EXPA1_09_PIN PB6
#define EXPA1_10_PIN PB5
#if HAS_SPI_LCD
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXPA1_10_PIN
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#define BTN_ENC EXPA1_09_PIN
#define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_ENABLE EXPA1_03_PIN
#define LCD_PINS_D4 EXPA1_05_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3.h' for details. Comment out this line to continue."
#define LCD_PINS_RS EXPA1_05_PIN
#define LCD_PINS_ENABLE EXPA1_09_PIN
#define LCD_PINS_D4 EXPA1_04_PIN
#define LCD_PINS_D5 EXPA1_06_PIN
#define LCD_PINS_D6 EXPA1_08_PIN
#define LCD_PINS_D7 EXPA1_10_PIN
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
/** Creality Ender-2 display pinout
* _____
* 5V | 1 2 | GND
* (MOSI) PB7 | 3 4 | PB8 (LCD_RS)
* (LCD_A0) PB9 | 5 6 PA10 (BTN_EN2)
* RESET | 7 8 | PA9 (BTN_EN1)
* (BTN_ENC) PB6 | 9 10| PB5 (SCK)
* -----
* EXP1
*/
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#define BTN_ENC EXPA1_09_PIN
#define DOGLCD_CS EXPA1_04_PIN
#define DOGLCD_A0 EXPA1_05_PIN
#define DOGLCD_SCK EXPA1_10_PIN
#define DOGLCD_MOSI EXPA1_03_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#else
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BIGTREE_SKR_MINI_E3."
#endif
#endif // HAS_SPI_LCD
//
// SD Support
//
#define HAS_ONBOARD_SD
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define ON_BOARD_SPI_DEVICE 1 // SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card

286
Marlin/src/pins/stm32/pins_BTT_SKR_PRO_V1_1.h

@ -1,286 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef TARGET_STM32F4
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 3 || E_STEPPERS > 3
#error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers."
#endif
#define BOARD_INFO_NAME "BIGTREE SKR Pro 1.1" // redefined?
// Use one of these or SDCard-based Emulation will be used
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
//
// Servos
//
#define SERVO0_PIN PA1
//
// Limit Switches
//
#define X_MIN_PIN PB10
#define X_MAX_PIN PE15
#define Y_MIN_PIN PE12
#define Y_MAX_PIN PE10
#define Z_MIN_PIN PG8
#define Z_MAX_PIN PG5
//
// Z Probe must be this pins
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PA2
#endif
//
// Steppers
//
#define X_STEP_PIN PE9
#define X_DIR_PIN PF1
#define X_ENABLE_PIN PF2
#ifndef X_CS_PIN
#define X_CS_PIN PA15
#endif
#define Y_STEP_PIN PE11
#define Y_DIR_PIN PE8
#define Y_ENABLE_PIN PD7
#ifndef Y_CS_PIN
#define Y_CS_PIN PB8
#endif
#define Z_STEP_PIN PE13
#define Z_DIR_PIN PC2
#define Z_ENABLE_PIN PC0
#ifndef Z_CS_PIN
#define Z_CS_PIN PB9
#endif
#define E0_STEP_PIN PE14
#define E0_DIR_PIN PA0
#define E0_ENABLE_PIN PC3
#ifndef E0_CS_PIN
#define E0_CS_PIN PB3
#endif
#define E1_STEP_PIN PD15
#define E1_DIR_PIN PE7
#define E1_ENABLE_PIN PA3
#ifndef E1_CS_PIN
#define E1_CS_PIN PG15
#endif
#define E2_STEP_PIN PD13
#define E2_DIR_PIN PG9
#define E2_ENABLE_PIN PF0
#ifndef E2_CS_PIN
#define E2_CS_PIN PG12
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PC12
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PC11
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PC10
#endif
#endif
#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN PC13
#define X_SERIAL_RX_PIN PC13
#define Y_SERIAL_TX_PIN PE3
#define Y_SERIAL_RX_PIN PE3
#define Z_SERIAL_TX_PIN PE1
#define Z_SERIAL_RX_PIN PE1
#define E0_SERIAL_TX_PIN PD4
#define E0_SERIAL_RX_PIN PD4
#define E1_SERIAL_TX_PIN PD1
#define E1_SERIAL_RX_PIN PD1
#define E2_SERIAL_TX_PIN PD6
#define E2_SERIAL_RX_PIN PD6
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PF4 // T1 <-> E0
#define TEMP_1_PIN PF5 // T2 <-> E1
#define TEMP_2_PIN PF6 // T3 <-> E2
#define TEMP_BED_PIN PF3 // T0 <-> Bed
//
// Heaters / Fans
//
#define HEATER_0_PIN PB1 // Heater0
#define HEATER_1_PIN PD14 // Heater1
#define HEATER_2_PIN PB0 // Heater1
#define HEATER_BED_PIN PD12 // Hotbed
#define FAN_PIN PC8 // Fan0
#define FAN1_PIN PE5 // Fan1
#define FAN2_PIN PE6 // Fan2
//
// Misc. Functions
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD
#endif
//
// Onboard SD card
// NOT compatible with LCD
//
#if SDCARD_CONNECTION == ONBOARD && !HAS_SPI_LCD
#define SOFTWARE_SPI // Use soft SPI for onboard SD
#define SDSS PA4
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PB5
#else
#define SDSS PB12
#endif
/**
* _____ _____
* NC | · · | GND 5V | · · | GND
* RESET | · · | PF12(SD_DETECT) (LCD_D7) PG7 | · · | PG6 (LCD_D6)
* (MOSI)PB15 | · · | PF11(BTN_EN2) (LCD_D5) PG3 | · · | PG2 (LCD_D4)
* (SD_SS)PB12 | · · | PG10(BTN_EN1) (LCD_RS) PD10 | · · | PD11 (LCD_EN)
* (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA8 | · · | PG4 (BEEPER)
*
* EXP2 EXP1
*/
//
// LCDs and Controllers
//
#if HAS_SPI_LCD
#define BEEPER_PIN PG4
#define BTN_ENC PA8
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PG6
#define BTN_EN1 PD11
#define BTN_EN2 PG2
#define LCD_PINS_ENABLE PG7
#define LCD_PINS_D4 PG3
// CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
// It will be defined again at the #HAS_GRAPHICAL_LCD section below.
#undef ST7920_DELAY_1
#undef ST7920_DELAY_2
#undef ST7920_DELAY_3
#else
#define LCD_PINS_RS PD10
#define BTN_EN1 PG10
#define BTN_EN2 PF11
#define SD_DETECT_PIN PF12
#define LCD_SDSS PB12
#define LCD_PINS_ENABLE PD11
#define LCD_PINS_D4 PG2
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS PD11
#define DOGLCD_A0 PD10
//#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PG2 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PG3
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PG6
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PG7
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PG3
#endif
#endif // !FYSETC_MINI_12864
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PG3
#define LCD_PINS_D6 PG6
#define LCD_PINS_D7 PG7
#endif
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif // HAS_SPI_LCD

283
Marlin/src/pins/stm32/pins_CHITU3D.h

@ -1,283 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#if !defined(__STM32F1__) && !defined(__STM32F4__)
#error "Oops! Select an STM32F1/4 board in 'Tools > Board.'"
#endif
/**
* 2017 Victor Perez Marlin for stm32f1 test
*/
#define BOARD_INFO_NAME "Chitu3D"
#define DEFAULT_MACHINE_NAME "STM32F103RET6"
// Enable I2C_EEPROM for testing
//#define I2C_EEPROM
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Steppers
//
#define X_STEP_PIN PE5
#define X_DIR_PIN PE6
#define X_ENABLE_PIN PC13
#define X_MIN_PIN PG10
#define X_MAX_PIN -1
#define Y_STEP_PIN PE2
#define Y_DIR_PIN PE3
#define Y_ENABLE_PIN PE4
#define Y_MIN_PIN PA12
#define Y_MAX_PIN
#define Z_STEP_PIN PB9
#define Z_DIR_PIN PE0
#define Z_ENABLE_PIN PE1
#define Z_MIN_PIN PA14
#define Z_MAX_PIN -1
#define Y2_STEP_PIN -1
#define Y2_DIR_PIN -1
#define Y2_ENABLE_PIN -1
#define Z2_STEP_PIN -1
#define Z2_DIR_PIN -1
#define Z2_ENABLE_PIN -1
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB5
#define E0_ENABLE_PIN PB8
#define E1_STEP_PIN -1
#define E1_DIR_PIN -1
#define E1_ENABLE_PIN -1
#define E2_STEP_PIN -1
#define E2_DIR_PIN -1
#define E2_ENABLE_PIN -1
//
// Misc. Functions
//
#define SDSS -1
#define LED_PIN -1
#define CASE_LIGHT_PIN 8
#define PS_ON_PIN -1
#define KILL_PIN PD6 // LED strip 24v
//
// Heaters / Fans
//
#define HEATER_0_PIN PD12 // HOT-END
#define HEATER_1_PIN -1
#define HEATER_2_PIN -1
#define HEATER_BED_PIN PG11 // HOT-BED
#define HEATER_BED2_PIN -1 // BED2
#define HEATER_BED3_PIN -1 // BED3
#ifndef FAN_PIN
#define FAN_PIN PG14 // MAIN BOARD FAN
#endif
#define FAN_SOFT_PWM
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA0 // Analog Input
#define TEMP_0_PIN PA1 // Analog Input
#define TEMP_1_PIN -1 // Analog Input
#define TEMP_2_PIN -1 // Analog Input
//
// LCD Pins
//
#if HAS_SPI_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#else
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#endif
#endif
#if ENABLED(NEWPANEL)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#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
#elif ANY(VIKI2, miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS 53
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_BACKLIGHT_PIN 33
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
// not connected to a pin
#define SD_DETECT_PIN 49
#else
// Beeper on AUX-4
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SHIFT_OUT 40
#define SHIFT_CLK 44
#define SHIFT_LD 42
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#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
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#else
//#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif
#endif // NEWPANEL
#endif // HAS_SPI_LCD

266
Marlin/src/pins/stm32/pins_FLYF407ZG.h

@ -1,266 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#if !defined(STM32F4) && !defined(STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 6 || E_STEPPERS > 6
#error "FLYF407ZG supports up to 6 hotends / E-steppers."
#endif
#define BOARD_INFO_NAME "FLYF407ZG"
#define BOARD_WEBSITE_URL "github.com/FLYmaker/FLYF407ZG"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#undef E2END
#define E2END 0xFFF // 4KB
//
// Servos
//
#define SERVO0_PIN PE11
//
// Limit Switches
//
#define X_MIN_PIN PC3
#define X_MAX_PIN PC2
#define Y_MIN_PIN PF2
#define Y_MAX_PIN PF1
#define Z_MIN_PIN PF0
#define Z_MAX_PIN PC15
//
// Z Probe (when not Z_MIN_PIN)
//
#define Z_MIN_PROBE_PIN PC14 // Z3_PIN
//
// Steppers
//
#define X_STEP_PIN PB9
#define X_DIR_PIN PE0
#define X_ENABLE_PIN PE1
#ifndef X_CS_PIN
#define X_CS_PIN PG13
#endif
#define Y_STEP_PIN PB8
#define Y_DIR_PIN PG11
#define Y_ENABLE_PIN PG12
#ifndef Y_CS_PIN
#define Y_CS_PIN PG10
#endif
#define Z_STEP_PIN PA8
#define Z_DIR_PIN PD6
#define Z_ENABLE_PIN PD7
#ifndef Z_CS_PIN
#define Z_CS_PIN PD5
#endif
#define E0_STEP_PIN PC7
#define E0_DIR_PIN PD3
#define E0_ENABLE_PIN PD4
#ifndef E0_CS_PIN
#define E0_CS_PIN PD1
#endif
#define E1_STEP_PIN PC6
#define E1_DIR_PIN PA15
#define E1_ENABLE_PIN PD0
#ifndef E1_CS_PIN
#define E1_CS_PIN PA14
#endif
#define E2_STEP_PIN PD15
#define E2_DIR_PIN PG7
#define E2_ENABLE_PIN PG8
#ifndef E2_CS_PIN
#define E2_CS_PIN PG6
#endif
#define E3_STEP_PIN PD14
#define E3_DIR_PIN PG4
#define E3_ENABLE_PIN PG5
#ifndef E3_CS_PIN
#define E3_CS_PIN PG3
#endif
#define E4_STEP_PIN PD13
#define E4_DIR_PIN PD11
#define E4_ENABLE_PIN PG2
#ifndef E4_CS_PIN
#define E4_CS_PIN PD10
#endif
#define E5_STEP_PIN PD12
#define E5_DIR_PIN PD8
#define E5_ENABLE_PIN PD9
#ifndef E5_CS_PIN
#define E5_CS_PIN PB12
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // Analog Input
#define TEMP_1_PIN PC1 // Analog Input
#define TEMP_2_PIN PC0 // Analog Input
#define TEMP_3_PIN PF10 // Analog Input
#define TEMP_4_PIN PF5 // Analog Input
#define TEMP_5_PIN PF4 // Analog Input
#define TEMP_BED_PIN PF3 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PF7
#define HEATER_1_PIN PF6
#define HEATER_2_PIN PE6
#define HEATER_3_PIN PE5
#define HEATER_4_PIN PE4
#define HEATER_5_PIN PA2
#define HEATER_BED_PIN PE2
#ifndef FAN_PIN
#define FAN_PIN PF8
#endif
#define FAN1_PIN PF9
#define FAN2_PIN PE3
#define FAN3_PIN PA1
#define FAN4_PIN PE13
#define FAN5_PIN PB11
//
// Onboard SD support
//
#define SDIO_D0_PIN PC8
#define SDIO_D1_PIN PC9
//#define SD_CARD_DETECT_PIN PC13
#define SDIO_D2_PIN PC10
#define SDIO_D3_PIN PC11
#define SDIO_CK_PIN PC12
#define SDIO_CMD_PIN PD2
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
#define SDIO_SUPPORT // Use SDIO for onboard SD
#ifndef SDIO_SUPPORT
#define SOFTWARE_SPI // Use soft SPI for onboard SD
#define SDSS SDIO_D3_PIN
#define SCK_PIN SDIO_CK_PIN
#define MISO_PIN SDIO_D0_PIN
#define MOSI_PIN SDIO_CMD_PIN
#endif
#endif
//
// Trinamic Software SPI
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PB15
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB14
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB13
#endif
#endif
//
// Trinamic Software Serial
//
#if HAS_TMC220x
#define X_SERIAL_TX_PIN PG13
#define X_SERIAL_RX_PIN PG13
#define Y_SERIAL_TX_PIN PG10
#define Y_SERIAL_RX_PIN PG10
#define Z_SERIAL_TX_PIN PD5
#define Z_SERIAL_RX_PIN PD5
#define E0_SERIAL_TX_PIN PD1
#define E0_SERIAL_RX_PIN PD1
#define E1_SERIAL_TX_PIN PA14
#define E1_SERIAL_RX_PIN PA14
#define E2_SERIAL_TX_PIN PG6
#define E2_SERIAL_RX_PIN PG6
#define E3_SERIAL_TX_PIN PG3
#define E3_SERIAL_RX_PIN PG3
#define E4_SERIAL_TX_PIN PD10
#define E4_SERIAL_RX_PIN PD10
#define E5_SERIAL_TX_PIN PB12
#define E5_SERIAL_RX_PIN PB12
#endif
//
// LCD / Controller
//
#define SCK_PIN PB13
#define MISO_PIN PB14
#define MOSI_PIN PB15
#define SDSS PF11
#define SD_DETECT_PIN PB2
#define BEEPER_PIN PB10
#define LCD_PINS_RS PE12
#define LCD_PINS_ENABLE PE14
#define LCD_PINS_D4 PE10
#define LCD_PINS_D5 PE9
#define LCD_PINS_D6 PE8
#define LCD_PINS_D7 PE7
#define BTN_EN1 PC4
#define BTN_EN2 PC5
#define BTN_ENC PE15
//
// Filament runout
//
#define FIL_RUNOUT_PIN PA3
//
// ST7920 Delays
//
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif

266
Marlin/src/pins/stm32/pins_FYSETC_S6.h

@ -1,266 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef STM32F4
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 3 || E_STEPPERS > 3
#error "RUMBA32 supports up to 3 hotends / E-steppers."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "FYSETC_S6"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#endif
// change the prio to 3 , 2 is for software serial
//#define TEMP_TIMER_IRQ_PRIO 3
//
// EEPROM Emulation
//
#define FLASH_EEPROM_EMULATION
#if ENABLED(FLASH_EEPROM_EMULATION)
#define FLASH_EEPROM_LEVELING
#endif
//#define SRAM_EEPROM_EMULATION
//#define I2C_EEPROM
#ifdef I2C_EEPROM
#undef E2END // Defined in Arduino Core STM32 to be used with EEPROM emulation. This board uses a real EEPROM.
#define E2END 0xFFF // 4KB
#endif
//
// Servos
//
#define SERVO0_PIN PA3
//
// Limit Switches
//
#define X_MIN_PIN PB14
#define X_MAX_PIN PA1
#define Y_MIN_PIN PB13
#define Y_MAX_PIN PA2
#define Z_MIN_PIN PA0
#define Z_MAX_PIN PA3
//
// Filament Sensor
// share with X_MAX_PIN
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA1
#endif
//
// Steppers
//
#define X_STEP_PIN PE11
#define X_DIR_PIN PE10
#define X_ENABLE_PIN PE12
#define X_CS_PIN PE7
#define Y_STEP_PIN PD8
#define Y_DIR_PIN PB12
#define Y_ENABLE_PIN PD9
#define Y_CS_PIN PE15
#define Z_STEP_PIN PD14
#define Z_DIR_PIN PD13
#define Z_ENABLE_PIN PD15
#define Z_CS_PIN PD10
#define E0_STEP_PIN PD5
#define E0_DIR_PIN PD6
#define E0_ENABLE_PIN PD4
#define E0_CS_PIN PD7
#define E1_STEP_PIN PE6
#define E1_DIR_PIN PC13
#define E1_ENABLE_PIN PE5
#define E1_CS_PIN PC14
#define E2_STEP_PIN PE2
#define E2_DIR_PIN PE4
#define E2_ENABLE_PIN PE3
#define E2_CS_PIN PC15
#if HAS_TMC220x
//
// TMC2208/TMC2209 stepper drivers
//
//
// Software serial
//
#define X_SERIAL_TX_PIN PE9
#define X_SERIAL_RX_PIN PE8
#define Y_SERIAL_TX_PIN PE14
#define Y_SERIAL_RX_PIN PE13
#define Z_SERIAL_TX_PIN PD11
#define Z_SERIAL_RX_PIN PD12
#define E0_SERIAL_TX_PIN PD3
#define E0_SERIAL_RX_PIN PA15
#define E1_SERIAL_TX_PIN PC4
#define E1_SERIAL_RX_PIN PC5
#define E2_SERIAL_TX_PIN PE1
#define E2_SERIAL_RX_PIN PE0
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC0
#define TEMP_1_PIN PC1
#define TEMP_2_PIN PC2
#define TEMP_BED_PIN PC3
//
// Heaters / Fans
//
#define HEATER_0_PIN PB3
#define HEATER_1_PIN PB4
#define HEATER_2_PIN PB15
#define HEATER_BED_PIN PC8
#define FAN_PIN PB0
#define FAN1_PIN PB1
#define FAN2_PIN PB2
//
// SPI
//
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
//
// Misc. Functions
//
//#define LED_PIN PB14
//#define BTN_PIN PC10
//#define PS_ON_PIN PE11
//#define KILL_PIN PC5
#define SDSS PA4
#define SD_DETECT_PIN PB10
//
// LCD / Controller
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC9
#define BTN_ENC PA8
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PD0
#define BTN_EN1 PC11
#define BTN_EN2 PC10
#define LCD_PINS_ENABLE PD1
#define LCD_PINS_D4 PC12
// CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
// It will be defined again at the #HAS_GRAPHICAL_LCD section below.
#undef ST7920_DELAY_1
#undef ST7920_DELAY_2
#undef ST7920_DELAY_3
#else
#define LCD_PINS_RS PD2
#define BTN_EN1 PC6
#define BTN_EN2 PC7
#define LCD_SDSS PA4
#define LCD_PINS_ENABLE PC11
#define LCD_PINS_D4 PC10
#if ENABLED(FYSETC_MINI_12864)
// See https://wiki.fysetc.com/Mini12864_Panel
#define DOGLCD_CS PC11
#define DOGLCD_A0 PD2
#if ENABLED(FYSETC_GENERIC_12864_1_1)
#define LCD_BACKLIGHT_PIN PD0
#endif
#define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PC12
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PD0
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PD1
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PC12
#endif
#endif // !FYSETC_MINI_12864
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PC12
#define LCD_PINS_D6 PD0
#define LCD_PINS_D7 PD1
#endif
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif
#endif // HAS_SPI_LCD
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB6
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PB5
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PB7
#endif
#ifndef RGB_LED_W_PIN
#define RGB_LED_W_PIN -1
#endif

190
Marlin/src/pins/stm32/pins_GENERIC_STM32F4.h

@ -1,190 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* To build with Arduino IDE use "Discovery F407VG"
* To build with PlatformIO use environment "STM32F4"
*/
#if !defined(STM32F4) && !defined(STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "STM32F4 supports up to 2 hotends / E-steppers."
#endif
#define BOARD_INFO_NAME "Misc. STM32F4"
#define DEFAULT_MACHINE_NAME "STM32F407VET6"
//#define I2C_EEPROM
#ifndef E2END
#define E2END 0xFFF // 4KB
#endif
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Limit Switches
//
#define X_MIN_PIN PE0
#define X_MAX_PIN -1
#define Y_MIN_PIN PE1
#define Y_MAX_PIN -1
#define Z_MIN_PIN PE14
#define Z_MAX_PIN -1
//
// Z Probe (when not Z_MIN_PIN)
//
//#ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN PA4
//#endif
//
// Steppers
//
#define X_STEP_PIN PD3
#define X_DIR_PIN PD2
#define X_ENABLE_PIN PD0
//#ifndef X_CS_PIN
// #define X_CS_PIN PD1
//#endif
#define Y_STEP_PIN PE11
#define Y_DIR_PIN PE10
#define Y_ENABLE_PIN PE13
//#ifndef Y_CS_PIN
// #define Y_CS_PIN PE12
//#endif
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD7
#define Z_ENABLE_PIN PD4
//#ifndef Z_CS_PIN
// #define Z_CS_PIN PD5
//#endif
#define E0_STEP_PIN PB5
#define E0_DIR_PIN PB6
#define E0_ENABLE_PIN PB3
//#ifndef E0_CS_PIN
// #define E0_CS_PIN PB4
//#endif
#define E1_STEP_PIN PE4
#define E1_DIR_PIN PE2
#define E1_ENABLE_PIN PE3
//#ifndef E1_CS_PIN
// #define E1_CS_PIN PE5
//#endif
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
//
// Temperature Sensors
//
#define TEMP_0_PIN PC0 // Analog Input
#define TEMP_1_PIN PC1 // Analog Input
#define TEMP_BED_PIN PC2 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1
#define HEATER_1_PIN PA2
#define HEATER_BED_PIN PA0
#ifndef FAN_PIN
#define FAN_PIN PC6
#endif
#define FAN1_PIN PC7
#define FAN2_PIN PC8
#define ORIG_E0_AUTO_FAN_PIN FAN1_PIN // Use this by NOT overriding E0_AUTO_FAN_PIN
//
// Misc. Functions
//
//#define CASE_LIGHT_PIN_CI PF13
//#define CASE_LIGHT_PIN_DO PF14
//#define NEOPIXEL_PIN PF13
//
// Průša i3 MK2 Multi Material Multiplexer Support
//
//#define E_MUX0_PIN PG3
//#define E_MUX1_PIN PG4
//
// Servos
//
//#define SERVO0_PIN PE13
//#define SERVO1_PIN PE14
#define SDSS PE7
#define SS_PIN PE7
#define LED_PIN PB7 //Alive
#define PS_ON_PIN PA10
#define KILL_PIN PA8
#define PWR_LOSS PA4 //Power loss / nAC_FAULT
//
// LCD / Controller
//
#define SD_DETECT_PIN PA15
#define BEEPER_PIN PC9
#define LCD_PINS_RS PE9
#define LCD_PINS_ENABLE PE8
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#define BTN_EN1 PC4
#define BTN_EN2 PC5
#define BTN_ENC PC3
//
// Filament runout
//
#define FIL_RUNOUT_PIN PA3
//
// ST7920 Delays
//
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif

177
Marlin/src/pins/stm32/pins_LERDGE_K.h

@ -1,177 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* 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 <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#if !defined(STM32F4) && !defined(STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "LERDGE K supports up to 2 hotends / E-steppers."
#endif
#define BOARD_INFO_NAME "Lerdge K"
#define DEFAULT_MACHINE_NAME "LERDGE"
#define I2C_EEPROM
// Ignore temp readings during develpment.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Servos
//
//#define SERVO0_PIN PD12
//
// Limit Switches
//
#define X_STOP_PIN PG3
#define Y_STOP_PIN PG4
#define Z_STOP_PIN PG5
//
// Z Probe (when not Z_MIN_PIN)
//
//#ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN PB15
//#endif
//
// Filament runout
//
#define FIL_RUNOUT_PIN PE6
#define FIL_RUNOUT2_PIN PE7
//
// Steppers
//
#define X_STEP_PIN PG1
#define X_DIR_PIN PB10
#define X_ENABLE_PIN PG0
//#ifndef X_CS_PIN
// #define X_CS_PIN PE0
//#endif
#define Y_STEP_PIN PF14
#define Y_DIR_PIN PF15
#define Y_ENABLE_PIN PF13
//#ifndef Y_CS_PIN
// #define Y_CS_PIN PE1
//#endif
#define Z_STEP_PIN PF11
#define Z_DIR_PIN PF12
#define Z_ENABLE_PIN PC5
//#ifndef Z_CS_PIN
// #define Z_CS_PIN PE2
//#endif
#define E0_STEP_PIN PC14
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
//#ifndef E0_CS_PIN
// #define E0_CS_PIN PE3
//#endif
#define E1_STEP_PIN PF1
#define E1_DIR_PIN PF0
#define E1_ENABLE_PIN PF2
//#ifndef E1_CS_PIN
// #define E1_CS_PIN PE4
//#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // Analog Input
#define TEMP_1_PIN PC2 // Analog Input
#define TEMP_BED_PIN PC0 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1
#define HEATER_1_PIN PA0
#define HEATER_BED_PIN PA2
#ifndef FAN_PIN
#define FAN_PIN PC15
#endif
#define FAN1_PIN PF6
#define FAN2_PIN PF7
#define ORIG_E0_AUTO_FAN_PIN FAN1_PIN // Use this by NOT overriding E0_AUTO_FAN_PIN
//
// LED / Lighting
//
//#define CASE_LIGHT_PIN_CI -1
//#define CASE_LIGHT_PIN_DO -1
//#define NEOPIXEL_PIN -1
//
// Prusa i3 MK2 Multi-Material Multiplexer Support
//
//#define E_MUX0_PIN -1
//#define E_MUX1_PIN -1
//
// SD support
//
#define SDIO_SUPPORT
//
// Misc. Functions
//
#define SDSS PC11
#define LED_PIN PC7 // Alive
#define PS_ON_PIN -1
#define KILL_PIN -1
#define POWER_LOSS_PIN -1 // Power-loss / nAC_FAULT
#define SCK_PIN PC12
#define MISO_PIN PC8
#define MOSI_PIN PD2
#define SS_PIN PC11
//
// LCD / Controller
//
// TODO: Replace these with the correct FSMC pins, once known
#define SD_DETECT_PIN -1
#define BEEPER_PIN PD12
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#define BTN_EN1 PE3
#define BTN_EN2 PE4
#define BTN_ENC PE2
//
// ST7920 Delays
//
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif

174
Marlin/src/pins/stm32/pins_LERDGE_X.h

@ -1,174 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* 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 <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#if !defined(STM32F4) && !defined(STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "LERDGE X supports up to 2 hotends / E-steppers."
#endif
#define BOARD_INFO_NAME "Lerdge X"
#define DEFAULT_MACHINE_NAME "LERDGE"
//#define I2C_EEPROM
//
// Servos
//
//#define SERVO0_PIN PD12
//#define SERVO1_PIN -1
//
// Limit Switches
//
#define X_STOP_PIN PB12
#define Y_STOP_PIN PB13
#define Z_STOP_PIN PB14
//
// Filament runout
//
#define FIL_RUNOUT_PIN PE1
//
// Z Probe (when not Z_MIN_PIN)
//
//#ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN PB15
//#endif
//
// Steppers
//
#define X_STEP_PIN PB10
#define X_DIR_PIN PB2
#define X_ENABLE_PIN PB11
//#ifndef X_CS_PIN
// #define X_CS_PIN PD1
//#endif
#define Y_STEP_PIN PB0
#define Y_DIR_PIN PC5
#define Y_ENABLE_PIN PB1
//#ifndef Y_CS_PIN
// #define Y_CS_PIN PE12
//#endif
#define Z_STEP_PIN PA7
#define Z_DIR_PIN PA6
#define Z_ENABLE_PIN PC4
//#ifndef Z_CS_PIN
// #define Z_CS_PIN PD5
//#endif
#define E0_STEP_PIN PA4
#define E0_DIR_PIN PA3
#define E0_ENABLE_PIN PA5
//#ifndef E0_CS_PIN
// #define E0_CS_PIN PB4
//#endif
#define E1_STEP_PIN -1
#define E1_DIR_PIN -1
#define E1_ENABLE_PIN -1
//#ifndef E1_CS_PIN
// #define E1_CS_PIN PE5
//#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC0 // Analog Input
#define TEMP_1_PIN -1 // Analog Input
#define TEMP_BED_PIN PC1 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1
#define HEATER_1_PIN -1
#define HEATER_BED_PIN PA2
#ifndef FAN_PIN
// #define FAN_PIN PC15
#endif
#define FAN1_PIN PC15
#define FAN2_PIN PA0
#define ORIG_E0_AUTO_FAN_PIN PC15 // Use this by NOT overriding E0_AUTO_FAN_PIN
//
// Prusa i3 MK2 Multi Material Multiplexer Support
//
//#define E_MUX0_PIN -1
//#define E_MUX1_PIN -1
//
// LED / Lighting
//
//#define CASE_LIGHT_PIN_CI -1
//#define CASE_LIGHT_PIN_DO -1
//#define NEOPIXEL_PIN -1
//
// Misc. Functions
//
#define SDSS PC11
#define LED_PIN PC7 // Alive
#define PS_ON_PIN -1
#define KILL_PIN -1
#define POWER_LOSS_PIN -1 // Power-loss / nAC_FAULT
#define SCK_PIN PC12
#define MISO_PIN PC8
#define MOSI_PIN PD2
#define SS_PIN PC11
//
// SD support
//
#define SDIO_SUPPORT
//
// LCD / Controller
//
// The LCD is initialized in FSMC mode
#define SD_DETECT_PIN -1
#define BEEPER_PIN PD12
#define BTN_EN1 PE3
#define BTN_EN2 PE4
#define BTN_ENC PE2
#define LCD_RESET_PIN PD6
#define LCD_BACKLIGHT_PIN PD3
#define FSMC_CS_PIN PD4
#define FSMC_RS_PIN PD11
#define TOUCH_CS PB6
//
// ST7920 Delays
//
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif

170
Marlin/src/pins/stm32/pins_LONGER3D_LK.h

@ -1,170 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* 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 <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments
*/
#if !defined(__STM32F1__) && !defined(STM32F1xx)
#error "Oops! Select a STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "Longer3D"
#define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets)
//#define DISABLE_DEBUG // We still want to debug with STLINK...
#define DISABLE_JTAG // We free the jtag pins (PA15) but keep STLINK
// Release PB4 (STEP_X_PIN) from JTAG NRST role.
//
// Limit Switches
//
#define X_MIN_PIN PC1 // pin 16
#define X_MAX_PIN PC0 // pin 15 (Filament sensor on Alfawise setup)
#define Y_MIN_PIN PC15 // pin 9
#define Y_MAX_PIN PC14 // pin 8 (Unused in stock Alfawise setup)
#define Z_MIN_PIN PE6 // pin 5 Standard Endstop or Z_Probe endstop function
#define Z_MAX_PIN PE5 // pin 4 (Unused in stock Alfawise setup)
// May be used for BLTouch Servo function on older variants (<= V08)
#define ONBOARD_ENDSTOPPULLUPS
//
// Filament Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
#endif
//
// Steppers
//
#define X_ENABLE_PIN PB5 // pin 91
#define X_STEP_PIN PB4 // pin 90
#define X_DIR_PIN PB3 // pin 89
#define Y_ENABLE_PIN PB8 // pin 95
#define Y_STEP_PIN PB7 // pin 93
#define Y_DIR_PIN PB6 // pin 92
#define Z_ENABLE_PIN PE1 // pin 98
#define Z_STEP_PIN PE0 // pin 97
#define Z_DIR_PIN PB9 // pin 96
#define E0_ENABLE_PIN PE4 // pin 3
#define E0_STEP_PIN PE3 // pin 2
#define E0_DIR_PIN PE2 // pin 1
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // pin 23 (Nozzle 100K/3950 thermistor)
#define TEMP_BED_PIN PA1 // pin 24 (Hot Bed 100K/3950 thermistor)
//
// Heaters / Fans
//
#define HEATER_0_PIN PD3 // pin 84 (Nozzle Heat Mosfet)
#define HEATER_BED_PIN PA8 // pin 67 (Hot Bed Mosfet)
#define FAN_PIN PA15 // pin 77 (4cm Fan)
#define FAN_SOFT_PWM // Required to avoid issues with heating or STLink
#define FAN_MIN_PWM 35 // Fan will not start in 1-30 range
#define FAN_MAX_PWM 255
//#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor
// Can drive a PC Buzzer, if connected between PWM and 5V pins
#define LED_PIN PC2 // pin 17
//
// PWM for a servo probe
// Other servo devices are not supported on this board!
//
#if HAS_Z_SERVO_PROBE
#define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V)
#define SERVO0_PWM_OD // Comment this if using PE5
//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
//#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5)
#endif
/**
* Note: Alfawise screens use various TFT controllers. Supported screens
* are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
* other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
* init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define LCD_RESET_PIN PC4 // pin 33
#define LCD_BACKLIGHT_PIN PD12 // pin 59
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
#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 DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
/**
* Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
* mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
* declared below.
*/
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PB12 // pin 51 SPI2_NSS
#define TOUCH_SCK_PIN PB13 // pin 52
#define TOUCH_MOSI_PIN PB14 // pin 53
#define TOUCH_MISO_PIN PB15 // pin 54
#define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843)
#endif
//
// Persistent Storage
// If no option is selected below the SD Card will be used
//
//#define SPI_EEPROM
#define FLASH_EEPROM_EMULATION
#undef E2END
#if ENABLED(SPI_EEPROM)
// SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits)
#define SPI_CHAN_EEPROM1 1
#define SPI_EEPROM1_CS PC5 // pin 34
#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32
#define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
#define E2END ((16 * EEPROM_PAGE_SIZE)-1) // Limit to 64KB for now...
#elif ENABLED(FLASH_EEPROM_EMULATION)
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
#define E2END (EEPROM_PAGE_SIZE - 1)
#else
#define E2END (0x7FFU) // On SD, Limit to 2KB, require this amount of RAM
#endif

159
Marlin/src/pins/stm32/pins_MKS_ROBIN.h

@ -1,159 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS Robin (STM32F130ZET6) board pin assignments
*
* https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_JTAG
//
// Servos
//
#define SERVO0_PIN PC3 // XS1 - 5
#define SERVO1_PIN PA1 // XS1 - 6
#define SERVO2_PIN PF9 // XS2 - 5
#define SERVO3_PIN PF8 // XS2 - 6
//
// Limit Switches
//
#define X_MIN_PIN PB12
#define X_MAX_PIN PB0
#define Y_MIN_PIN PC5
#define Y_MAX_PIN PC4
#define Z_MIN_PIN PA4
#define Z_MAX_PIN PF7
//
// Steppers
//
#define X_ENABLE_PIN PB9
#define X_STEP_PIN PB8
#define X_DIR_PIN PB5
#define Y_ENABLE_PIN PB4
#define Y_STEP_PIN PG15
#define Y_DIR_PIN PG10
#define Z_ENABLE_PIN PD7
#define Z_STEP_PIN PD3
#define Z_DIR_PIN PG14
#define E0_ENABLE_PIN PG13
#define E0_STEP_PIN PG8
#define E0_DIR_PIN PA15
#define E1_ENABLE_PIN PA12
#define E1_STEP_PIN PA11
#define E1_DIR_PIN PA8
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PC7 // HEATER1
#define HEATER_1_PIN PA6 // HEATER2
#define HEATER_BED_PIN PC6 // HOT BED
#define FAN_PIN PA7 // FAN
/**
* Note: MKS Robin board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
*/
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PE6 // TC2 - CS2
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PA3 // PW_OFF
#define FIL_RUNOUT_PIN PF11 // MT_DET
#define BEEPER_PIN PC13
#define LED_PIN PB2
/**
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
//#define LCD_RESET_PIN PF6
#define LCD_BACKLIGHT_PIN PG11
#define FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF0 // 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
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PB1 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif
// SPI1(PA7) & SPI3(PB5) not available
#define ENABLE_SPI2
#if ENABLED(SDIO_SUPPORT)
#define SCK_PIN PB13 // SPI2
#define MISO_PIN PB14 // SPI2
#define MOSI_PIN PB15 // SPI2
#define SS_PIN -1 // PB12 is X-
#define SD_DETECT_PIN PF12 // SD_CD
#else
// SD as custom software SPI (SDIO pins)
#define SCK_PIN PC12
#define MISO_PIN PC8
#define MOSI_PIN PD2
#define SS_PIN -1
#define ONBOARD_SD_CS_PIN PC11
#define SDSS PD2
#define SD_DETECT_PIN -1
#endif

102
Marlin/src/pins/stm32/pins_MKS_ROBIN2.h

@ -1,102 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef STM32F4
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS_ROBIN2 supports up to 2 hotends / E-steppers."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_NAME "MKS_ROBIN2"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#endif
#define SRAM_EEPROM_EMULATION
//
// Limit Switches
//
#define X_MIN_PIN PG8
#define X_MAX_PIN PG7
#define Y_MIN_PIN PG6
#define Y_MAX_PIN PG5
#define Z_MIN_PIN PG4
#define Z_MAX_PIN PG3
//
// Servos
//
#define SERVO0_PIN PB0 // XS2-5
#define SERVO1_PIN PF7 // XS1-5
#define SERVO2_PIN PF8 // XS1-6
//
// Steppers
//
#define X_STEP_PIN PE6
#define X_DIR_PIN PE5
#define X_ENABLE_PIN PC13
#define Y_STEP_PIN PE3
#define Y_DIR_PIN PE2
#define Y_ENABLE_PIN PE4
#define Z_STEP_PIN PE0
#define Z_DIR_PIN PB9
#define Z_ENABLE_PIN PE1
#define E0_STEP_PIN PG10
#define E0_DIR_PIN PG9
#define E0_ENABLE_PIN PB8
#define E1_STEP_PIN PD3
#define E1_DIR_PIN PA15
#define E1_ENABLE_PIN PD6
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // T1 <-> E0
#define TEMP_1_PIN PC2 // T2 <-> E1
#define TEMP_BED_PIN PC0 // T0 <-> Bed
//
// Heaters / Fans
//
#define HEATER_0_PIN PF3 // Heater0
#define HEATER_1_PIN PF2 // Heater1
#define HEATER_BED_PIN PF4 // Hotbed
#define FAN_PIN PA7 // Fan0
//
// Misc. Functions
//
#define SDSS -1 // PB12
#define SD_DETECT_PIN PF9
#define BEEPER_PIN PG2

137
Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h

@ -1,137 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "MKS Robin Lite supports only 1 hotend / E-stepper. Comment out this line to continue."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "MKS Robin Lite"
#endif
#define BOARD_WEBSITE_URL "github.com/makerbase-mks"
//#define DISABLE_DEBUG
#define DISABLE_JTAG
#define ENABLE_SPI2
//
// Limit Switches
//
#define X_STOP_PIN PC13
#define Y_STOP_PIN PC0
#define Z_MIN_PIN PC12
#define Z_MAX_PIN PB9
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PB12
#define X_ENABLE_PIN PB10
#define Y_STEP_PIN PB11
#define Y_DIR_PIN PB2
#define Y_ENABLE_PIN PB10
#define Z_STEP_PIN PB1
#define Z_DIR_PIN PC5
#define Z_ENABLE_PIN PB10
#define E0_STEP_PIN PC4
#define E0_DIR_PIN PA5
#define E0_ENABLE_PIN PA4
//
// Heaters / Fans
//
#define HEATER_0_PIN PC9
#define FAN_PIN PA8
#define HEATER_BED_PIN PC8
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA1
#define TEMP_0_PIN PA0
#define FIL_RUNOUT_PIN PB8 // MT_DET
//
// LCD Pins
//
#if HAS_SPI_LCD
#define BEEPER_PIN PD2
#define BTN_ENC PB3
#define LCD_PINS_RS PC3
#define BTN_EN1 PB5
#define BTN_EN2 PB4
#define LCD_PINS_ENABLE PC2
#if ENABLED(MKS_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN -1
#define DOGLCD_A0 PC1
#define DOGLCD_CS PC2
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PC1
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#endif
#endif // !MKS_MINI_12864
#endif // HAS_SPI_LCD
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_XY_PIN PB0
#define MOTOR_CURRENT_PWM_Z_PIN PA7
#define MOTOR_CURRENT_PWM_E_PIN PA6
#define MOTOR_CURRENT_PWM_RANGE (65535/10/3.3) // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#define DEFAULT_PWM_MOTOR_CURRENT { 1000, 1000, 1000 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
//
// SD Card
//
#define ENABLE_SPI2
#define SD_DETECT_PIN PC10
#define SCK_PIN PB13
#define MISO_PIN P1B4
#define MOSI_PIN P1B5
#define SS_PIN PA15
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif

153
Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE3.h

@ -1,153 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS Robin Lite 3 (STM32F103RCT6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Robin Lite3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "MKS Robin Lite3"
#endif
#define BOARD_WEBSITE_URL "github.com/makerbase-mks"
//#define DISABLE_DEBUG
#define DISABLE_JTAG
#define ENABLE_SPI2
//
// Servos
//
#define SERVO0_PIN PA3
//
// Limit Switches
//
#define X_STOP_PIN PA12
#define Y_STOP_PIN PA11
#define Z_MIN_PIN PC6
#define Z_MAX_PIN PB1
//
// Steppers
//
#define X_STEP_PIN PC0
#define X_DIR_PIN PB2
#define X_ENABLE_PIN PC13
#define Y_STEP_PIN PC2
#define Y_DIR_PIN PB9
#define Y_ENABLE_PIN PB12
#define Z_STEP_PIN PB7
#define Z_DIR_PIN PB6
#define Z_ENABLE_PIN PB8
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB3
#define E0_ENABLE_PIN PB5
#define E1_STEP_PIN PC12
#define E1_DIR_PIN PC11
#define E1_ENABLE_PIN PD2
//
// Heaters 0,1 / Fans / Bed
//
#define HEATER_0_PIN PC9
#define HEATER_1_PIN PC7
#define FAN_PIN PA8
#define HEATER_BED_PIN PC8
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA1 //TB
#define TEMP_0_PIN PA0 //TH1
#define TEMP_1_PIN PA2 //TH2
#define FIL_RUNOUT_PIN PB10 // MT_DET
//
// LCD Pins
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC1
#define BTN_ENC PC3
#define LCD_PINS_ENABLE PA4
#define LCD_PINS_RS PA5
#define BTN_EN1 PB11
#define BTN_EN2 PB0
// MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
#if ENABLED(MKS_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN -1
#define DOGLCD_A0 PC4
#define DOGLCD_CS PA7
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
// Required for MKS_MINI_12864 with this board
#define MKS_LCD12864B
#undef SHOW_BOOTSCREEN
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PA6
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PA7
#define LCD_PINS_D6 PC4
#define LCD_PINS_D7 PC5
#endif
#endif // !MKS_MINI_12864
#endif // HAS_SPI_LCD
//
// SD Card
//
#define ENABLE_SPI2
#define SD_DETECT_PIN PC10
#define SCK_PIN PB13
#define MISO_PIN PB14
#define MOSI_PIN PB15
#define SS_PIN PA15
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif

137
Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h

@ -1,137 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS Robin nano (STM32F130VET6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin nano"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
//
// Limit Switches
//
#define X_STOP_PIN PA15
#define Y_STOP_PIN PA12
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA4 // MT_DET
#endif
//
// Steppers
//
#define X_ENABLE_PIN PE4
#define X_STEP_PIN PE3
#define X_DIR_PIN PE2
#define Y_ENABLE_PIN PE1
#define Y_STEP_PIN PE0
#define Y_DIR_PIN PB9
#define Z_ENABLE_PIN PB8
#define Z_STEP_PIN PB5
#define Z_DIR_PIN PB4
#define E0_ENABLE_PIN PB3
#define E0_STEP_PIN PD6
#define E0_DIR_PIN PD3
#define E1_ENABLE_PIN PA3
#define E1_STEP_PIN PA6
#define E1_DIR_PIN PA1
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PC3 // HEATER1
#define HEATER_1_PIN PB0 // HEATER2
#define HEATER_BED_PIN PA0 // HOT BED
#define FAN_PIN PB1 // FAN
//
// Thermocouples
//
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PE6 // TC2 - CS2
//
// Misc. Functions
//
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PA3 // PW_OFF
#define LED_PIN PB2
//
// SD Card
//
#define SDIO_SUPPORT
#define SD_DETECT_PIN PD12
//
// LCD / Controller
//
#define BEEPER_PIN PC5
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define LCD_RESET_PIN PC6 // FSMC_RST
#define NO_LCD_REINIT // Suppress LCD re-initialization
#define LCD_BACKLIGHT_PIN PD13
#if ENABLED(TOUCH_BUTTONS)
#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
#endif
#endif

274
Marlin/src/pins/stm32/pins_MKS_ROBIN_PRO.h

@ -1,274 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS Robin pro (STM32F103ZET6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 3 || E_STEPPERS > 3
#error "MKS Robin pro supports up to 3 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin pro"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
//
// Note: MKS Robin board is using SPI2 interface.
//
//#define SPI_MODULE 2
#define ENABLE_SPI2
//
// Servos
//
#define SERVO0_PIN PA8 // BLTOUCH
//
// Limit Switches
//
#define X_MIN_PIN PA15
#define X_MAX_PIN PG7
#define Y_MIN_PIN PA12
#define Y_MAX_PIN PG8
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4
//
// Steppers
//
#define X_ENABLE_PIN PE4
#define X_STEP_PIN PE3
#define X_DIR_PIN PE2
#ifndef X_CS_PIN
#define X_CS_PIN PF8
#endif
#define Y_ENABLE_PIN PE1
#define Y_STEP_PIN PE0
#define Y_DIR_PIN PB9
#ifndef Y_CS_PIN
#define Y_CS_PIN PF3
#endif
#define Z_ENABLE_PIN PB8
#define Z_STEP_PIN PB5
#define Z_DIR_PIN PB4
#ifndef Z_CS_PIN
#define Z_CS_PIN PF6
#endif
#define E0_ENABLE_PIN PB3
#define E0_STEP_PIN PD6
#define E0_DIR_PIN PD3
#ifndef E0_CS_PIN
#define E0_CS_PIN PG15
#endif
#define E1_ENABLE_PIN PA3
#define E1_STEP_PIN PA6
#define E1_DIR_PIN PA1
#ifndef E1_CS_PIN
#define E1_CS_PIN PG10
#endif
#define E2_ENABLE_PIN PF0
#define E2_STEP_PIN PF2
#define E2_DIR_PIN PF1
#ifndef E2_CS_PIN
#define E2_CS_PIN PG9
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PB15
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB14
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB13
#endif
#endif
#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN PF7
#define X_SERIAL_RX_PIN PF8
#define Y_SERIAL_TX_PIN PF4
#define Y_SERIAL_RX_PIN PF3
#define Z_SERIAL_TX_PIN PF5
#define Z_SERIAL_RX_PIN PF6
#define E0_SERIAL_TX_PIN PG13
#define E0_SERIAL_RX_PIN PG15
#define E1_SERIAL_TX_PIN PG12
#define E1_SERIAL_RX_PIN PG10
#define E2_SERIAL_TX_PIN PC13
#define E2_SERIAL_RX_PIN PG9
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_2_PIN PC3 // TH3
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PF10 // +HE0-
#define HEATER_1_PIN PB0 // +HE1-
#define HEATER_2_PIN PF9 // +HE2-
#define HEATER_BED_PIN PA0 // +HOT-BED-
#define FAN_PIN PB1 // +FAN-
/**
* Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
*/
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PF11 // TC2 - CS2
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PG11 // PW_OFF
#define FIL_RUNOUT_PIN PA4 // MT_DET1
//#define FIL_RUNOUT_PIN PE6 // MT_DET2
//#define FIL_RUNOUT_PIN PG14 // MT_DET3
//
// SD Card
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD)
#define ENABLE_SPI2
#define SD_DETECT_PIN PG3
#define SCK_PIN PB13
#define MISO_PIN PB14
#define MOSI_PIN PB15
#define SS_PIN PG6
#elif SD_CONNECTION_IS(ONBOARD)
#define SDIO_SUPPORT
#define SD_DETECT_PIN PD12
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define LCD_RESET_PIN PF6
#define NO_LCD_REINIT // Suppress LCD re-initialization
#define LCD_BACKLIGHT_PIN PD13
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PA7
#else
#define BEEPER_PIN PC5
#define BTN_ENC PG2
#define BTN_EN1 PG5
#define BTN_EN2 PG4
#endif
#elif HAS_SPI_LCD
#define BEEPER_PIN PC5
#define BTN_ENC PG2
#define LCD_PINS_ENABLE PG0
#define LCD_PINS_RS PG1
#define BTN_EN1 PG5
#define BTN_EN2 PG4
// MKS MINI12864 and MKS LCD12864B. If using MKS LCD12864A (Need to remove RPK2 resistor)
#if ENABLED(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
#else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#define LCD_PINS_D4 PF14
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PF15
#define LCD_PINS_D6 PF12
#define LCD_PINS_D7 PF13
#endif
#endif // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#endif
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif

133
Marlin/src/pins/stm32/pins_REMRAM_V1.h

@ -1,133 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef STM32F7xx
#error "Oops! Select an STM32F7 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "RemRam v1"
#define DEFAULT_MACHINE_NAME "RemRam"
#define SRAM_EEPROM_EMULATION // Emulate the EEPROM using Backup SRAM
#if HOTENDS > 1 || E_STEPPERS > 1
#error "RemRam supports only one hotend / E-stepper."
#endif
//
// Limit Switches
//
#if DISABLED(SENSORLESS_HOMING)
#define X_MIN_PIN 58
#define X_MAX_PIN 59
#define Y_MIN_PIN 60
#define Y_MAX_PIN 61
#define Z_MIN_PIN 62
#define Z_MAX_PIN 63
#else
#define X_STOP_PIN 36
#define Y_STOP_PIN 39
#define Z_MIN_PIN 62
#define Z_MAX_PIN 42
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 26 // EXT_D1
#endif
//
// Steppers
//
#define X_STEP_PIN 22
#define X_DIR_PIN 35
#define X_ENABLE_PIN 34
#define X_CS_PIN 14
#define Y_STEP_PIN 23
#define Y_DIR_PIN 38
#define Y_ENABLE_PIN 37
#define Y_CS_PIN 15
#define Z_STEP_PIN 24
#define Z_DIR_PIN 41
#define Z_ENABLE_PIN 40
#define Z_CS_PIN 16
#define E0_STEP_PIN 25
#define E0_DIR_PIN 44
#define E0_ENABLE_PIN 43
#define E0_CS_PIN 10
//
// Temperature Sensors
//
#define TEMP_0_PIN 64 // THERM_1
#define TEMP_1_PIN 65 // THERM_2
#define TEMP_BED_PIN 66 // THERM_3
//
// Heaters / Fans
//
#define HEATER_0_PIN 33
#define HEATER_BED_PIN 31
#ifndef FAN_PIN
#define FAN_PIN 30 // "FAN1"
#endif
#define FAN1_PIN 32 // "FAN2"
#define ORIG_E0_AUTO_FAN_PIN 32 // Use this by NOT overriding E0_AUTO_FAN_PIN
//
// Servos
//
#define SERVO0_PIN 26 // PWM_EXT1
#define SERVO1_PIN 27 // PWM_EXT2
#define SDSS 57 // Onboard SD card reader
//#define SDSS 9 // LCD SD card reader
#define LED_PIN 21 // STATUS_LED
//
// LCD / Controller
//
#define SD_DETECT_PIN 56 // SD_CARD_DET
#define BEEPER_PIN 46 // LCD_BEEPER
#define LCD_PINS_RS 49 // LCD_RS
#define LCD_PINS_ENABLE 48 // LCD_EN
#define LCD_PINS_D4 50 // LCD_D4
#define LCD_PINS_D5 51 // LCD_D5
#define LCD_PINS_D6 52 // LCD_D6
#define LCD_PINS_D7 53 // LCD_D7
#define BTN_EN1 54 // BTN_EN1
#define BTN_EN2 55 // BTN_EN2
#define BTN_ENC 47 // BTN_ENC
//
// Timers
//
#define STEP_TIMER 2

149
Marlin/src/pins/stm32/pins_RUMBA32_common.h

@ -1,149 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Common pin assignments for all RUMBA32 boards
*/
#ifndef STM32F4
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 3 || E_STEPPERS > 3
#error "RUMBA32 boards support up to 3 hotends / E-steppers."
#endif
#define RUMBA32_V1_0
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//#define I2C_EEPROM
#ifdef E2END
#undef E2END
#endif
#define E2END 0xFFF // 4KB
//
// Limit Switches
//
#define X_MIN_PIN PB12
#define X_MAX_PIN PB13
#define Y_MIN_PIN PB15
#define Y_MAX_PIN PD8
#define Z_MIN_PIN PD9
#define Z_MAX_PIN PD10
//
// Steppers
//
#define X_STEP_PIN PA0
#define X_DIR_PIN PC15
#define X_ENABLE_PIN PC11
#define X_CS_PIN PC14
#define Y_STEP_PIN PE5
#define Y_DIR_PIN PE6
#define Y_ENABLE_PIN PE3
#define Y_CS_PIN PE4
#define Z_STEP_PIN PE1
#define Z_DIR_PIN PE2
#define Z_ENABLE_PIN PB7
#define Z_CS_PIN PE0
#define E0_STEP_PIN PB5
#define E0_DIR_PIN PB6
#define E0_ENABLE_PIN PC12
#define E0_CS_PIN PC13
#define E1_STEP_PIN PD6
#define E1_DIR_PIN PD7
#define E1_ENABLE_PIN PD4
#define E1_CS_PIN PD5
#define E2_STEP_PIN PD2
#define E2_DIR_PIN PD3
#define E2_ENABLE_PIN PD0
#define E2_CS_PIN PD1
//
// Temperature Sensors
//
#define TEMP_0_PIN PC4
#define TEMP_1_PIN PC3
#define TEMP_2_PIN PC2
#define TEMP_3_PIN PC1
#define TEMP_BED_PIN PC0
//
// Heaters / Fans
//
#define HEATER_0_PIN PC6
#define HEATER_1_PIN PC7
#define HEATER_2_PIN PC8
#define HEATER_BED_PIN PA1
#define FAN_PIN PC9
#define FAN1_PIN PA8
//
// I2C
//
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
//
// Misc. Functions
//
#define LED_PIN PB14
#define BTN_PIN PC10
#define PS_ON_PIN PE11
#define KILL_PIN PC5
#define SDSS PA2
#define SD_DETECT_PIN PB0
#define BEEPER_PIN PE8
//
// LCD / Controller
//
#if HAS_SPI_LCD
#define BTN_EN1 PB2
#define BTN_EN2 PB1
#define BTN_ENC PE7
#define LCD_PINS_RS PE10
#define LCD_PINS_ENABLE PE9
#define LCD_PINS_D4 PE12
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS PE13
#define DOGLCD_A0 PE14
#endif
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PE13
#define LCD_PINS_D6 PE14
#define LCD_PINS_D7 PE15
#endif
#endif

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save