First commit for Ender-3V3 SE
First commit for Ender-3V3 SE
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(ARDUINO_ARCH_ESP32)
|
||||
#error "Oops! Select an ESP32 board in 'Tools > Board.'"
|
||||
#endif
|
||||
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* E4d@Box pin assignments
|
||||
* E4d@Box is a small factor 3D printer control board based on the ESP32 microcontroller for Laser, CNC and 3d printers
|
||||
* for more info check https://atbox.tech/ and join to Facebook page E4d@box.
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if EXTRUDERS > 1 || E_STEPPERS > 1
|
||||
#error "E4d@box only supports one E Stepper. Comment out this line to continue."
|
||||
#elif HOTENDS > 1
|
||||
#error "E4d@box only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "E4D@BOX"
|
||||
#define BOARD_WEBSITE_URL "github.com/Exilaus/E4d@box"
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
||||
//
|
||||
// Disable I2S stepper stream
|
||||
//
|
||||
#undef I2S_STEPPER_STREAM
|
||||
|
||||
//
|
||||
// Redefine I2S for ESP32
|
||||
//
|
||||
#undef I2S_WS
|
||||
#define I2S_WS 23
|
||||
#undef I2S_BCK
|
||||
#define I2S_BCK 22
|
||||
#undef I2S_DATA
|
||||
#define I2S_DATA 21
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN 34
|
||||
#define Y_STOP_PIN 35
|
||||
#define Z_STOP_PIN 16
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN 12
|
||||
#define X_DIR_PIN 13
|
||||
#define X_ENABLE_PIN 17
|
||||
//#define X_CS_PIN 0
|
||||
|
||||
#define Y_STEP_PIN 32
|
||||
#define Y_DIR_PIN 33
|
||||
#define Y_ENABLE_PIN X_ENABLE_PIN
|
||||
//#define Y_CS_PIN 13
|
||||
|
||||
#define Z_STEP_PIN 25
|
||||
#define Z_DIR_PIN 26
|
||||
#define Z_ENABLE_PIN X_ENABLE_PIN
|
||||
//#define Z_CS_PIN 5 // SS_PIN
|
||||
|
||||
#define E0_STEP_PIN 27
|
||||
#define E0_DIR_PIN 14
|
||||
#define E0_ENABLE_PIN X_ENABLE_PIN
|
||||
//#define E0_CS_PIN 21
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN 36 // Analog Input
|
||||
#define TEMP_BED_PIN 39 // Analog Input
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 2
|
||||
#define FAN_PIN 0
|
||||
#define HEATER_BED_PIN 15
|
||||
|
||||
//
|
||||
// MicroSD card on SPI
|
||||
//
|
||||
#define SD_MOSI_PIN 23
|
||||
#define SD_MISO_PIN 19
|
||||
#define SD_SCK_PIN 18
|
||||
#define SDSS 5
|
||||
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Espressif ESP32 (Tensilica Xtensa LX6) pin assignments
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "Espressif ESP32"
|
||||
|
||||
//
|
||||
// I2S (steppers & other output-only pins)
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#define I2S_WS 25
|
||||
#define I2S_BCK 26
|
||||
#define I2S_DATA 27
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_MIN_PIN 34
|
||||
#define Y_MIN_PIN 35
|
||||
#define Z_MIN_PIN 15
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN 128
|
||||
#define X_DIR_PIN 129
|
||||
#define X_ENABLE_PIN 130
|
||||
//#define X_CS_PIN 0
|
||||
|
||||
#define Y_STEP_PIN 131
|
||||
#define Y_DIR_PIN 132
|
||||
#define Y_ENABLE_PIN 133
|
||||
//#define Y_CS_PIN 13
|
||||
|
||||
#define Z_STEP_PIN 134
|
||||
#define Z_DIR_PIN 135
|
||||
#define Z_ENABLE_PIN 136
|
||||
//#define Z_CS_PIN 5 // SS_PIN
|
||||
|
||||
#define E0_STEP_PIN 137
|
||||
#define E0_DIR_PIN 138
|
||||
#define E0_ENABLE_PIN 139
|
||||
//#define E0_CS_PIN 21
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN 36 // Analog Input
|
||||
#define TEMP_BED_PIN 39 // Analog Input
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 2
|
||||
#define FAN_PIN 13
|
||||
#define HEATER_BED_PIN 4
|
||||
|
||||
// SPI
|
||||
#define SDSS 5
|
||||
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* FYSETC E4 pin assignments
|
||||
* FYSETC E4 is a 3D printer control board based on the ESP32 microcontroller.
|
||||
* Supports 4 stepper drivers, heated bed, single hotend.
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if EXTRUDERS > 1 || E_STEPPERS > 1
|
||||
#error "FYSETC E4 only supports one E Stepper. Comment out this line to continue."
|
||||
#elif HOTENDS > 1
|
||||
#error "FYSETC E4 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "FYSETC_E4"
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
||||
//
|
||||
// Disable I2S stepper stream
|
||||
//
|
||||
#undef I2S_STEPPER_STREAM
|
||||
#define I2S_WS -1
|
||||
#define I2S_BCK -1
|
||||
#define I2S_DATA -1
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN 34
|
||||
#define Y_STOP_PIN 35
|
||||
#define Z_STOP_PIN 15
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN 27
|
||||
#define X_DIR_PIN 26
|
||||
#define X_ENABLE_PIN 25
|
||||
|
||||
#define Y_STEP_PIN 33
|
||||
#define Y_DIR_PIN 32
|
||||
#define Y_ENABLE_PIN X_ENABLE_PIN
|
||||
|
||||
#define Z_STEP_PIN 14
|
||||
#define Z_DIR_PIN 12
|
||||
#define Z_ENABLE_PIN X_ENABLE_PIN
|
||||
|
||||
#define E0_STEP_PIN 16
|
||||
#define E0_DIR_PIN 17
|
||||
#define E0_ENABLE_PIN X_ENABLE_PIN
|
||||
|
||||
#if HAS_TMC_UART
|
||||
//
|
||||
// TMC2209 stepper drivers
|
||||
//
|
||||
|
||||
//
|
||||
// Hardware serial 1
|
||||
//
|
||||
#define X_HARDWARE_SERIAL Serial1
|
||||
#define Y_HARDWARE_SERIAL Serial1
|
||||
#define Z_HARDWARE_SERIAL Serial1
|
||||
#define E0_HARDWARE_SERIAL Serial1
|
||||
|
||||
#define TMC_BAUD_RATE 115200
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN 36 // Analog Input
|
||||
#define TEMP_BED_PIN 39 // Analog Input
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 2
|
||||
#define FAN_PIN 13
|
||||
#define HEATER_BED_PIN 4
|
||||
|
||||
//
|
||||
// MicroSD card
|
||||
//
|
||||
#define SD_MOSI_PIN 23
|
||||
#define SD_MISO_PIN 19
|
||||
#define SD_SCK_PIN 18
|
||||
#define SDSS 5
|
||||
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
|
||||
|
||||
/**
|
||||
* Hardware serial pins
|
||||
*
|
||||
* Override these pins in Configuration.h or Configuration_adv.h if needed.
|
||||
*
|
||||
* Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX
|
||||
* but MRR ESPA does not have enough spare pins for such reassignment.
|
||||
*/
|
||||
#ifndef HARDWARE_SERIAL1_RX
|
||||
#define HARDWARE_SERIAL1_RX 21
|
||||
#endif
|
||||
#ifndef HARDWARE_SERIAL1_TX
|
||||
#define HARDWARE_SERIAL1_TX 22
|
||||
#endif
|
||||
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* MRR ESPA pin assignments
|
||||
* MRR ESPA is a 3D printer control board based on the ESP32 microcontroller.
|
||||
* Supports 4 stepper drivers, heated bed, single hotend.
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if EXTRUDERS > 1 || E_STEPPERS > 1
|
||||
#error "MRR ESPA only supports one E Stepper. Comment out this line to continue."
|
||||
#elif HOTENDS > 1
|
||||
#error "MRR ESPA only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "MRR ESPA"
|
||||
#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPA"
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
||||
//
|
||||
// Disable I2S stepper stream
|
||||
//
|
||||
#undef I2S_STEPPER_STREAM
|
||||
#undef I2S_WS
|
||||
#undef I2S_BCK
|
||||
#undef I2S_DATA
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN 34
|
||||
#define Y_STOP_PIN 35
|
||||
#define Z_STOP_PIN 15
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN 27
|
||||
#define X_DIR_PIN 26
|
||||
#define X_ENABLE_PIN 25
|
||||
//#define X_CS_PIN 21
|
||||
|
||||
#define Y_STEP_PIN 33
|
||||
#define Y_DIR_PIN 32
|
||||
#define Y_ENABLE_PIN X_ENABLE_PIN
|
||||
//#define Y_CS_PIN 22
|
||||
|
||||
#define Z_STEP_PIN 14
|
||||
#define Z_DIR_PIN 12
|
||||
#define Z_ENABLE_PIN X_ENABLE_PIN
|
||||
//#define Z_CS_PIN 5 // SS_PIN
|
||||
|
||||
#define E0_STEP_PIN 16
|
||||
#define E0_DIR_PIN 17
|
||||
#define E0_ENABLE_PIN X_ENABLE_PIN
|
||||
//#define E0_CS_PIN 21
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN 36 // Analog Input
|
||||
#define TEMP_BED_PIN 39 // Analog Input
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 2
|
||||
#define FAN_PIN 13
|
||||
#define HEATER_BED_PIN 4
|
||||
|
||||
//
|
||||
// MicroSD card
|
||||
//
|
||||
#define SD_MOSI_PIN 23
|
||||
#define SD_MISO_PIN 19
|
||||
#define SD_SCK_PIN 18
|
||||
#define SDSS 5
|
||||
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
|
||||
|
||||
// Hardware serial pins
|
||||
// Add the following to Configuration.h or Configuration_adv.h to assign
|
||||
// specific pins to hardware Serial1.
|
||||
// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
|
||||
// MRR ESPA does not have enough spare pins for such reassignment.
|
||||
//#define HARDWARE_SERIAL1_RX 21
|
||||
//#define HARDWARE_SERIAL1_TX 22
|
||||
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* MRR ESPE pin assignments
|
||||
* MRR ESPE is a 3D printer control board based on the ESP32 microcontroller.
|
||||
* Supports 5 stepper drivers (using I2S stepper stream), heated bed,
|
||||
* single hotend, and LCD controller.
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if EXTRUDERS > 2 || E_STEPPERS > 2
|
||||
#error "MRR ESPE only supports two E Steppers. Comment out this line to continue."
|
||||
#elif HOTENDS > 1
|
||||
#error "MRR ESPE only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "MRR ESPE"
|
||||
#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPE"
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN 35
|
||||
#define Y_STOP_PIN 32
|
||||
#define Z_STOP_PIN 33
|
||||
|
||||
//
|
||||
// Enable I2S stepper stream
|
||||
//
|
||||
#undef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#define I2S_WS 26
|
||||
#define I2S_BCK 25
|
||||
#define I2S_DATA 27
|
||||
#undef LIN_ADVANCE // Currently, I2S stream does not work with linear advance
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN 129
|
||||
#define X_DIR_PIN 130
|
||||
#define X_ENABLE_PIN 128
|
||||
//#define X_CS_PIN 21
|
||||
|
||||
#define Y_STEP_PIN 132
|
||||
#define Y_DIR_PIN 133
|
||||
#define Y_ENABLE_PIN 131
|
||||
//#define Y_CS_PIN 22
|
||||
|
||||
#define Z_STEP_PIN 135
|
||||
#define Z_DIR_PIN 136
|
||||
#define Z_ENABLE_PIN 134
|
||||
//#define Z_CS_PIN 5 // SS_PIN
|
||||
|
||||
#define E0_STEP_PIN 138
|
||||
#define E0_DIR_PIN 139
|
||||
#define E0_ENABLE_PIN 137
|
||||
//#define E0_CS_PIN 21
|
||||
|
||||
#define E1_STEP_PIN 141
|
||||
#define E1_DIR_PIN 142
|
||||
#define E1_ENABLE_PIN 140
|
||||
//#define E1_CS_PIN 22
|
||||
|
||||
#define Z2_STEP_PIN 141
|
||||
#define Z2_DIR_PIN 142
|
||||
#define Z2_ENABLE_PIN 140
|
||||
//#define Z2_CS_PIN 5
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN 36 // Analog Input
|
||||
#define TEMP_1_PIN 34 // Analog Input
|
||||
#define TEMP_BED_PIN 39 // Analog Input
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 145 // 2
|
||||
#define FAN_PIN 146 // 15
|
||||
#define HEATER_BED_PIN 144 // 4
|
||||
|
||||
#define CONTROLLER_FAN_PIN 147
|
||||
//#define E0_AUTO_FAN_PIN 148 // need to update Configuration_adv.h @section extruder
|
||||
//#define E1_AUTO_FAN_PIN 149 // need to update Configuration_adv.h @section extruder
|
||||
#define FAN1_PIN 149
|
||||
|
||||
//
|
||||
// MicroSD card
|
||||
//
|
||||
#define SD_MOSI_PIN 23
|
||||
#define SD_MISO_PIN 19
|
||||
#define SD_SCK_PIN 18
|
||||
#define SDSS 5
|
||||
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
|
||||
|
||||
//////////////////////////
|
||||
// LCDs and Controllers //
|
||||
//////////////////////////
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#define LCD_PINS_RS 13
|
||||
#define LCD_PINS_ENABLE 17
|
||||
#define LCD_PINS_D4 16
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define BEEPER_PIN 151
|
||||
|
||||
#elif IS_RRD_FG_SC
|
||||
|
||||
#define BEEPER_PIN 151
|
||||
|
||||
//#define LCD_PINS_D5 150
|
||||
//#define LCD_PINS_D6 152
|
||||
//#define LCD_PINS_D7 153
|
||||
|
||||
#else
|
||||
|
||||
#error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue."
|
||||
|
||||
#endif
|
||||
|
||||
#define BTN_EN1 0
|
||||
#define BTN_EN2 12
|
||||
#define BTN_ENC 14
|
||||
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
||||
// Hardware serial pins
|
||||
// Add the following to Configuration.h or Configuration_adv.h to assign
|
||||
// specific pins to hardware Serial1 and Serial2.
|
||||
// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
|
||||
// MRR ESPA does not have enough spare pins for such reassignment.
|
||||
//#define HARDWARE_SERIAL1_RX 21
|
||||
//#define HARDWARE_SERIAL1_TX 22
|
||||
//#define HARDWARE_SERIAL2_RX 2
|
||||
//#define HARDWARE_SERIAL2_TX 4
|
||||
@@ -0,0 +1,805 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* File: pins/pins.h
|
||||
*
|
||||
* Include pins definitions
|
||||
*
|
||||
* Pins numbering schemes:
|
||||
*
|
||||
* - Digital I/O pin number if used by READ/WRITE macros. (e.g., X_STEP_DIR)
|
||||
* The FastIO headers map digital pins to their ports and functions.
|
||||
*
|
||||
* - Analog Input number if used by analogRead or DAC. (e.g., TEMP_n_PIN)
|
||||
* These numbers are the same in any pin mapping.
|
||||
*/
|
||||
|
||||
#if HAS_EXTENDABLE_MMU
|
||||
#define MAX_EXTRUDERS 15
|
||||
#else
|
||||
#define MAX_EXTRUDERS 8
|
||||
#endif
|
||||
#define MAX_E_STEPPERS 8
|
||||
|
||||
#if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB)
|
||||
#define IS_RAMPS_EFB
|
||||
#elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB)
|
||||
#define IS_RAMPS_EEB
|
||||
#elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
|
||||
#define IS_RAMPS_EFF
|
||||
#elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
|
||||
#define IS_RAMPS_EEF
|
||||
#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
|
||||
#define IS_RAMPS_SF
|
||||
#endif
|
||||
|
||||
#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
|
||||
#define HAS_FREE_AUX2_PINS 1
|
||||
#endif
|
||||
|
||||
// Test the target within the included pins file
|
||||
#ifdef __MARLIN_DEPS__
|
||||
#define NOT_TARGET(V...) 0
|
||||
#else
|
||||
#define NOT_TARGET(V...) NONE(V)
|
||||
#endif
|
||||
|
||||
//
|
||||
// RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
|
||||
//
|
||||
|
||||
#if MB(RAMPS_OLD)
|
||||
#include "ramps/pins_RAMPS_OLD.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(RAMPS_13_EFB, RAMPS_13_EEB, RAMPS_13_EFF, RAMPS_13_EEF, RAMPS_13_SF)
|
||||
#include "ramps/pins_RAMPS_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(RAMPS_14_EFB, RAMPS_14_EEB, RAMPS_14_EFF, RAMPS_14_EEF, RAMPS_14_SF)
|
||||
#include "ramps/pins_RAMPS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(RAMPS_PLUS_EFB, RAMPS_PLUS_EEB, RAMPS_PLUS_EFF, RAMPS_PLUS_EEF, RAMPS_PLUS_SF)
|
||||
#include "ramps/pins_RAMPS_PLUS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
|
||||
//
|
||||
// RAMPS Derivatives - ATmega1280, ATmega2560
|
||||
//
|
||||
|
||||
#elif MB(3DRAG)
|
||||
#include "ramps/pins_3DRAG.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(K8200)
|
||||
#include "ramps/pins_K8200.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(K8400)
|
||||
#include "ramps/pins_K8400.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(K8600)
|
||||
#include "ramps/pins_K8600.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(K8800)
|
||||
#include "ramps/pins_K8800.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(BAM_DICE)
|
||||
#include "ramps/pins_RAMPS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(BAM_DICE_DUE)
|
||||
#include "ramps/pins_BAM_DICE_DUE.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(MKS_BASE)
|
||||
#include "ramps/pins_MKS_BASE_10.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_BASE_14)
|
||||
#include "ramps/pins_MKS_BASE_14.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_BASE_15)
|
||||
#include "ramps/pins_MKS_BASE_15.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_BASE_16)
|
||||
#include "ramps/pins_MKS_BASE_16.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_BASE_HEROIC)
|
||||
#include "ramps/pins_MKS_BASE_HEROIC.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_GEN_13)
|
||||
#include "ramps/pins_MKS_GEN_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(MKS_GEN_L)
|
||||
#include "ramps/pins_MKS_GEN_L.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(KFB_2)
|
||||
#include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(ZRIB_V20)
|
||||
#include "ramps/pins_ZRIB_V20.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(ZRIB_V52)
|
||||
#include "ramps/pins_ZRIB_V52.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(FELIX2)
|
||||
#include "ramps/pins_FELIX2.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(RIGIDBOARD)
|
||||
#include "ramps/pins_RIGIDBOARD.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(RIGIDBOARD_V2)
|
||||
#include "ramps/pins_RIGIDBOARD_V2.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(SAINSMART_2IN1)
|
||||
#include "ramps/pins_SAINSMART_2IN1.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(ULTIMAKER)
|
||||
#include "ramps/pins_ULTIMAKER.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(ULTIMAKER_OLD)
|
||||
#include "ramps/pins_ULTIMAKER_OLD.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(AZTEEG_X3)
|
||||
#include "ramps/pins_AZTEEG_X3.h" // ATmega2560 env:mega2560
|
||||
#elif MB(AZTEEG_X3_PRO)
|
||||
#include "ramps/pins_AZTEEG_X3_PRO.h" // ATmega2560 env:mega2560
|
||||
#elif MB(ULTIMAIN_2)
|
||||
#include "ramps/pins_ULTIMAIN_2.h" // ATmega2560 env:mega2560ext
|
||||
#elif MB(FORMBOT_RAPTOR)
|
||||
#include "ramps/pins_FORMBOT_RAPTOR.h" // ATmega2560 env:mega2560
|
||||
#elif MB(FORMBOT_RAPTOR2)
|
||||
#include "ramps/pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(FORMBOT_TREX2PLUS)
|
||||
#include "ramps/pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:mega2560
|
||||
#elif MB(FORMBOT_TREX3)
|
||||
#include "ramps/pins_FORMBOT_TREX3.h" // ATmega2560 env:mega2560
|
||||
#elif MB(RUMBA)
|
||||
#include "ramps/pins_RUMBA.h" // ATmega2560 env:mega2560
|
||||
#elif MB(RUMBA_RAISE3D)
|
||||
#include "ramps/pins_RUMBA_RAISE3D.h" // ATmega2560 env:mega2560
|
||||
#elif MB(RL200)
|
||||
#include "ramps/pins_RL200.h" // ATmega2560 env:mega2560
|
||||
#elif MB(BQ_ZUM_MEGA_3D)
|
||||
#include "ramps/pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 env:mega2560ext
|
||||
#elif MB(MAKEBOARD_MINI)
|
||||
#include "ramps/pins_MAKEBOARD_MINI.h" // ATmega2560 env:mega2560
|
||||
#elif MB(TRIGORILLA_13)
|
||||
#include "ramps/pins_TRIGORILLA_13.h" // ATmega2560 env:mega2560
|
||||
#elif MB(TRIGORILLA_14, TRIGORILLA_14_11)
|
||||
#include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560
|
||||
#elif MB(RAMPS_ENDER_4)
|
||||
#include "ramps/pins_RAMPS_ENDER_4.h" // ATmega2560 env:mega2560
|
||||
#elif MB(RAMPS_CREALITY)
|
||||
#include "ramps/pins_RAMPS_CREALITY.h" // ATmega2560 env:mega2560
|
||||
#elif MB(DAGOMA_F5)
|
||||
#include "ramps/pins_DAGOMA_F5.h" // ATmega2560 env:mega2560
|
||||
#elif MB(FYSETC_F6_13)
|
||||
#include "ramps/pins_FYSETC_F6_13.h" // ATmega2560 env:FYSETC_F6
|
||||
#elif MB(FYSETC_F6_14)
|
||||
#include "ramps/pins_FYSETC_F6_14.h" // ATmega2560 env:FYSETC_F6
|
||||
#elif MB(DUPLICATOR_I3_PLUS)
|
||||
#include "ramps/pins_DUPLICATOR_I3_PLUS.h" // ATmega2560 env:mega2560
|
||||
#elif MB(VORON)
|
||||
#include "ramps/pins_VORON.h" // ATmega2560 env:mega2560
|
||||
#elif MB(TRONXY_V3_1_0)
|
||||
#include "ramps/pins_TRONXY_V3_1_0.h" // ATmega2560 env:mega2560
|
||||
#elif MB(Z_BOLT_X_SERIES)
|
||||
#include "ramps/pins_Z_BOLT_X_SERIES.h" // ATmega2560 env:mega2560
|
||||
#elif MB(TT_OSCAR)
|
||||
#include "ramps/pins_TT_OSCAR.h" // ATmega2560 env:mega2560
|
||||
#elif MB(TANGO)
|
||||
#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
|
||||
#elif MB(ORTUR_4)
|
||||
#include "ramps/pins_ORTUR_4.h" // ATmega2560 env:mega2560
|
||||
#elif MB(TENLOG_D3_HERO)
|
||||
#include "ramps/pins_TENLOG_D3_HERO.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_GEN_L_V21)
|
||||
#include "ramps/pins_MKS_GEN_L_V21.h" // ATmega2560 env:mega2560
|
||||
#elif MB(RAMPS_S_12_EEFB, RAMPS_S_12_EEEB, RAMPS_S_12_EFFB)
|
||||
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
|
||||
#elif MB(LONGER3D_LK1_PRO, LONGER3D_LKx_PRO)
|
||||
#include "ramps/pins_LONGER3D_LKx_PRO.h" // ATmega2560 env:mega2560
|
||||
|
||||
//
|
||||
// RAMBo and derivatives
|
||||
//
|
||||
|
||||
#elif MB(RAMBO)
|
||||
#include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
|
||||
#elif MB(MINIRAMBO, MINIRAMBO_10A)
|
||||
#include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
|
||||
#elif MB(EINSY_RAMBO)
|
||||
#include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
|
||||
#elif MB(EINSY_RETRO)
|
||||
#include "rambo/pins_EINSY_RETRO.h" // ATmega2560 env:rambo
|
||||
#elif MB(SCOOVO_X9H)
|
||||
#include "rambo/pins_SCOOVO_X9H.h" // ATmega2560 env:rambo
|
||||
#elif MB(RAMBO_THINKERV2)
|
||||
#include "rambo/pins_RAMBO_THINKERV2.h" // ATmega2560 env:rambo
|
||||
|
||||
//
|
||||
// Other ATmega1280, ATmega2560
|
||||
//
|
||||
|
||||
#elif MB(CNCONTROLS_11)
|
||||
#include "mega/pins_CNCONTROLS_11.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(CNCONTROLS_12)
|
||||
#include "mega/pins_CNCONTROLS_12.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(CNCONTROLS_15)
|
||||
#include "mega/pins_CNCONTROLS_15.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(MIGHTYBOARD_REVE)
|
||||
#include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega2560, ATmega1280 env:mega2560ext env:mega1280
|
||||
#elif MB(CHEAPTRONIC)
|
||||
#include "mega/pins_CHEAPTRONIC.h" // ATmega2560 env:mega2560
|
||||
#elif MB(CHEAPTRONIC_V2)
|
||||
#include "mega/pins_CHEAPTRONICv2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MEGATRONICS)
|
||||
#include "mega/pins_MEGATRONICS.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MEGATRONICS_2)
|
||||
#include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MEGATRONICS_3, MEGATRONICS_31, MEGATRONICS_32)
|
||||
#include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:mega2560
|
||||
#elif MB(ELEFU_3)
|
||||
#include "mega/pins_ELEFU_3.h" // ATmega2560 env:mega2560
|
||||
#elif MB(LEAPFROG)
|
||||
#include "mega/pins_LEAPFROG.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(MEGACONTROLLER)
|
||||
#include "mega/pins_MEGACONTROLLER.h" // ATmega2560 env:mega2560
|
||||
#elif MB(GT2560_REV_A)
|
||||
#include "mega/pins_GT2560_REV_A.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(GT2560_REV_A_PLUS)
|
||||
#include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
|
||||
#elif MB(GT2560_V3)
|
||||
#include "mega/pins_GT2560_V3.h" // ATmega2560 env:mega2560
|
||||
#elif MB(GT2560_REV_B)
|
||||
#include "mega/pins_GT2560_REV_B.h" // ATmega2560 env:mega2560
|
||||
#elif MB(GT2560_V4)
|
||||
#include "mega/pins_GT2560_V4.h" // ATmega2560 env:mega2560
|
||||
#elif MB(GT2560_V3_MC2)
|
||||
#include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(GT2560_V3_A20)
|
||||
#include "mega/pins_GT2560_V3_A20.h" // ATmega2560 env:mega2560
|
||||
#elif MB(EINSTART_S)
|
||||
#include "mega/pins_EINSTART-S.h" // ATmega2560, ATmega1280 env:mega2560ext env:mega1280
|
||||
#elif MB(WANHAO_ONEPLUS)
|
||||
#include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:mega2560
|
||||
#elif MB(OVERLORD)
|
||||
#include "mega/pins_OVERLORD.h" // ATmega2560 env:mega2560
|
||||
#elif MB(HJC2560C_REV1)
|
||||
#include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(HJC2560C_REV2)
|
||||
#include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(LEAPFROG_XEED2015)
|
||||
#include "mega/pins_LEAPFROG_XEED2015.h" // ATmega2560 env:mega2560
|
||||
#elif MB(PICA)
|
||||
#include "mega/pins_PICA.h" // ATmega2560 env:mega2560
|
||||
#elif MB(PICA_REVB)
|
||||
#include "mega/pins_PICAOLD.h" // ATmega2560 env:mega2560
|
||||
#elif MB(INTAMSYS40)
|
||||
#include "mega/pins_INTAMSYS40.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MALYAN_M180)
|
||||
#include "mega/pins_MALYAN_M180.h" // ATmega2560 env:mega2560
|
||||
|
||||
//
|
||||
// ATmega1281, ATmega2561
|
||||
//
|
||||
|
||||
#elif MB(MINITRONICS)
|
||||
#include "mega/pins_MINITRONICS.h" // ATmega1281 env:mega1280
|
||||
#elif MB(SILVER_GATE)
|
||||
#include "mega/pins_SILVER_GATE.h" // ATmega2561 env:mega2560
|
||||
|
||||
//
|
||||
// Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
||||
//
|
||||
|
||||
#elif MB(SANGUINOLOLU_11)
|
||||
#include "sanguino/pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(SANGUINOLOLU_12)
|
||||
#include "sanguino/pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(MELZI)
|
||||
#include "sanguino/pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(MELZI_V2)
|
||||
#include "sanguino/pins_MELZI_V2.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(MELZI_MAKR3D)
|
||||
#include "sanguino/pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(MELZI_CREALITY)
|
||||
#include "sanguino/pins_MELZI_CREALITY.h" // ATmega1284P env:melzi_optiboot_optimized env:melzi_optiboot env:melzi_optimized env:melzi
|
||||
#elif MB(MELZI_MALYAN)
|
||||
#include "sanguino/pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(MELZI_TRONXY)
|
||||
#include "sanguino/pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(STB_11)
|
||||
#include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(AZTEEG_X1)
|
||||
#include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(ZMIB_V2)
|
||||
#include "sanguino/pins_ZMIB_V2.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
|
||||
//
|
||||
// Other ATmega644P, ATmega644, ATmega1284P
|
||||
//
|
||||
|
||||
#elif MB(GEN3_MONOLITHIC)
|
||||
#include "sanguino/pins_GEN3_MONOLITHIC.h" // ATmega644P env:sanguino644p
|
||||
#elif MB(GEN3_PLUS)
|
||||
#include "sanguino/pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(GEN6)
|
||||
#include "sanguino/pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(GEN6_DELUXE)
|
||||
#include "sanguino/pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(GEN7_CUSTOM)
|
||||
#include "sanguino/pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(GEN7_12)
|
||||
#include "sanguino/pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(GEN7_13)
|
||||
#include "sanguino/pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(GEN7_14)
|
||||
#include "sanguino/pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
#elif MB(OMCA_A)
|
||||
#include "sanguino/pins_OMCA_A.h" // ATmega644 env:sanguino644p
|
||||
#elif MB(OMCA)
|
||||
#include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p
|
||||
#elif MB(ANET_10)
|
||||
#include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized
|
||||
#elif MB(SETHI)
|
||||
#include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p
|
||||
|
||||
//
|
||||
// Teensyduino - AT90USB1286, AT90USB1286P
|
||||
//
|
||||
|
||||
#elif MB(TEENSYLU)
|
||||
#include "teensy2/pins_TEENSYLU.h" // AT90USB1286, AT90USB1286P env:at90usb1286_cdc
|
||||
#elif MB(PRINTRBOARD)
|
||||
#include "teensy2/pins_PRINTRBOARD.h" // AT90USB1286 env:at90usb1286_dfu
|
||||
#elif MB(PRINTRBOARD_REVF)
|
||||
#include "teensy2/pins_PRINTRBOARD_REVF.h" // AT90USB1286 env:at90usb1286_dfu
|
||||
#elif MB(BRAINWAVE)
|
||||
#include "teensy2/pins_BRAINWAVE.h" // AT90USB646 env:at90usb1286_cdc
|
||||
#elif MB(BRAINWAVE_PRO)
|
||||
#include "teensy2/pins_BRAINWAVE_PRO.h" // AT90USB1286 env:at90usb1286_cdc
|
||||
#elif MB(SAV_MKI)
|
||||
#include "teensy2/pins_SAV_MKI.h" // AT90USB1286 env:at90usb1286_cdc
|
||||
#elif MB(TEENSY2)
|
||||
#include "teensy2/pins_TEENSY2.h" // AT90USB1286 env:teensy20
|
||||
#elif MB(5DPRINT)
|
||||
#include "teensy2/pins_5DPRINT.h" // AT90USB1286 env:at90usb1286_dfu
|
||||
|
||||
//
|
||||
// LPC1768 ARM Cortex M3
|
||||
//
|
||||
|
||||
#elif MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
|
||||
#include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
|
||||
#elif MB(MKS_SBASE)
|
||||
#include "lpc1768/pins_MKS_SBASE.h" // LPC1768 env:LPC1768
|
||||
#elif MB(MKS_SGEN_L)
|
||||
#include "lpc1768/pins_MKS_SGEN_L.h" // LPC1768 env:LPC1768
|
||||
#elif MB(AZSMZ_MINI)
|
||||
#include "lpc1768/pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768
|
||||
#elif MB(BIQU_BQ111_A4)
|
||||
#include "lpc1768/pins_BIQU_BQ111_A4.h" // LPC1768 env:LPC1768
|
||||
#elif MB(SELENA_COMPACT)
|
||||
#include "lpc1768/pins_SELENA_COMPACT.h" // LPC1768 env:LPC1768
|
||||
#elif MB(BIQU_B300_V1_0)
|
||||
#include "lpc1768/pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768
|
||||
#elif MB(GMARSH_X6_REV1)
|
||||
#include "lpc1768/pins_GMARSH_X6_REV1.h" // LPC1768 env:LPC1768
|
||||
#elif MB(BTT_SKR_V1_1)
|
||||
#include "lpc1768/pins_BTT_SKR_V1_1.h" // LPC1768 env:LPC1768
|
||||
#elif MB(BTT_SKR_V1_3)
|
||||
#include "lpc1768/pins_BTT_SKR_V1_3.h" // LPC1768 env:LPC1768
|
||||
#elif MB(BTT_SKR_V1_4)
|
||||
#include "lpc1768/pins_BTT_SKR_V1_4.h" // LPC1768 env:LPC1768
|
||||
|
||||
//
|
||||
// LPC1769 ARM Cortex M3
|
||||
//
|
||||
|
||||
#elif MB(MKS_SGEN)
|
||||
#include "lpc1769/pins_MKS_SGEN.h" // LPC1769 env:LPC1769
|
||||
#elif MB(AZTEEG_X5_GT)
|
||||
#include "lpc1769/pins_AZTEEG_X5_GT.h" // LPC1769 env:LPC1769
|
||||
#elif MB(AZTEEG_X5_MINI)
|
||||
#include "lpc1769/pins_AZTEEG_X5_MINI.h" // LPC1769 env:LPC1769
|
||||
#elif MB(AZTEEG_X5_MINI_WIFI)
|
||||
#include "lpc1769/pins_AZTEEG_X5_MINI_WIFI.h" // LPC1769 env:LPC1769
|
||||
#elif MB(COHESION3D_REMIX)
|
||||
#include "lpc1769/pins_COHESION3D_REMIX.h" // LPC1769 env:LPC1769
|
||||
#elif MB(COHESION3D_MINI)
|
||||
#include "lpc1769/pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769
|
||||
#elif MB(SMOOTHIEBOARD)
|
||||
#include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769
|
||||
#elif MB(TH3D_EZBOARD)
|
||||
#include "lpc1769/pins_TH3D_EZBOARD.h" // LPC1769 env:LPC1769
|
||||
#elif MB(BTT_SKR_V1_4_TURBO)
|
||||
#include "lpc1769/pins_BTT_SKR_V1_4_TURBO.h" // LPC1769 env:LPC1769
|
||||
#elif MB(MKS_SGEN_L_V2)
|
||||
#include "lpc1769/pins_MKS_SGEN_L_V2.h" // LPC1769 env:LPC1769
|
||||
#elif MB(BTT_SKR_E3_TURBO)
|
||||
#include "lpc1769/pins_BTT_SKR_E3_TURBO.h" // LPC1769 env:LPC1769
|
||||
#elif MB(FLY_CDY)
|
||||
#include "lpc1769/pins_FLY_CDY.h" // LPC1769 env:LPC1769
|
||||
|
||||
//
|
||||
// Due (ATSAM) boards
|
||||
//
|
||||
|
||||
#elif MB(DUE3DOM)
|
||||
#include "sam/pins_DUE3DOM.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(DUE3DOM_MINI)
|
||||
#include "sam/pins_DUE3DOM_MINI.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RADDS)
|
||||
#include "sam/pins_RADDS.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RURAMPS4D_11)
|
||||
#include "sam/pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RURAMPS4D_13)
|
||||
#include "sam/pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RAMPS_FD_V1)
|
||||
#include "sam/pins_RAMPS_FD_V1.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RAMPS_FD_V2)
|
||||
#include "sam/pins_RAMPS_FD_V2.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF)
|
||||
#include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RAMPS_DUO_EFB, RAMPS_DUO_EEB, RAMPS_DUO_EFF, RAMPS_DUO_EEF, RAMPS_DUO_SF)
|
||||
#include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(RAMPS4DUE_EFB, RAMPS4DUE_EEB, RAMPS4DUE_EFF, RAMPS4DUE_EEF, RAMPS4DUE_SF)
|
||||
#include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
|
||||
#elif MB(ULTRATRONICS_PRO)
|
||||
#include "sam/pins_ULTRATRONICS_PRO.h" // SAM3X8E env:DUE env:DUE_debug
|
||||
#elif MB(ARCHIM1)
|
||||
#include "sam/pins_ARCHIM1.h" // SAM3X8E env:DUE_archim env:DUE_archim_debug
|
||||
#elif MB(ARCHIM2)
|
||||
#include "sam/pins_ARCHIM2.h" // SAM3X8E env:DUE_archim env:DUE_archim_debug
|
||||
#elif MB(ALLIGATOR)
|
||||
#include "sam/pins_ALLIGATOR_R2.h" // SAM3X8E env:DUE env:DUE_debug
|
||||
#elif MB(ADSK)
|
||||
#include "sam/pins_ADSK.h" // SAM3X8E env:DUE env:DUE_debug
|
||||
#elif MB(PRINTRBOARD_G2)
|
||||
#include "sam/pins_PRINTRBOARD_G2.h" // SAM3X8C env:DUE_USB
|
||||
#elif MB(CNCONTROLS_15D)
|
||||
#include "sam/pins_CNCONTROLS_15D.h" // SAM3X8E env:DUE env:DUE_USB
|
||||
#elif MB(KRATOS32)
|
||||
#include "sam/pins_KRATOS32.h" // SAM3X8E env:DUE env:DUE_USB
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M0
|
||||
//
|
||||
#elif MB(MALYAN_M200_V2)
|
||||
#include "stm32f0/pins_MALYAN_M200_V2.h" // STM32F0 env:STM32F070RB_malyan env:STM32F070CB_malyan
|
||||
#elif MB(MALYAN_M300)
|
||||
#include "stm32f0/pins_MALYAN_M300.h" // STM32F070 env:malyan_M300
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M3
|
||||
//
|
||||
|
||||
#elif MB(STM32F103RE)
|
||||
#include "stm32f1/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(MALYAN_M200)
|
||||
#include "stm32f1/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
|
||||
#elif MB(STM3R_MINI)
|
||||
#include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(GTM32_PRO_VB)
|
||||
#include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(GTM32_PRO_VD)
|
||||
#include "stm32f1/pins_GTM32_PRO_VD.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(GTM32_MINI)
|
||||
#include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(GTM32_MINI_A30)
|
||||
#include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(GTM32_REV_B)
|
||||
#include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(MORPHEUS)
|
||||
#include "stm32f1/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(CHITU3D)
|
||||
#include "stm32f1/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(MKS_ROBIN)
|
||||
#include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin env:mks_robin_stm32
|
||||
#elif MB(MKS_ROBIN_MINI)
|
||||
#include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
|
||||
#elif MB(MKS_ROBIN_NANO)
|
||||
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano35 env:mks_robin_nano35_stm32
|
||||
#elif MB(MKS_ROBIN_NANO_V2)
|
||||
#include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35 env:mks_robin_nano35_stm32
|
||||
#elif MB(MKS_ROBIN_LITE)
|
||||
#include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
|
||||
#elif MB(MKS_ROBIN_LITE3)
|
||||
#include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
|
||||
#elif MB(MKS_ROBIN_PRO)
|
||||
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
|
||||
#elif MB(MKS_ROBIN_E3)
|
||||
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
|
||||
#elif MB(MKS_ROBIN_E3_V1_1)
|
||||
#include "stm32f1/pins_MKS_ROBIN_E3_V1_1.h" // STM32F1 env:mks_robin_e3
|
||||
#elif MB(MKS_ROBIN_E3D)
|
||||
#include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
|
||||
#elif MB(MKS_ROBIN_E3D_V1_1)
|
||||
#include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3
|
||||
#elif MB(MKS_ROBIN_E3P)
|
||||
#include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p
|
||||
#elif MB(BTT_SKR_MINI_V1_1)
|
||||
#include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 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 "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 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 "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
|
||||
#elif MB(BTT_SKR_MINI_E3_V2_0)
|
||||
#include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
|
||||
#elif MB(BTT_SKR_MINI_MZ_V1_0)
|
||||
#include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
|
||||
#elif MB(BTT_SKR_E3_DIP)
|
||||
#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(BTT_SKR_CR6)
|
||||
#include "stm32f1/pins_BTT_SKR_CR6.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB
|
||||
#elif MB(JGAURORA_A5S_A1)
|
||||
#include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
|
||||
#elif MB(FYSETC_AIO_II)
|
||||
#include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
|
||||
#elif MB(FYSETC_CHEETAH)
|
||||
#include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
|
||||
#elif MB(FYSETC_CHEETAH_V12)
|
||||
#include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
|
||||
#elif MB(LONGER3D_LK)
|
||||
#include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
|
||||
#elif MB(CCROBOT_MEEB_3DP)
|
||||
#include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb
|
||||
#elif MB(CHITU3D_V5)
|
||||
#include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init
|
||||
#elif MB(CHITU3D_V6)
|
||||
#include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103
|
||||
#elif MB(CREALITY_V4)
|
||||
#include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(CREALITY_V4210)
|
||||
#include "stm32f1/pins_CREALITY_V4210.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(CREALITY_V427)
|
||||
#include "stm32f1/pins_CREALITY_V427.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(CREALITY_V431)
|
||||
#include "stm32f1/pins_CREALITY_V431.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(CREALITY_V452)
|
||||
#include "stm32f1/pins_CREALITY_V452.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(CREALITY_V453)
|
||||
#include "stm32f1/pins_CREALITY_V453.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(CREALITY_S1)
|
||||
#include "stm32f1/pins_CREALITY_S1.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(TRIGORILLA_PRO)
|
||||
#include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro
|
||||
#elif MB(FLY_MINI)
|
||||
#include "stm32f1/pins_FLY_MINI.h" // STM32F1 env:FLY_MINI
|
||||
#elif MB(FLSUN_HISPEED)
|
||||
#include "stm32f1/pins_FLSUN_HISPEED.h" // STM32F1 env:flsun_hispeedv1
|
||||
#elif MB(BEAST)
|
||||
#include "stm32f1/pins_BEAST.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(MINGDA_MPX_ARM_MINI)
|
||||
#include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1 env:STM32F103RE
|
||||
#elif MB(CREALITY_V3_GD303)
|
||||
#include "stm32f1/pins_CREALITY_V3_GD303.h" // STM32F1 env:STM32F103RET6_creality
|
||||
|
||||
|
||||
//
|
||||
// ARM Cortex-M4F
|
||||
//
|
||||
|
||||
#elif MB(TEENSY31_32)
|
||||
#include "teensy3/pins_TEENSY31_32.h" // TEENSY31_32 env:teensy31
|
||||
#elif MB(TEENSY35_36)
|
||||
#include "teensy3/pins_TEENSY35_36.h" // TEENSY35_36 env:teensy35 env:teensy36
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M4F
|
||||
//
|
||||
|
||||
#elif MB(ARMED)
|
||||
#include "stm32f4/pins_ARMED.h" // STM32F4 env:ARMED
|
||||
#elif MB(RUMBA32_V1_0, RUMBA32_V1_1)
|
||||
#include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32
|
||||
#elif MB(RUMBA32_MKS)
|
||||
#include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32
|
||||
#elif MB(BLACK_STM32F407VE)
|
||||
#include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
|
||||
#elif MB(STEVAL_3DP001V1)
|
||||
#include "stm32f4/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
|
||||
#elif MB(BTT_SKR_PRO_V1_1)
|
||||
#include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO env:BIGTREE_SKR_PRO_usb_flash_drive
|
||||
#elif MB(BTT_SKR_PRO_V1_2)
|
||||
#include "stm32f4/pins_BTT_SKR_PRO_V1_2.h" // STM32F4 env:BIGTREE_SKR_PRO env:BIGTREE_SKR_PRO_usb_flash_drive
|
||||
#elif MB(BTT_GTR_V1_0)
|
||||
#include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0 env:BIGTREE_GTR_V1_0_usb_flash_drive
|
||||
#elif MB(BTT_BTT002_V1_0)
|
||||
#include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
|
||||
#elif MB(BTT_E3_RRF)
|
||||
#include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BIGTREE_E3_RRF
|
||||
#elif MB(BTT_SKR_V2_0_REV_A)
|
||||
#include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:BIGTREE_SKR_2
|
||||
#elif MB(BTT_SKR_V2_0_REV_B)
|
||||
#include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2
|
||||
#elif MB(BTT_OCTOPUS_V1_0)
|
||||
#include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1_0 env:BIGTREE_OCTOPUS_V1_0_USB
|
||||
#elif MB(LERDGE_K)
|
||||
#include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:LERDGEK env:LERDGEK_usb_flash_drive
|
||||
#elif MB(LERDGE_S)
|
||||
#include "stm32f4/pins_LERDGE_S.h" // STM32F4 env:LERDGES env:LERDGES_usb_flash_drive
|
||||
#elif MB(LERDGE_X)
|
||||
#include "stm32f4/pins_LERDGE_X.h" // STM32F4 env:LERDGEX env:LERDGEX_usb_flash_drive
|
||||
#elif MB(VAKE403D)
|
||||
#include "stm32f4/pins_VAKE403D.h" // STM32F4
|
||||
#elif MB(FYSETC_S6)
|
||||
#include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6
|
||||
#elif MB(FYSETC_S6_V2_0)
|
||||
#include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6
|
||||
#elif MB(FYSETC_SPIDER)
|
||||
#include "stm32f4/pins_FYSETC_SPIDER.h" // STM32F4 env:FYSETC_S6
|
||||
#elif MB(FLYF407ZG)
|
||||
#include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
|
||||
#elif MB(MKS_ROBIN2)
|
||||
#include "stm32f4/pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
|
||||
#elif MB(MKS_ROBIN_PRO_V2)
|
||||
#include "stm32f4/pins_MKS_ROBIN_PRO_V2.h" // STM32F4 env:mks_robin_pro2
|
||||
#elif MB(MKS_ROBIN_NANO_V3)
|
||||
#include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3 env:mks_robin_nano_v3_usb_flash_drive env:mks_robin_nano_v3_usb_flash_drive_msc
|
||||
#elif MB(ANET_ET4)
|
||||
#include "stm32f4/pins_ANET_ET4.h" // STM32F4 env:Anet_ET4_OpenBLT
|
||||
#elif MB(ANET_ET4P)
|
||||
#include "stm32f4/pins_ANET_ET4P.h" // STM32F4 env:Anet_ET4_OpenBLT
|
||||
#elif MB(FYSETC_CHEETAH_V20)
|
||||
#include "stm32f4/pins_FYSETC_CHEETAH_V20.h" // STM32F4 env:FYSETC_CHEETAH_V20
|
||||
#elif MB(CREALITY_S1_F401RC)
|
||||
#include "stm32f4/pins_CREALITY_S1_F401RC.h" // STM32F4 env:STM32F401RC_creality
|
||||
|
||||
//
|
||||
// ARM Cortex M7
|
||||
//
|
||||
|
||||
#elif MB(REMRAM_V1)
|
||||
#include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:REMRAM_V1
|
||||
#elif MB(NUCLEO_F767ZI)
|
||||
#include "stm32f7/pins_NUCLEO_F767ZI.h" // STM32F7 env:NUCLEO_F767ZI
|
||||
#elif MB(BTT_SKR_SE_BX)
|
||||
#include "stm32h7/pins_BTT_SKR_SE_BX.h" // STM32H7 env:BTT_SKR_SE_BX
|
||||
#elif MB(TEENSY41)
|
||||
#include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41
|
||||
#elif MB(T41U5XBB)
|
||||
#include "teensy4/pins_T41U5XBB.h" // Teensy-4.x env:teensy41
|
||||
|
||||
//
|
||||
// Espressif ESP32
|
||||
//
|
||||
|
||||
#elif MB(ESPRESSIF_ESP32)
|
||||
#include "esp32/pins_ESP32.h" // ESP32 env:esp32
|
||||
#elif MB(MRR_ESPA)
|
||||
#include "esp32/pins_MRR_ESPA.h" // ESP32 env:esp32
|
||||
#elif MB(MRR_ESPE)
|
||||
#include "esp32/pins_MRR_ESPE.h" // ESP32 env:esp32
|
||||
#elif MB(E4D_BOX)
|
||||
#include "esp32/pins_E4D.h" // ESP32 env:esp32
|
||||
#elif MB(FYSETC_E4)
|
||||
#include "esp32/pins_FYSETC_E4.h" // ESP32 env:FYSETC_E4
|
||||
|
||||
//
|
||||
// Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4)
|
||||
//
|
||||
|
||||
#elif MB(AGCM4_RAMPS_144)
|
||||
#include "samd/pins_RAMPS_144.h" // SAMD51 env:SAMD51_grandcentral_m4
|
||||
|
||||
//
|
||||
// Custom board (with custom PIO env)
|
||||
//
|
||||
|
||||
#elif MB(CUSTOM)
|
||||
#include "pins_custom.h" // env:custom
|
||||
|
||||
//
|
||||
// Linux Native Debug board
|
||||
//
|
||||
|
||||
#elif MB(LINUX_RAMPS)
|
||||
#include "linux/pins_RAMPS_LINUX.h" // Linux env:linux_native
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// Obsolete or unknown board
|
||||
//
|
||||
|
||||
#define BOARD_MKS_13 -1000
|
||||
#define BOARD_TRIGORILLA -1001
|
||||
#define BOARD_RURAMPS4D -1002
|
||||
#define BOARD_FORMBOT_TREX2 -1003
|
||||
#define BOARD_BIQU_SKR_V1_1 -1004
|
||||
#define BOARD_STM32F1R -1005
|
||||
#define BOARD_STM32F103R -1006
|
||||
#define BOARD_ESP32 -1007
|
||||
#define BOARD_STEVAL -1008
|
||||
#define BOARD_BIGTREE_SKR_V1_1 -1009
|
||||
#define BOARD_BIGTREE_SKR_V1_3 -1010
|
||||
#define BOARD_BIGTREE_SKR_V1_4 -1011
|
||||
#define BOARD_BIGTREE_SKR_V1_4_TURBO -1012
|
||||
#define BOARD_BIGTREE_BTT002_V1_0 -1013
|
||||
#define BOARD_BIGTREE_SKR_PRO_V1_1 -1014
|
||||
#define BOARD_BIGTREE_SKR_MINI_V1_1 -1015
|
||||
#define BOARD_BIGTREE_SKR_MINI_E3 -1016
|
||||
#define BOARD_BIGTREE_SKR_E3_DIP -1017
|
||||
#define BOARD_RUMBA32 -1018
|
||||
#define BOARD_RUMBA32_AUS3D -1019
|
||||
#define BOARD_RAMPS_DAGOMA -1020
|
||||
#define BOARD_RAMPS_LONGER3D_LK4PRO -1021
|
||||
#define BOARD_BTT_SKR_V2_0 -1022
|
||||
|
||||
#if MB(MKS_13)
|
||||
#error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
|
||||
#elif MB(TRIGORILLA)
|
||||
#error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
|
||||
#elif MB(RURAMPS4D)
|
||||
#error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration."
|
||||
#elif MB(FORMBOT_TREX2)
|
||||
#error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
|
||||
#elif MB(BIQU_SKR_V1_1)
|
||||
#error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_V1_1)
|
||||
#error "BOARD_BIGTREE_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_V1_2)
|
||||
#error "BOARD_BIGTREE_SKR_V1_2 has been renamed BOARD_BTT_SKR_V1_2. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_V1_3)
|
||||
#error "BOARD_BIGTREE_SKR_V1_3 has been renamed BOARD_BTT_SKR_V1_3. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_V1_4)
|
||||
#error "BOARD_BIGTREE_SKR_V1_4 has been renamed BOARD_BTT_SKR_V1_4. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_V1_4_TURBO)
|
||||
#error "BOARD_BIGTREE_SKR_V1_4_TURBO has been renamed BOARD_BTT_SKR_V1_4_TURBO. Please update your configuration."
|
||||
#elif MB(BIGTREE_BTT002_V1_0)
|
||||
#error "BOARD_BIGTREE_BTT002_V1_0 has been renamed BOARD_BTT_BTT002_V1_0. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_PRO_V1_1)
|
||||
#error "BOARD_BIGTREE_SKR_PRO_V1_1 has been renamed BOARD_BTT_SKR_PRO_V1_1. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_MINI_V1_1)
|
||||
#error "BOARD_BIGTREE_SKR_MINI_V1_1 has been renamed BOARD_BTT_SKR_MINI_V1_1. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_MINI_E3)
|
||||
#error "BOARD_BIGTREE_SKR_MINI_E3 has been renamed BOARD_BTT_SKR_MINI_E3_V1_0. Please update your configuration."
|
||||
#elif MB(BIGTREE_SKR_E3_DIP)
|
||||
#error "BOARD_BIGTREE_SKR_E3_DIP has been renamed BOARD_BTT_SKR_E3_DIP. Please update your configuration."
|
||||
#elif MB(STM32F1R)
|
||||
#error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
|
||||
#elif MB(STM32F103R)
|
||||
#error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
|
||||
#elif MOTHERBOARD == BOARD_ESP32
|
||||
#error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
|
||||
#elif MB(STEVAL)
|
||||
#error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
|
||||
#elif MB(RUMBA32)
|
||||
#error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_V1_0. Please update your configuration."
|
||||
#elif MB(RUMBA32_AUS3D)
|
||||
#error "BOARD_RUMBA32_AUS3D is now BOARD_RUMBA32_V1_0. Please update your configuration."
|
||||
#elif MB(RAMPS_DAGOMA)
|
||||
#error "BOARD_RAMPS_DAGOMA is now BOARD_DAGOMA_F5. Please update your configuration."
|
||||
#elif MB(RAMPS_LONGER3D_LK4PRO)
|
||||
#error "BOARD_RAMPS_LONGER3D_LK4PRO is now BOARD_LONGER3D_LKx_PRO. Please update your configuration."
|
||||
#elif MB(BTT_SKR_V2_0)
|
||||
#error "BTT_SKR_V2_0 is now BTT_SKR_V2_0_REV_A or BTT_SKR_V2_0_REV_B. See https://bit.ly/3t5d9JQ for more information. Please update your configuration."
|
||||
#else
|
||||
#error "Unknown MOTHERBOARD value set in Configuration.h"
|
||||
#endif
|
||||
|
||||
#undef BOARD_MKS_13
|
||||
#undef BOARD_TRIGORILLA
|
||||
#undef BOARD_RURAMPS4D
|
||||
#undef BOARD_FORMBOT_TREX2
|
||||
#undef BOARD_BIQU_SKR_V1_1
|
||||
#undef BOARD_STM32F1R
|
||||
#undef BOARD_STM32F103R
|
||||
#undef BOARD_ESP32
|
||||
#undef BOARD_STEVAL
|
||||
#undef BOARD_BIGTREE_SKR_MINI_E3
|
||||
#undef BOARD_BIGTREE_SKR_V1_1
|
||||
#undef BOARD_BIGTREE_SKR_V1_3
|
||||
#undef BOARD_BIGTREE_SKR_V1_4
|
||||
#undef BOARD_BIGTREE_SKR_V1_4_TURBO
|
||||
#undef BOARD_BIGTREE_BTT002_V1_0
|
||||
#undef BOARD_BIGTREE_SKR_PRO_V1_1
|
||||
#undef BOARD_BIGTREE_SKR_MINI_V1_1
|
||||
#undef BOARD_BIGTREE_SKR_E3_DIP
|
||||
#undef BOARD_RUMBA32
|
||||
#undef BOARD_RUMBA32_AUS3D
|
||||
#undef BOARD_RAMPS_DAGOMA
|
||||
#undef BOARD_RAMPS_LONGER3D_LK4PRO
|
||||
#undef BOARD_BTT_SKR_V2_0
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Post-process pins according to configured settings
|
||||
//
|
||||
#include "pins_postprocess.h"
|
||||
@@ -0,0 +1,296 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#define MAX_NAME_LENGTH 39 // one place to specify the format of all the sources of names
|
||||
// "-" left justify, "39" minimum width of name, pad with blanks
|
||||
|
||||
/**
|
||||
* This routine minimizes RAM usage by creating a FLASH resident array to
|
||||
* store the pin names, pin numbers and analog/digital flag.
|
||||
*
|
||||
* Creating the array in FLASH is a two pass process. The first pass puts the
|
||||
* name strings into FLASH. The second pass actually creates the array.
|
||||
*
|
||||
* Both passes use the same pin list. The list contains two macro names. The
|
||||
* actual macro definitions are changed depending on which pass is being done.
|
||||
*/
|
||||
|
||||
// first pass - put the name strings into FLASH
|
||||
|
||||
#define _ADD_PIN_2(PIN_NAME, ENTRY_NAME) static const char ENTRY_NAME[] PROGMEM = { PIN_NAME };
|
||||
#define _ADD_PIN(PIN_NAME, COUNTER) _ADD_PIN_2(PIN_NAME, entry_NAME_##COUNTER)
|
||||
#define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
|
||||
#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
|
||||
|
||||
#include "pinsDebug_list.h"
|
||||
#line 45
|
||||
|
||||
// manually add pins that have names that are macros which don't play well with these macros
|
||||
#if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768)
|
||||
#if CONF_SERIAL_IS(0)
|
||||
static const char RXD_NAME_0[] PROGMEM = { "RXD0" };
|
||||
static const char TXD_NAME_0[] PROGMEM = { "TXD0" };
|
||||
#endif
|
||||
#if CONF_SERIAL_IS(1)
|
||||
static const char RXD_NAME_1[] PROGMEM = { "RXD1" };
|
||||
static const char TXD_NAME_1[] PROGMEM = { "TXD1" };
|
||||
#endif
|
||||
#if CONF_SERIAL_IS(2)
|
||||
static const char RXD_NAME_2[] PROGMEM = { "RXD2" };
|
||||
static const char TXD_NAME_2[] PROGMEM = { "TXD2" };
|
||||
#endif
|
||||
#if CONF_SERIAL_IS(3)
|
||||
static const char RXD_NAME_3[] PROGMEM = { "RXD3" };
|
||||
static const char TXD_NAME_3[] PROGMEM = { "TXD3" };
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// second pass - create the array
|
||||
|
||||
#undef _ADD_PIN_2
|
||||
#undef _ADD_PIN
|
||||
#undef REPORT_NAME_DIGITAL
|
||||
#undef REPORT_NAME_ANALOG
|
||||
|
||||
#define _ADD_PIN_2(ENTRY_NAME, NAME, IS_DIGITAL) { ENTRY_NAME, NAME, IS_DIGITAL },
|
||||
#define _ADD_PIN(NAME, COUNTER, IS_DIGITAL) _ADD_PIN_2(entry_NAME_##COUNTER, NAME, IS_DIGITAL)
|
||||
#define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(NAME, COUNTER, true)
|
||||
#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false)
|
||||
|
||||
|
||||
typedef struct {
|
||||
PGM_P const name;
|
||||
pin_t pin;
|
||||
bool is_digital;
|
||||
} PinInfo;
|
||||
|
||||
const PinInfo pin_array[] PROGMEM = {
|
||||
|
||||
/**
|
||||
* [pin name] [pin number] [is digital or analog] 1 = digital, 0 = analog
|
||||
* Each entry takes up 6 bytes in FLASH:
|
||||
* 2 byte pointer to location of the name string
|
||||
* 2 bytes containing the pin number
|
||||
* analog pin numbers were converted to digital when the array was created
|
||||
* 2 bytes containing the digital/analog bool flag
|
||||
*/
|
||||
|
||||
#if CONF_SERIAL_IS(0)
|
||||
#if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM)
|
||||
{ RXD_NAME_0, 0, true },
|
||||
{ TXD_NAME_0, 1, true },
|
||||
#elif AVR_ATmega1284_FAMILY
|
||||
{ RXD_NAME_0, 8, true },
|
||||
{ TXD_NAME_0, 9, true },
|
||||
#elif defined(TARGET_LPC1768) // TX P0_02 RX P0_03
|
||||
{ RXD_NAME_0, 3, true },
|
||||
{ TXD_NAME_0, 2, true },
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CONF_SERIAL_IS(1)
|
||||
#if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM)
|
||||
{ RXD_NAME_1, 19, true },
|
||||
{ TXD_NAME_1, 18, true },
|
||||
#elif AVR_ATmega1284_FAMILY
|
||||
{ RXD_NAME_1, 10, true },
|
||||
{ TXD_NAME_1, 11, true },
|
||||
#elif defined(TARGET_LPC1768)
|
||||
#ifdef LPC_PINCFG_UART1_P2_00 // TX P2_00 RX P2_01
|
||||
{ RXD_NAME_1, 0x41, true },
|
||||
{ TXD_NAME_1, 0x40, true },
|
||||
#else // TX P0_15 RX P0_16
|
||||
{ RXD_NAME_1, 16, true },
|
||||
{ TXD_NAME_1, 15, true },
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CONF_SERIAL_IS(2)
|
||||
#if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM)
|
||||
{ RXD_NAME_2, 17, true },
|
||||
{ TXD_NAME_2, 16, true },
|
||||
#elif defined(TARGET_LPC1768)
|
||||
#ifdef LPC_PINCFG_UART2_P2_08 // TX P2_08 RX P2_09
|
||||
{ RXD_NAME_2, 0x49, true },
|
||||
{ TXD_NAME_2, 0x48, true },
|
||||
#else // TX P0_10 RX P0_11
|
||||
{ RXD_NAME_2, 11, true },
|
||||
{ TXD_NAME_2, 10, true },
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CONF_SERIAL_IS(3)
|
||||
#if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM)
|
||||
{ RXD_NAME_3, 15, true },
|
||||
{ TXD_NAME_3, 14, true },
|
||||
#elif defined(TARGET_LPC1768)
|
||||
#ifdef LPC_PINCFG_UART3_P0_25 // TX P0_25 RX P0_26
|
||||
{ RXD_NAME_3, 0x1A, true },
|
||||
{ TXD_NAME_3, 0x19, true },
|
||||
#elif defined(LPC_PINCFG_UART3_P4_28) // TX P4_28 RX P4_29
|
||||
{ RXD_NAME_3, 0x9D, true },
|
||||
{ TXD_NAME_3, 0x9C, true },
|
||||
#else // TX P0_00 RX P0_01
|
||||
{ RXD_NAME_3, 1, true },
|
||||
{ TXD_NAME_3, 0, true },
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "pinsDebug_list.h"
|
||||
#line 164
|
||||
|
||||
};
|
||||
|
||||
#include HAL_PATH(../HAL, pinsDebug.h) // get the correct support file for this CPU
|
||||
|
||||
#ifndef M43_NEVER_TOUCH
|
||||
#define M43_NEVER_TOUCH(Q) false
|
||||
#endif
|
||||
|
||||
static void print_input_or_output(const bool isout) {
|
||||
SERIAL_ECHOPGM_P(isout ? PSTR("Output = ") : PSTR("Input = "));
|
||||
}
|
||||
|
||||
// pretty report with PWM info
|
||||
inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool extended=false, PGM_P const start_string=nullptr) {
|
||||
char buffer[MAX_NAME_LENGTH + 1]; // for the sprintf statements
|
||||
bool found = false, multi_name_pin = false;
|
||||
|
||||
auto alt_pin_echo = [](const pin_t &pin) {
|
||||
#if AVR_AT90USB1286_FAMILY
|
||||
// Use FastIO for pins Teensy doesn't expose
|
||||
if (pin == 46) {
|
||||
print_input_or_output(IS_OUTPUT(46));
|
||||
SERIAL_CHAR('0' + READ(46));
|
||||
return false;
|
||||
}
|
||||
else if (pin == 47) {
|
||||
print_input_or_output(IS_OUTPUT(47));
|
||||
SERIAL_CHAR('0' + READ(47));
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
};
|
||||
|
||||
LOOP_L_N(x, COUNT(pin_array)) { // scan entire array and report all instances of this pin
|
||||
if (GET_ARRAY_PIN(x) == pin) {
|
||||
if (!found) { // report digital and analog pin number only on the first time through
|
||||
if (start_string) SERIAL_ECHOPGM_P(start_string);
|
||||
SERIAL_ECHOPGM("PIN: ");
|
||||
PRINT_PIN(pin);
|
||||
PRINT_PORT(pin);
|
||||
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
|
||||
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number
|
||||
SERIAL_ECHO(buffer);
|
||||
}
|
||||
else SERIAL_ECHO_SP(8); // add padding if not an analog pin
|
||||
}
|
||||
else {
|
||||
SERIAL_CHAR('.');
|
||||
SERIAL_ECHO_SP(MULTI_NAME_PAD + (start_string ? strlen_P(start_string) : 0)); // add padding if not the first instance found
|
||||
}
|
||||
PRINT_ARRAY_NAME(x);
|
||||
if (extended) {
|
||||
if (pin_is_protected(pin) && !ignore)
|
||||
SERIAL_ECHOPGM("protected ");
|
||||
else {
|
||||
if (alt_pin_echo(pin)) {
|
||||
if (!GET_ARRAY_IS_DIGITAL(x)) {
|
||||
sprintf_P(buffer, PSTR("Analog in = %5ld"), (long)analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
|
||||
SERIAL_ECHO(buffer);
|
||||
}
|
||||
else {
|
||||
if (!GET_PINMODE(pin)) {
|
||||
//pinMode(pin, INPUT_PULLUP); // make sure input isn't floating - stopped doing this
|
||||
// because this could interfere with inductive/capacitive
|
||||
// sensors (high impedance voltage divider) and with Pt100 amplifier
|
||||
print_input_or_output(false);
|
||||
SERIAL_ECHO(digitalRead_mod(pin));
|
||||
}
|
||||
else if (pwm_status(pin)) {
|
||||
// do nothing
|
||||
}
|
||||
else {
|
||||
print_input_or_output(true);
|
||||
SERIAL_ECHO(digitalRead_mod(pin));
|
||||
}
|
||||
}
|
||||
if (!multi_name_pin && extended) pwm_details(pin); // report PWM capabilities only on the first pass & only if doing an extended report
|
||||
}
|
||||
}
|
||||
}
|
||||
SERIAL_EOL();
|
||||
multi_name_pin = found;
|
||||
found = true;
|
||||
} // end of IF
|
||||
} // end of for loop
|
||||
|
||||
if (!found) {
|
||||
if (start_string) SERIAL_ECHOPGM_P(start_string);
|
||||
SERIAL_ECHOPGM("PIN: ");
|
||||
PRINT_PIN(pin);
|
||||
PRINT_PORT(pin);
|
||||
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
|
||||
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number
|
||||
SERIAL_ECHO(buffer);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHO_SP(8); // add padding if not an analog pin
|
||||
SERIAL_ECHOPGM("<unused/unknown>");
|
||||
if (extended) {
|
||||
|
||||
if (alt_pin_echo(pin)) {
|
||||
if (pwm_status(pin)) {
|
||||
// do nothing
|
||||
}
|
||||
else if (GET_PINMODE(pin)) {
|
||||
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16);
|
||||
print_input_or_output(true);
|
||||
SERIAL_ECHO(digitalRead_mod(pin));
|
||||
}
|
||||
else {
|
||||
if (IS_ANALOG(pin)) {
|
||||
sprintf_P(buffer, PSTR(" Analog in = %5ld"), (long)analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
|
||||
SERIAL_ECHO(buffer);
|
||||
SERIAL_ECHOPGM(" ");
|
||||
}
|
||||
else
|
||||
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16); // add padding if not an analog pin
|
||||
|
||||
print_input_or_output(false);
|
||||
SERIAL_ECHO(digitalRead_mod(pin));
|
||||
}
|
||||
//if (!pwm_status(pin)) SERIAL_CHAR(' '); // add padding if it's not a PWM pin
|
||||
if (extended) {
|
||||
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16);
|
||||
pwm_details(pin); // report PWM capabilities only if doing an extended report
|
||||
}
|
||||
}
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,928 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// File: pins/pins_postprocess.h
|
||||
// Post-process pins according to configured settings
|
||||
//
|
||||
|
||||
// Define certain undefined pins
|
||||
#ifndef X_MS1_PIN
|
||||
#define X_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef X_MS2_PIN
|
||||
#define X_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef X_MS3_PIN
|
||||
#define X_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef Y_MS1_PIN
|
||||
#define Y_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef Y_MS2_PIN
|
||||
#define Y_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef Y_MS3_PIN
|
||||
#define Y_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef Z_MS1_PIN
|
||||
#define Z_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef Z_MS2_PIN
|
||||
#define Z_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef Z_MS3_PIN
|
||||
#define Z_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E0_MS1_PIN
|
||||
#define E0_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E0_MS2_PIN
|
||||
#define E0_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E0_MS3_PIN
|
||||
#define E0_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E1_MS1_PIN
|
||||
#define E1_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E1_MS2_PIN
|
||||
#define E1_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E1_MS3_PIN
|
||||
#define E1_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E2_MS1_PIN
|
||||
#define E2_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E2_MS2_PIN
|
||||
#define E2_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E2_MS3_PIN
|
||||
#define E2_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E3_MS1_PIN
|
||||
#define E3_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E3_MS2_PIN
|
||||
#define E3_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E3_MS3_PIN
|
||||
#define E3_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E4_MS1_PIN
|
||||
#define E4_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E4_MS2_PIN
|
||||
#define E4_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E4_MS3_PIN
|
||||
#define E4_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E5_MS1_PIN
|
||||
#define E5_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E5_MS2_PIN
|
||||
#define E5_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E5_MS3_PIN
|
||||
#define E5_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E6_MS1_PIN
|
||||
#define E6_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E6_MS2_PIN
|
||||
#define E6_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E6_MS3_PIN
|
||||
#define E6_MS3_PIN -1
|
||||
#endif
|
||||
#ifndef E7_MS1_PIN
|
||||
#define E7_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef E7_MS2_PIN
|
||||
#define E7_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef E7_MS3_PIN
|
||||
#define E7_MS3_PIN -1
|
||||
#endif
|
||||
|
||||
#ifndef E0_STEP_PIN
|
||||
#define E0_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E0_DIR_PIN
|
||||
#define E0_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E0_ENABLE_PIN
|
||||
#define E0_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E1_STEP_PIN
|
||||
#define E1_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E1_DIR_PIN
|
||||
#define E1_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E1_ENABLE_PIN
|
||||
#define E1_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E2_STEP_PIN
|
||||
#define E2_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E2_DIR_PIN
|
||||
#define E2_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E2_ENABLE_PIN
|
||||
#define E2_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E3_STEP_PIN
|
||||
#define E3_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E3_DIR_PIN
|
||||
#define E3_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E3_ENABLE_PIN
|
||||
#define E3_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E4_STEP_PIN
|
||||
#define E4_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E4_DIR_PIN
|
||||
#define E4_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E4_ENABLE_PIN
|
||||
#define E4_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E5_STEP_PIN
|
||||
#define E5_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E5_DIR_PIN
|
||||
#define E5_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E5_ENABLE_PIN
|
||||
#define E5_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E6_STEP_PIN
|
||||
#define E6_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E6_DIR_PIN
|
||||
#define E6_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E6_ENABLE_PIN
|
||||
#define E6_ENABLE_PIN -1
|
||||
#endif
|
||||
#ifndef E7_STEP_PIN
|
||||
#define E7_STEP_PIN -1
|
||||
#endif
|
||||
#ifndef E7_DIR_PIN
|
||||
#define E7_DIR_PIN -1
|
||||
#endif
|
||||
#ifndef E7_ENABLE_PIN
|
||||
#define E7_ENABLE_PIN -1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Destroy unused CS pins
|
||||
//
|
||||
#if !AXIS_HAS_SPI(X)
|
||||
#undef X_CS_PIN
|
||||
#endif
|
||||
#if !AXIS_HAS_SPI(Y)
|
||||
#undef Y_CS_PIN
|
||||
#endif
|
||||
#if !AXIS_HAS_SPI(Z)
|
||||
#undef Z_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS && !AXIS_HAS_SPI(E0)
|
||||
#undef E0_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 1 && !AXIS_HAS_SPI(E1)
|
||||
#undef E1_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 2 && !AXIS_HAS_SPI(E2)
|
||||
#undef E2_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 3 && !AXIS_HAS_SPI(E3)
|
||||
#undef E3_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 4 && !AXIS_HAS_SPI(E4)
|
||||
#undef E4_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 5 && !AXIS_HAS_SPI(E5)
|
||||
#undef E5_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 6 && !AXIS_HAS_SPI(E6)
|
||||
#undef E6_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS > 7 && !AXIS_HAS_SPI(E7)
|
||||
#undef E7_CS_PIN
|
||||
#endif
|
||||
|
||||
#ifndef X_CS_PIN
|
||||
#define X_CS_PIN -1
|
||||
#endif
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN -1
|
||||
#endif
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E1_CS_PIN
|
||||
#define E1_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E2_CS_PIN
|
||||
#define E2_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E3_CS_PIN
|
||||
#define E3_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E4_CS_PIN
|
||||
#define E4_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E5_CS_PIN
|
||||
#define E5_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E6_CS_PIN
|
||||
#define E6_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E7_CS_PIN
|
||||
#define E7_CS_PIN -1
|
||||
#endif
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN -1
|
||||
#endif
|
||||
#define FAN0_PIN FAN_PIN
|
||||
#ifndef FAN1_PIN
|
||||
#define FAN1_PIN -1
|
||||
#endif
|
||||
#ifndef FAN2_PIN
|
||||
#define FAN2_PIN -1
|
||||
#endif
|
||||
#ifndef CONTROLLER_FAN_PIN
|
||||
#define CONTROLLER_FAN_PIN -1
|
||||
#endif
|
||||
|
||||
#ifndef FANMUX0_PIN
|
||||
#define FANMUX0_PIN -1
|
||||
#endif
|
||||
#ifndef FANMUX1_PIN
|
||||
#define FANMUX1_PIN -1
|
||||
#endif
|
||||
#ifndef FANMUX2_PIN
|
||||
#define FANMUX2_PIN -1
|
||||
#endif
|
||||
|
||||
#ifndef HEATER_0_PIN
|
||||
#define HEATER_0_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_1_PIN
|
||||
#define HEATER_1_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_2_PIN
|
||||
#define HEATER_2_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_3_PIN
|
||||
#define HEATER_3_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_4_PIN
|
||||
#define HEATER_4_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_5_PIN
|
||||
#define HEATER_5_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_6_PIN
|
||||
#define HEATER_6_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_7_PIN
|
||||
#define HEATER_7_PIN -1
|
||||
#endif
|
||||
#ifndef HEATER_BED_PIN
|
||||
#define HEATER_BED_PIN -1
|
||||
#endif
|
||||
|
||||
#ifndef TEMP_0_PIN
|
||||
#define TEMP_0_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_1_PIN
|
||||
#define TEMP_1_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_2_PIN
|
||||
#define TEMP_2_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_3_PIN
|
||||
#define TEMP_3_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_4_PIN
|
||||
#define TEMP_4_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_5_PIN
|
||||
#define TEMP_5_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_6_PIN
|
||||
#define TEMP_6_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_7_PIN
|
||||
#define TEMP_7_PIN -1
|
||||
#endif
|
||||
#ifndef TEMP_BED_PIN
|
||||
#define TEMP_BED_PIN -1
|
||||
#endif
|
||||
|
||||
#ifndef SD_DETECT_PIN
|
||||
#define SD_DETECT_PIN -1
|
||||
#endif
|
||||
#ifndef SDPOWER_PIN
|
||||
#define SDPOWER_PIN -1
|
||||
#endif
|
||||
#ifndef SDSS
|
||||
#define SDSS -1
|
||||
#endif
|
||||
#ifndef LED_PIN
|
||||
#define LED_PIN -1
|
||||
#endif
|
||||
#if DISABLED(PSU_CONTROL) || !defined(PS_ON_PIN)
|
||||
#undef PS_ON_PIN
|
||||
#define PS_ON_PIN -1
|
||||
#endif
|
||||
#ifndef KILL_PIN
|
||||
#define KILL_PIN -1
|
||||
#endif
|
||||
#ifndef SUICIDE_PIN
|
||||
#define SUICIDE_PIN -1
|
||||
#endif
|
||||
#ifndef SUICIDE_PIN_INVERTING
|
||||
#define SUICIDE_PIN_INVERTING false
|
||||
#endif
|
||||
|
||||
#ifndef NUM_SERVO_PLUGS
|
||||
#define NUM_SERVO_PLUGS 4
|
||||
#endif
|
||||
|
||||
//
|
||||
// Assign endstop pins for boards with only 3 connectors
|
||||
//
|
||||
#ifdef X_STOP_PIN
|
||||
#if X_HOME_TO_MIN
|
||||
#define X_MIN_PIN X_STOP_PIN
|
||||
#ifndef X_MAX_PIN
|
||||
#define X_MAX_PIN -1
|
||||
#endif
|
||||
#else
|
||||
#define X_MAX_PIN X_STOP_PIN
|
||||
#ifndef X_MIN_PIN
|
||||
#define X_MIN_PIN -1
|
||||
#endif
|
||||
#endif
|
||||
#elif X_HOME_TO_MIN
|
||||
#define X_STOP_PIN X_MIN_PIN
|
||||
#else
|
||||
#define X_STOP_PIN X_MAX_PIN
|
||||
#endif
|
||||
|
||||
#ifdef Y_STOP_PIN
|
||||
#if Y_HOME_TO_MIN
|
||||
#define Y_MIN_PIN Y_STOP_PIN
|
||||
#ifndef Y_MAX_PIN
|
||||
#define Y_MAX_PIN -1
|
||||
#endif
|
||||
#else
|
||||
#define Y_MAX_PIN Y_STOP_PIN
|
||||
#ifndef Y_MIN_PIN
|
||||
#define Y_MIN_PIN -1
|
||||
#endif
|
||||
#endif
|
||||
#elif Y_HOME_TO_MIN
|
||||
#define Y_STOP_PIN Y_MIN_PIN
|
||||
#else
|
||||
#define Y_STOP_PIN Y_MAX_PIN
|
||||
#endif
|
||||
|
||||
#ifdef Z_STOP_PIN
|
||||
#if Z_HOME_TO_MIN
|
||||
#define Z_MIN_PIN Z_STOP_PIN
|
||||
#ifndef Z_MAX_PIN
|
||||
#define Z_MAX_PIN -1
|
||||
#endif
|
||||
#else
|
||||
#define Z_MAX_PIN Z_STOP_PIN
|
||||
#ifndef Z_MIN_PIN
|
||||
#define Z_MIN_PIN -1
|
||||
#endif
|
||||
#endif
|
||||
#elif Z_HOME_TO_MIN
|
||||
#define Z_STOP_PIN Z_MIN_PIN
|
||||
#else
|
||||
#define Z_STOP_PIN Z_MAX_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Disable unused endstop / probe pins
|
||||
//
|
||||
#define _STOP_IN_USE(N) (X2_USE_ENDSTOP == N || Y2_USE_ENDSTOP == N || Z2_USE_ENDSTOP == N || Z3_USE_ENDSTOP == N || Z4_USE_ENDSTOP == N)
|
||||
#if _STOP_IN_USE(_XMAX_)
|
||||
#define USE_XMAX_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_YMAX_)
|
||||
#define USE_YMAX_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_ZMAX_)
|
||||
#define USE_ZMAX_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_XMIN_)
|
||||
#define USE_XMIN_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_YMIN_)
|
||||
#define USE_YMIN_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_ZMIN_)
|
||||
#define USE_ZMIN_PLUG
|
||||
#endif
|
||||
#undef _STOP_IN_USE
|
||||
#if !HAS_CUSTOM_PROBE_PIN
|
||||
#undef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_XMAX_PLUG)
|
||||
#undef X_MAX_PIN
|
||||
#define X_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_YMAX_PLUG)
|
||||
#undef Y_MAX_PIN
|
||||
#define Y_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_ZMAX_PLUG)
|
||||
#undef Z_MAX_PIN
|
||||
#define Z_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_XMIN_PLUG)
|
||||
#undef X_MIN_PIN
|
||||
#define X_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_YMIN_PLUG)
|
||||
#undef Y_MIN_PIN
|
||||
#define Y_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_ZMIN_PLUG)
|
||||
#undef Z_MIN_PIN
|
||||
#define Z_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MAX
|
||||
#undef X2_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MIN
|
||||
#undef X2_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_TO_MAX
|
||||
#undef Y2_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_TO_MIN
|
||||
#undef Y2_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MAX
|
||||
#undef Z2_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN
|
||||
#undef Z2_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MAX
|
||||
#undef Z3_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MIN
|
||||
#undef Z3_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MAX
|
||||
#undef Z4_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MIN
|
||||
#undef Z4_MAX_PIN
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
#define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN
|
||||
#else
|
||||
#undef FIL_RUNOUT_PIN
|
||||
#undef FIL_RUNOUT1_PIN
|
||||
#endif
|
||||
|
||||
#ifndef LCD_PINS_D4
|
||||
#define LCD_PINS_D4 -1
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_HD44780 || TOUCH_UI_ULTIPANEL
|
||||
#ifndef LCD_PINS_D5
|
||||
#define LCD_PINS_D5 -1
|
||||
#endif
|
||||
#ifndef LCD_PINS_D6
|
||||
#define LCD_PINS_D6 -1
|
||||
#endif
|
||||
#ifndef LCD_PINS_D7
|
||||
#define LCD_PINS_D7 -1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Auto-Assignment for Dual X, Dual Y, Multi-Z Steppers
|
||||
*
|
||||
* By default X2 is assigned to the next open E plug
|
||||
* on the board, then in order, Y2, Z2, Z3. These can be
|
||||
* overridden in Configuration.h or Configuration_adv.h.
|
||||
*/
|
||||
|
||||
#define __PEXI(p,q) PIN_EXISTS(E##p##_##q)
|
||||
#define _PEXI(p,q) __PEXI(p,q)
|
||||
#define __EPIN(p,q) E##p##_##q##_PIN
|
||||
#define _EPIN(p,q) __EPIN(p,q)
|
||||
#define DIAG_REMAPPED(p,q) (PIN_EXISTS(q) && _EPIN(p##_E_INDEX, DIAG) == q##_PIN)
|
||||
|
||||
// The X2 axis, if any, should be the next open extruder port
|
||||
#define X2_E_INDEX E_STEPPERS
|
||||
|
||||
#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
|
||||
#ifndef X2_STEP_PIN
|
||||
#define X2_STEP_PIN _EPIN(X2_E_INDEX, STEP)
|
||||
#define X2_DIR_PIN _EPIN(X2_E_INDEX, DIR)
|
||||
#define X2_ENABLE_PIN _EPIN(X2_E_INDEX, ENABLE)
|
||||
#if X2_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(X2_STEP)
|
||||
#error "No E stepper plug left for X2!"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef X2_MS1_PIN
|
||||
#define X2_MS1_PIN _EPIN(X2_E_INDEX, MS1)
|
||||
#endif
|
||||
#ifndef X2_MS2_PIN
|
||||
#define X2_MS2_PIN _EPIN(X2_E_INDEX, MS2)
|
||||
#endif
|
||||
#ifndef X2_MS3_PIN
|
||||
#define X2_MS3_PIN _EPIN(X2_E_INDEX, MS3)
|
||||
#endif
|
||||
#if AXIS_HAS_SPI(X2) && !defined(X2_CS_PIN)
|
||||
#define X2_CS_PIN _EPIN(X2_E_INDEX, CS)
|
||||
#endif
|
||||
#if AXIS_HAS_UART(X2)
|
||||
#ifndef X2_SERIAL_TX_PIN
|
||||
#define X2_SERIAL_TX_PIN _EPIN(X2_E_INDEX, SERIAL_TX)
|
||||
#endif
|
||||
#ifndef X2_SERIAL_RX_PIN
|
||||
#define X2_SERIAL_RX_PIN _EPIN(X2_E_INDEX, SERIAL_RX)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Auto-assign pins for stallGuard sensorless homing
|
||||
//
|
||||
#if defined(X2_STALL_SENSITIVITY) && ENABLED(X_DUAL_ENDSTOPS) && _PEXI(X2_E_INDEX, DIAG)
|
||||
#define X2_DIAG_PIN _EPIN(X2_E_INDEX, DIAG)
|
||||
#if DIAG_REMAPPED(X2, X_MIN) // If already remapped in the pins file...
|
||||
#define X2_USE_ENDSTOP _XMIN_
|
||||
#elif DIAG_REMAPPED(X2, Y_MIN)
|
||||
#define X2_USE_ENDSTOP _YMIN_
|
||||
#elif DIAG_REMAPPED(X2, Z_MIN)
|
||||
#define X2_USE_ENDSTOP _ZMIN_
|
||||
#elif DIAG_REMAPPED(X2, X_MAX)
|
||||
#define X2_USE_ENDSTOP _XMAX_
|
||||
#elif DIAG_REMAPPED(X2, Y_MAX)
|
||||
#define X2_USE_ENDSTOP _YMAX_
|
||||
#elif DIAG_REMAPPED(X2, Z_MAX)
|
||||
#define X2_USE_ENDSTOP _ZMAX_
|
||||
#else // Otherwise use the driver DIAG_PIN directly
|
||||
#define _X2_USE_ENDSTOP(P) _E##P##_DIAG_
|
||||
#define X2_USE_ENDSTOP _X2_USE_ENDSTOP(X2_E_INDEX)
|
||||
#endif
|
||||
#undef X2_DIAG_PIN
|
||||
#endif
|
||||
|
||||
#define Y2_E_INDEX INCREMENT(X2_E_INDEX)
|
||||
#else
|
||||
#define Y2_E_INDEX X2_E_INDEX
|
||||
#endif
|
||||
|
||||
#ifndef X2_CS_PIN
|
||||
#define X2_CS_PIN -1
|
||||
#endif
|
||||
#ifndef X2_MS1_PIN
|
||||
#define X2_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef X2_MS2_PIN
|
||||
#define X2_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef X2_MS3_PIN
|
||||
#define X2_MS3_PIN -1
|
||||
#endif
|
||||
|
||||
// The Y2 axis, if any, should be the next open extruder port
|
||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
||||
#ifndef Y2_STEP_PIN
|
||||
#define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
|
||||
#define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
|
||||
#define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
|
||||
#if Y2_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Y2_STEP)
|
||||
#error "No E stepper plug left for Y2!"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Y2_MS1_PIN
|
||||
#define Y2_MS1_PIN _EPIN(Y2_E_INDEX, MS1)
|
||||
#endif
|
||||
#ifndef Y2_MS2_PIN
|
||||
#define Y2_MS2_PIN _EPIN(Y2_E_INDEX, MS2)
|
||||
#endif
|
||||
#ifndef Y2_MS3_PIN
|
||||
#define Y2_MS3_PIN _EPIN(Y2_E_INDEX, MS3)
|
||||
#endif
|
||||
#if AXIS_HAS_SPI(Y2) && !defined(Y2_CS_PIN)
|
||||
#define Y2_CS_PIN _EPIN(Y2_E_INDEX, CS)
|
||||
#endif
|
||||
#if AXIS_HAS_UART(Y2)
|
||||
#ifndef Y2_SERIAL_TX_PIN
|
||||
#define Y2_SERIAL_TX_PIN _EPIN(Y2_E_INDEX, SERIAL_TX)
|
||||
#endif
|
||||
#ifndef Y2_SERIAL_RX_PIN
|
||||
#define Y2_SERIAL_RX_PIN _EPIN(Y2_E_INDEX, SERIAL_RX)
|
||||
#endif
|
||||
#endif
|
||||
#if defined(Y2_STALL_SENSITIVITY) && ENABLED(Y_DUAL_ENDSTOPS) && _PEXI(Y2_E_INDEX, DIAG)
|
||||
#define Y2_DIAG_PIN _EPIN(Y2_E_INDEX, DIAG)
|
||||
#if DIAG_REMAPPED(Y2, X_MIN)
|
||||
#define Y2_USE_ENDSTOP _XMIN_
|
||||
#elif DIAG_REMAPPED(Y2, Y_MIN)
|
||||
#define Y2_USE_ENDSTOP _YMIN_
|
||||
#elif DIAG_REMAPPED(Y2, Z_MIN)
|
||||
#define Y2_USE_ENDSTOP _ZMIN_
|
||||
#elif DIAG_REMAPPED(Y2, X_MAX)
|
||||
#define Y2_USE_ENDSTOP _XMAX_
|
||||
#elif DIAG_REMAPPED(Y2, Y_MAX)
|
||||
#define Y2_USE_ENDSTOP _YMAX_
|
||||
#elif DIAG_REMAPPED(Y2, Z_MAX)
|
||||
#define Y2_USE_ENDSTOP _ZMAX_
|
||||
#else
|
||||
#define _Y2_USE_ENDSTOP(P) _E##P##_DIAG_
|
||||
#define Y2_USE_ENDSTOP _Y2_USE_ENDSTOP(Y2_E_INDEX)
|
||||
#endif
|
||||
#undef Y2_DIAG_PIN
|
||||
#endif
|
||||
#define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
|
||||
#else
|
||||
#define Z2_E_INDEX Y2_E_INDEX
|
||||
#endif
|
||||
|
||||
#ifndef Y2_CS_PIN
|
||||
#define Y2_CS_PIN -1
|
||||
#endif
|
||||
#ifndef Y2_MS1_PIN
|
||||
#define Y2_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef Y2_MS2_PIN
|
||||
#define Y2_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef Y2_MS3_PIN
|
||||
#define Y2_MS3_PIN -1
|
||||
#endif
|
||||
|
||||
// The Z2 axis, if any, should be the next open extruder port
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
||||
#ifndef Z2_STEP_PIN
|
||||
#define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
|
||||
#define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
|
||||
#define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
|
||||
#if Z2_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Z2_STEP)
|
||||
#error "No E stepper plug left for Z2!"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z2_MS1_PIN
|
||||
#define Z2_MS1_PIN _EPIN(Z2_E_INDEX, MS1)
|
||||
#endif
|
||||
#ifndef Z2_MS2_PIN
|
||||
#define Z2_MS2_PIN _EPIN(Z2_E_INDEX, MS2)
|
||||
#endif
|
||||
#ifndef Z2_MS3_PIN
|
||||
#define Z2_MS3_PIN _EPIN(Z2_E_INDEX, MS3)
|
||||
#endif
|
||||
#if AXIS_HAS_SPI(Z2) && !defined(Z2_CS_PIN)
|
||||
#define Z2_CS_PIN _EPIN(Z2_E_INDEX, CS)
|
||||
#endif
|
||||
#if AXIS_HAS_UART(Z2)
|
||||
#ifndef Z2_SERIAL_TX_PIN
|
||||
#define Z2_SERIAL_TX_PIN _EPIN(Z2_E_INDEX, SERIAL_TX)
|
||||
#endif
|
||||
#ifndef Z2_SERIAL_RX_PIN
|
||||
#define Z2_SERIAL_RX_PIN _EPIN(Z2_E_INDEX, SERIAL_RX)
|
||||
#endif
|
||||
#endif
|
||||
#if defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 2 && _PEXI(Z2_E_INDEX, DIAG)
|
||||
#define Z2_DIAG_PIN _EPIN(Z2_E_INDEX, DIAG)
|
||||
#if DIAG_REMAPPED(Z2, X_MIN)
|
||||
#define Z2_USE_ENDSTOP _XMIN_
|
||||
#elif DIAG_REMAPPED(Z2, Y_MIN)
|
||||
#define Z2_USE_ENDSTOP _YMIN_
|
||||
#elif DIAG_REMAPPED(Z2, Z_MIN)
|
||||
#define Z2_USE_ENDSTOP _ZMIN_
|
||||
#elif DIAG_REMAPPED(Z2, X_MAX)
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#elif DIAG_REMAPPED(Z2, Y_MAX)
|
||||
#define Z2_USE_ENDSTOP _YMAX_
|
||||
#elif DIAG_REMAPPED(Z2, Z_MAX)
|
||||
#define Z2_USE_ENDSTOP _ZMAX_
|
||||
#else
|
||||
#define _Z2_USE_ENDSTOP(P) _E##P##_DIAG_
|
||||
#define Z2_USE_ENDSTOP _Z2_USE_ENDSTOP(Z2_E_INDEX)
|
||||
#endif
|
||||
#undef Z2_DIAG_PIN
|
||||
#endif
|
||||
#define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
|
||||
#else
|
||||
#define Z3_E_INDEX Z2_E_INDEX
|
||||
#endif
|
||||
|
||||
#ifndef Z2_CS_PIN
|
||||
#define Z2_CS_PIN -1
|
||||
#endif
|
||||
#ifndef Z2_MS1_PIN
|
||||
#define Z2_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef Z2_MS2_PIN
|
||||
#define Z2_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef Z2_MS3_PIN
|
||||
#define Z2_MS3_PIN -1
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
#ifndef Z3_STEP_PIN
|
||||
#define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
|
||||
#define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
|
||||
#define Z3_ENABLE_PIN _EPIN(Z3_E_INDEX, ENABLE)
|
||||
#if Z3_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Z3_STEP)
|
||||
#error "No E stepper plug left for Z3!"
|
||||
#endif
|
||||
#endif
|
||||
#if AXIS_HAS_SPI(Z3)
|
||||
#ifndef Z3_CS_PIN
|
||||
#define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z3_MS1_PIN
|
||||
#define Z3_MS1_PIN _EPIN(Z3_E_INDEX, MS1)
|
||||
#endif
|
||||
#ifndef Z3_MS2_PIN
|
||||
#define Z3_MS2_PIN _EPIN(Z3_E_INDEX, MS2)
|
||||
#endif
|
||||
#ifndef Z3_MS3_PIN
|
||||
#define Z3_MS3_PIN _EPIN(Z3_E_INDEX, MS3)
|
||||
#endif
|
||||
#if AXIS_HAS_UART(Z3)
|
||||
#ifndef Z3_SERIAL_TX_PIN
|
||||
#define Z3_SERIAL_TX_PIN _EPIN(Z3_E_INDEX, SERIAL_TX)
|
||||
#endif
|
||||
#ifndef Z3_SERIAL_RX_PIN
|
||||
#define Z3_SERIAL_RX_PIN _EPIN(Z3_E_INDEX, SERIAL_RX)
|
||||
#endif
|
||||
#endif
|
||||
#if defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && _PEXI(Z3_E_INDEX, DIAG)
|
||||
#define Z3_DIAG_PIN _EPIN(Z3_E_INDEX, DIAG)
|
||||
#if DIAG_REMAPPED(Z3, X_MIN)
|
||||
#define Z3_USE_ENDSTOP _XMIN_
|
||||
#elif DIAG_REMAPPED(Z3, Y_MIN)
|
||||
#define Z3_USE_ENDSTOP _YMIN_
|
||||
#elif DIAG_REMAPPED(Z3, Z_MIN)
|
||||
#define Z3_USE_ENDSTOP _ZMIN_
|
||||
#elif DIAG_REMAPPED(Z3, X_MAX)
|
||||
#define Z3_USE_ENDSTOP _XMAX_
|
||||
#elif DIAG_REMAPPED(Z3, Y_MAX)
|
||||
#define Z3_USE_ENDSTOP _YMAX_
|
||||
#elif DIAG_REMAPPED(Z3, Z_MAX)
|
||||
#define Z3_USE_ENDSTOP _ZMAX_
|
||||
#else
|
||||
#define _Z3_USE_ENDSTOP(P) _E##P##_DIAG_
|
||||
#define Z3_USE_ENDSTOP _Z3_USE_ENDSTOP(Z3_E_INDEX)
|
||||
#endif
|
||||
#undef Z3_DIAG_PIN
|
||||
#endif
|
||||
#define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
|
||||
#endif
|
||||
|
||||
#ifndef Z3_CS_PIN
|
||||
#define Z3_CS_PIN -1
|
||||
#endif
|
||||
#ifndef Z3_MS1_PIN
|
||||
#define Z3_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef Z3_MS2_PIN
|
||||
#define Z3_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef Z3_MS3_PIN
|
||||
#define Z3_MS3_PIN -1
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
#ifndef Z4_STEP_PIN
|
||||
#define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP)
|
||||
#define Z4_DIR_PIN _EPIN(Z4_E_INDEX, DIR)
|
||||
#define Z4_ENABLE_PIN _EPIN(Z4_E_INDEX, ENABLE)
|
||||
#if Z4_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Z4_STEP)
|
||||
#error "No E stepper plug left for Z4!"
|
||||
#endif
|
||||
#endif
|
||||
#if AXIS_HAS_SPI(Z4)
|
||||
#ifndef Z4_CS_PIN
|
||||
#define Z4_CS_PIN _EPIN(Z4_E_INDEX, CS)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z4_MS1_PIN
|
||||
#define Z4_MS1_PIN _EPIN(Z4_E_INDEX, MS1)
|
||||
#endif
|
||||
#ifndef Z4_MS2_PIN
|
||||
#define Z4_MS2_PIN _EPIN(Z4_E_INDEX, MS2)
|
||||
#endif
|
||||
#ifndef Z4_MS3_PIN
|
||||
#define Z4_MS3_PIN _EPIN(Z4_E_INDEX, MS3)
|
||||
#endif
|
||||
#if AXIS_HAS_UART(Z4)
|
||||
#ifndef Z4_SERIAL_TX_PIN
|
||||
#define Z4_SERIAL_TX_PIN _EPIN(Z4_E_INDEX, SERIAL_TX)
|
||||
#endif
|
||||
#ifndef Z4_SERIAL_RX_PIN
|
||||
#define Z4_SERIAL_RX_PIN _EPIN(Z4_E_INDEX, SERIAL_RX)
|
||||
#endif
|
||||
#endif
|
||||
#if defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && _PEXI(Z4_E_INDEX, DIAG)
|
||||
#define Z4_DIAG_PIN _EPIN(Z4_E_INDEX, DIAG)
|
||||
#if DIAG_REMAPPED(Z4, X_MIN)
|
||||
#define Z4_USE_ENDSTOP _XMIN_
|
||||
#elif DIAG_REMAPPED(Z4, Y_MIN)
|
||||
#define Z4_USE_ENDSTOP _YMIN_
|
||||
#elif DIAG_REMAPPED(Z4, Z_MIN)
|
||||
#define Z4_USE_ENDSTOP _ZMIN_
|
||||
#elif DIAG_REMAPPED(Z4, X_MAX)
|
||||
#define Z4_USE_ENDSTOP _XMAX_
|
||||
#elif DIAG_REMAPPED(Z4, Y_MAX)
|
||||
#define Z4_USE_ENDSTOP _YMAX_
|
||||
#elif DIAG_REMAPPED(Z4, Z_MAX)
|
||||
#define Z4_USE_ENDSTOP _ZMAX_
|
||||
#else
|
||||
#define _Z4_USE_ENDSTOP(P) _E##P##_DIAG_
|
||||
#define Z4_USE_ENDSTOP _Z4_USE_ENDSTOP(Z4_E_INDEX)
|
||||
#endif
|
||||
#undef Z4_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef Z4_CS_PIN
|
||||
#define Z4_CS_PIN -1
|
||||
#endif
|
||||
#ifndef Z4_MS1_PIN
|
||||
#define Z4_MS1_PIN -1
|
||||
#endif
|
||||
#ifndef Z4_MS2_PIN
|
||||
#define Z4_MS2_PIN -1
|
||||
#endif
|
||||
#ifndef Z4_MS3_PIN
|
||||
#define Z4_MS3_PIN -1
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
|
||||
#define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
|
||||
#endif
|
||||
#if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
|
||||
#define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
|
||||
#endif
|
||||
#if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
|
||||
#define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
|
||||
#endif
|
||||
#else
|
||||
#undef ST7920_DELAY_1
|
||||
#undef ST7920_DELAY_2
|
||||
#undef ST7920_DELAY_3
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
#endif
|
||||
|
||||
#if !NEED_CASE_LIGHT_PIN
|
||||
#undef CASE_LIGHT_PIN
|
||||
#endif
|
||||
|
||||
#undef HAS_FREE_AUX2_PINS
|
||||
#undef DIAG_REMAPPED
|
||||
@@ -0,0 +1,722 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// Prepare a list of protected pins for M42/M43
|
||||
//
|
||||
|
||||
#if PIN_EXISTS(X_MIN)
|
||||
#define _X_MIN X_MIN_PIN,
|
||||
#else
|
||||
#define _X_MIN
|
||||
#endif
|
||||
#if PIN_EXISTS(X_MAX)
|
||||
#define _X_MAX X_MAX_PIN,
|
||||
#else
|
||||
#define _X_MAX
|
||||
#endif
|
||||
#if PIN_EXISTS(X_CS) && AXIS_HAS_SPI(X)
|
||||
#define _X_CS X_CS_PIN,
|
||||
#else
|
||||
#define _X_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(X_MS1)
|
||||
#define _X_MS1 X_MS1_PIN,
|
||||
#else
|
||||
#define _X_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(X_MS2)
|
||||
#define _X_MS2 X_MS2_PIN,
|
||||
#else
|
||||
#define _X_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(X_MS3)
|
||||
#define _X_MS3 X_MS3_PIN,
|
||||
#else
|
||||
#define _X_MS3
|
||||
#endif
|
||||
#if PIN_EXISTS(X_ENABLE)
|
||||
#define _X_ENABLE_PIN X_ENABLE_PIN,
|
||||
#else
|
||||
#define _X_ENABLE_PIN
|
||||
#endif
|
||||
|
||||
#define _X_PINS X_STEP_PIN, X_DIR_PIN, _X_ENABLE_PIN _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS
|
||||
|
||||
#if PIN_EXISTS(Y_MIN)
|
||||
#define _Y_MIN Y_MIN_PIN,
|
||||
#else
|
||||
#define _Y_MIN
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_MAX)
|
||||
#define _Y_MAX Y_MAX_PIN,
|
||||
#else
|
||||
#define _Y_MAX
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_CS) && AXIS_HAS_SPI(Y)
|
||||
#define _Y_CS Y_CS_PIN,
|
||||
#else
|
||||
#define _Y_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_MS1)
|
||||
#define _Y_MS1 Y_MS1_PIN,
|
||||
#else
|
||||
#define _Y_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_MS2)
|
||||
#define _Y_MS2 Y_MS2_PIN,
|
||||
#else
|
||||
#define _Y_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_MS3)
|
||||
#define _Y_MS3 Y_MS3_PIN,
|
||||
#else
|
||||
#define _Y_MS3
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_ENABLE)
|
||||
#define _Y_ENABLE_PIN Y_ENABLE_PIN,
|
||||
#else
|
||||
#define _Y_ENABLE_PIN
|
||||
#endif
|
||||
|
||||
#define _Y_PINS Y_STEP_PIN, Y_DIR_PIN, _Y_ENABLE_PIN _Y_MIN _Y_MAX _Y_MS1 _Y_MS2 _Y_MS3 _Y_CS
|
||||
|
||||
#if PIN_EXISTS(Z_MIN)
|
||||
#define _Z_MIN Z_MIN_PIN,
|
||||
#else
|
||||
#define _Z_MIN
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MAX)
|
||||
#define _Z_MAX Z_MAX_PIN,
|
||||
#else
|
||||
#define _Z_MAX
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_CS) && AXIS_HAS_SPI(Z)
|
||||
#define _Z_CS Z_CS_PIN,
|
||||
#else
|
||||
#define _Z_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MS1)
|
||||
#define _Z_MS1 Z_MS1_PIN,
|
||||
#else
|
||||
#define _Z_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MS2)
|
||||
#define _Z_MS2 Z_MS2_PIN,
|
||||
#else
|
||||
#define _Z_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MS3)
|
||||
#define _Z_MS3 Z_MS3_PIN,
|
||||
#else
|
||||
#define _Z_MS3
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_ENABLE)
|
||||
#define _Z_ENABLE_PIN Z_ENABLE_PIN,
|
||||
#else
|
||||
#define _Z_ENABLE_PIN
|
||||
#endif
|
||||
|
||||
#define _Z_PINS Z_STEP_PIN, Z_DIR_PIN, _Z_ENABLE_PIN _Z_MIN _Z_MAX _Z_MS1 _Z_MS2 _Z_MS3 _Z_CS
|
||||
|
||||
//
|
||||
// Extruder Chip Select, Digital Micro-steps
|
||||
//
|
||||
|
||||
// Mixing stepper, Switching stepper, or regular stepper
|
||||
#define E_NEEDED(N) (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > N) \
|
||||
|| (ENABLED(SWITCHING_EXTRUDER) && E_STEPPERS > N) \
|
||||
|| (NONE(SWITCHING_EXTRUDER, MIXING_EXTRUDER) && EXTRUDERS > N)
|
||||
|
||||
#define _E0_CS
|
||||
#define _E0_MS1
|
||||
#define _E0_MS2
|
||||
#define _E0_MS3
|
||||
|
||||
#if E_NEEDED(0)
|
||||
#if PIN_EXISTS(E0_CS) && AXIS_HAS_SPI(E0)
|
||||
#undef _E0_CS
|
||||
#define _E0_CS E0_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E0_MS1)
|
||||
#undef _E0_MS1
|
||||
#define _E0_MS1 E0_MS1_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E0_MS2)
|
||||
#undef _E0_MS2
|
||||
#define _E0_MS2 E0_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E0_MS3)
|
||||
#undef _E0_MS3
|
||||
#define _E0_MS3 E0_MS3_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E1_CS
|
||||
#define _E1_MS1
|
||||
#define _E1_MS2
|
||||
#define _E1_MS3
|
||||
|
||||
#if E_NEEDED(1)
|
||||
#if PIN_EXISTS(E1_CS) && AXIS_HAS_SPI(E1)
|
||||
#undef _E1_CS
|
||||
#define _E1_CS E1_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E1_MS1)
|
||||
#undef _E1_MS1
|
||||
#define _E1_MS1 E1_MS1_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E1_MS2)
|
||||
#undef _E1_MS2
|
||||
#define _E1_MS2 E1_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E1_MS3)
|
||||
#undef _E1_MS3
|
||||
#define _E1_MS3 E1_MS3_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E2_CS
|
||||
#define _E2_MS1
|
||||
#define _E2_MS2
|
||||
#define _E2_MS3
|
||||
|
||||
#if E_NEEDED(2)
|
||||
#if PIN_EXISTS(E2_CS) && AXIS_HAS_SPI(E2)
|
||||
#undef _E2_CS
|
||||
#define _E2_CS E2_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E2_MS1)
|
||||
#undef _E2_MS1
|
||||
#define _E2_MS1 E2_MS1_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E2_MS2)
|
||||
#undef _E2_MS2
|
||||
#define _E2_MS2 E2_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E2_MS3)
|
||||
#undef _E2_MS3
|
||||
#define _E2_MS3 E2_MS3_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E3_CS
|
||||
#define _E3_MS1
|
||||
#define _E3_MS2
|
||||
#define _E3_MS3
|
||||
|
||||
#if E_NEEDED(3)
|
||||
#if PIN_EXISTS(E3_CS) && AXIS_HAS_SPI(E3)
|
||||
#undef _E3_CS
|
||||
#define _E3_CS E3_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E3_MS1)
|
||||
#undef _E3_MS1
|
||||
#define _E3_MS1 E3_MS1_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E3_MS2)
|
||||
#undef _E3_MS2
|
||||
#define _E3_MS2 E3_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E3_MS3)
|
||||
#undef _E3_MS3
|
||||
#define _E3_MS3 E3_MS3_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E4_CS
|
||||
#define _E4_MS1
|
||||
#define _E4_MS2
|
||||
#define _E4_MS3
|
||||
|
||||
#if E_NEEDED(4)
|
||||
#if PIN_EXISTS(E4_CS) && AXIS_HAS_SPI(E4)
|
||||
#undef _E4_CS
|
||||
#define _E4_CS E4_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E4_MS1)
|
||||
#undef _E4_MS1
|
||||
#define _E4_MS1 E4_MS1_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E4_MS2)
|
||||
#undef _E4_MS2
|
||||
#define _E4_MS2 E4_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E4_MS3)
|
||||
#undef _E4_MS3
|
||||
#define _E4_MS3 E4_MS3_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E5_CS
|
||||
#define _E5_MS1
|
||||
#define _E5_MS2
|
||||
#define _E5_MS3
|
||||
|
||||
#if E_NEEDED(5)
|
||||
#if PIN_EXISTS(E5_CS) && AXIS_HAS_SPI(E5)
|
||||
#undef _E5_CS
|
||||
#define _E5_CS E5_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E5_MS1)
|
||||
#undef _E5_MS1
|
||||
#define _E5_MS1 E5_MS1_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E5_MS2)
|
||||
#undef _E5_MS2
|
||||
#define _E5_MS2 E5_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E5_MS3)
|
||||
#undef _E5_MS3
|
||||
#define _E5_MS3 E5_MS3_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E6_CS
|
||||
#define _E6_MS1
|
||||
#define _E6_MS2
|
||||
#define _E6_MS3
|
||||
|
||||
#if E_NEEDED(6)
|
||||
#if PIN_EXISTS(E6_CS) && AXIS_HAS_SPI(E6)
|
||||
#undef _E6_CS
|
||||
#define _E6_CS E6_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E6_MS2)
|
||||
#undef _E6_MS2
|
||||
#define _E6_MS2 E6_MS2_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E6_MS3)
|
||||
#undef _E6_MS3
|
||||
#define _E6_MS3 E6_MS3_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E6_MS4)
|
||||
#undef _E6_MS4
|
||||
#define _E6_MS4 E6_MS4_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _E7_CS
|
||||
#define _E7_MS1
|
||||
#define _E7_MS2
|
||||
#define _E7_MS3
|
||||
|
||||
#if E_NEEDED(7)
|
||||
#if PIN_EXISTS(E7_CS) && AXIS_HAS_SPI(E7)
|
||||
#undef _E7_CS
|
||||
#define _E7_CS E7_CS_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E7_MS3)
|
||||
#undef _E7_MS3
|
||||
#define _E7_MS3 E7_MS3_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E7_MS4)
|
||||
#undef _E7_MS4
|
||||
#define _E7_MS4 E7_MS4_PIN,
|
||||
#endif
|
||||
#if PIN_EXISTS(E7_MS5)
|
||||
#undef _E7_MS5
|
||||
#define _E7_MS5 E7_MS5_PIN,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// E Steppers
|
||||
//
|
||||
|
||||
#define _E0_PINS
|
||||
#define _E1_PINS
|
||||
#define _E2_PINS
|
||||
#define _E3_PINS
|
||||
#define _E4_PINS
|
||||
#define _E5_PINS
|
||||
#define _E6_PINS
|
||||
#define _E7_PINS
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
#undef _E0_PINS
|
||||
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, _E0_CS _E0_MS1 _E0_MS2 _E0_MS3
|
||||
#endif
|
||||
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
// Tools 0 and 1 use E0
|
||||
#if EXTRUDERS > 2 // Tools 2 and 3 use E1
|
||||
#undef _E1_PINS
|
||||
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3
|
||||
#if EXTRUDERS > 4 // Tools 4 and 5 use E2
|
||||
#undef _E2_PINS
|
||||
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, _E2_CS _E2_MS1 _E2_MS2 _E2_MS3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER)
|
||||
|
||||
#undef _E1_PINS
|
||||
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3
|
||||
#if EXTRUDERS > 2 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 2)
|
||||
#undef _E2_PINS
|
||||
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, _E2_CS _E2_MS1 _E2_MS2 _E2_MS3
|
||||
#if EXTRUDERS > 3 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 3)
|
||||
#undef _E3_PINS
|
||||
#define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, _E3_CS _E3_MS1 _E3_MS2 _E3_MS3
|
||||
#if EXTRUDERS > 4 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 4)
|
||||
#undef _E4_PINS
|
||||
#define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN, _E4_CS _E4_MS1 _E4_MS2 _E4_MS3
|
||||
#if EXTRUDERS > 5 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 5)
|
||||
#undef _E5_PINS
|
||||
#define _E5_PINS E5_STEP_PIN, E5_DIR_PIN, E5_ENABLE_PIN, _E5_CS _E5_MS1 _E5_MS2 _E5_MS3
|
||||
#if EXTRUDERS > 6 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 6)
|
||||
#undef _E6_PINS
|
||||
#define _E6_PINS E6_STEP_PIN, E6_DIR_PIN, E6_ENABLE_PIN, _E6_CS _E6_MS1 _E6_MS2 _E6_MS3
|
||||
#if EXTRUDERS > 7 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 7)
|
||||
#undef _E7_PINS
|
||||
#define _E7_PINS E7_STEP_PIN, E7_DIR_PIN, E7_ENABLE_PIN, _E7_CS _E7_MS1 _E7_MS2 _E7_MS3
|
||||
#endif // EXTRUDERS > 7 || MIXING_EXTRUDER > 7
|
||||
#endif // EXTRUDERS > 6 || MIXING_EXTRUDER > 6
|
||||
#endif // EXTRUDERS > 5 || MIXING_EXTRUDER > 5
|
||||
#endif // EXTRUDERS > 4 || MIXING_EXTRUDER > 4
|
||||
#endif // EXTRUDERS > 3 || MIXING_EXTRUDER > 3
|
||||
#endif // EXTRUDERS > 2 || MIXING_EXTRUDER > 2
|
||||
|
||||
#endif // HAS_MULTI_EXTRUDER || MIXING_EXTRUDER
|
||||
|
||||
//
|
||||
// Heaters, Fans, Temp Sensors
|
||||
//
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E1_AUTO_FAN_PIN
|
||||
#define E1_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E2_AUTO_FAN_PIN
|
||||
#define E2_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E3_AUTO_FAN_PIN
|
||||
#define E3_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E4_AUTO_FAN_PIN
|
||||
#define E4_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E5_AUTO_FAN_PIN
|
||||
#define E5_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E6_AUTO_FAN_PIN
|
||||
#define E6_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#ifndef E7_AUTO_FAN_PIN
|
||||
#define E7_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
|
||||
#define _H0_PINS
|
||||
#define _H1_PINS
|
||||
#define _H2_PINS
|
||||
#define _H3_PINS
|
||||
#define _H4_PINS
|
||||
#define _H5_PINS
|
||||
#define _H6_PINS
|
||||
#define _H7_PINS
|
||||
|
||||
#if HAS_HOTEND
|
||||
#undef _H0_PINS
|
||||
#define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN),
|
||||
#if HAS_MULTI_HOTEND
|
||||
#undef _H1_PINS
|
||||
#define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN),
|
||||
#if HOTENDS > 2
|
||||
#undef _H2_PINS
|
||||
#define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_2_PIN),
|
||||
#if HOTENDS > 3
|
||||
#undef _H3_PINS
|
||||
#define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_3_PIN),
|
||||
#if HOTENDS > 4
|
||||
#undef _H4_PINS
|
||||
#define _H4_PINS HEATER_4_PIN, E4_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_4_PIN),
|
||||
#if HOTENDS > 5
|
||||
#undef _H5_PINS
|
||||
#define _H5_PINS HEATER_5_PIN, E5_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_5_PIN),
|
||||
#if HOTENDS > 6
|
||||
#undef _H6_PINS
|
||||
#define _H6_PINS HEATER_6_PIN, E6_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_6_PIN),
|
||||
#if HOTENDS > 7
|
||||
#undef _H7_PINS
|
||||
#define _H7_PINS HEATER_7_PIN, E7_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_7_PIN),
|
||||
#endif // HOTENDS > 7
|
||||
#endif // HOTENDS > 6
|
||||
#endif // HOTENDS > 5
|
||||
#endif // HOTENDS > 4
|
||||
#endif // HOTENDS > 3
|
||||
#endif // HOTENDS > 2
|
||||
#endif // HAS_MULTI_HOTEND
|
||||
#endif // HOTENDS
|
||||
|
||||
//
|
||||
// Dual X, Dual Y, Multi-Z
|
||||
// Chip Select and Digital Micro-stepping
|
||||
//
|
||||
|
||||
#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
|
||||
#if PIN_EXISTS(X2_CS) && AXIS_HAS_SPI(X2)
|
||||
#define _X2_CS X2_CS_PIN,
|
||||
#else
|
||||
#define _X2_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(X2_MS1)
|
||||
#define _X2_MS1 X2_MS1_PIN,
|
||||
#else
|
||||
#define _X2_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(X2_MS2)
|
||||
#define _X2_MS2 X2_MS2_PIN,
|
||||
#else
|
||||
#define _X2_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(X2_MS3)
|
||||
#define _X2_MS3 X2_MS3_PIN,
|
||||
#else
|
||||
#define _X2_MS3
|
||||
#endif
|
||||
#define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN, _X2_CS _X2_MS1 _X2_MS2 _X2_MS3
|
||||
#else
|
||||
#define _X2_PINS
|
||||
#endif
|
||||
|
||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
||||
#if PIN_EXISTS(Y2_CS) && AXIS_HAS_SPI(Y2)
|
||||
#define _Y2_CS Y2_CS_PIN,
|
||||
#else
|
||||
#define _Y2_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(Y2_MS1)
|
||||
#define _Y2_MS1 Y2_MS1_PIN,
|
||||
#else
|
||||
#define _Y2_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(Y2_MS2)
|
||||
#define _Y2_MS2 Y2_MS2_PIN,
|
||||
#else
|
||||
#define _Y2_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(Y2_MS3)
|
||||
#define _Y2_MS3 Y2_MS3_PIN,
|
||||
#else
|
||||
#define _Y2_MS3
|
||||
#endif
|
||||
#define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN, _Y2_CS _Y2_MS1 _Y2_MS2 _Y2_MS3
|
||||
#else
|
||||
#define _Y2_PINS
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
||||
#if PIN_EXISTS(Z2_CS) && AXIS_HAS_SPI(Z2)
|
||||
#define _Z2_CS Z2_CS_PIN,
|
||||
#else
|
||||
#define _Z2_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(Z2_MS1)
|
||||
#define _Z2_MS1 Z2_MS1_PIN,
|
||||
#else
|
||||
#define _Z2_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(Z2_MS2)
|
||||
#define _Z2_MS2 Z2_MS2_PIN,
|
||||
#else
|
||||
#define _Z2_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(Z2_MS3)
|
||||
#define _Z2_MS3 Z2_MS3_PIN,
|
||||
#else
|
||||
#define _Z2_MS3
|
||||
#endif
|
||||
#define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN, _Z2_CS _Z2_MS1 _Z2_MS2 _Z2_MS3
|
||||
#else
|
||||
#define _Z2_PINS
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
#if PIN_EXISTS(Z3_CS) && AXIS_HAS_SPI(Z3)
|
||||
#define _Z3_CS Z3_CS_PIN,
|
||||
#else
|
||||
#define _Z3_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(Z3_MS1)
|
||||
#define _Z3_MS1 Z3_MS1_PIN,
|
||||
#else
|
||||
#define _Z3_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(Z3_MS2)
|
||||
#define _Z3_MS2 Z3_MS2_PIN,
|
||||
#else
|
||||
#define _Z3_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(Z3_MS3)
|
||||
#define _Z3_MS3 Z3_MS3_PIN,
|
||||
#else
|
||||
#define _Z3_MS3
|
||||
#endif
|
||||
#define _Z3_PINS Z3_STEP_PIN, Z3_DIR_PIN, Z3_ENABLE_PIN, _Z3_CS _Z3_MS1 _Z3_MS2 _Z3_MS3
|
||||
#else
|
||||
#define _Z3_PINS
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
#if PIN_EXISTS(Z4_CS) && AXIS_HAS_SPI(Z4)
|
||||
#define _Z4_CS Z4_CS_PIN,
|
||||
#else
|
||||
#define _Z4_CS
|
||||
#endif
|
||||
#if PIN_EXISTS(Z4_MS1)
|
||||
#define _Z4_MS1 Z4_MS1_PIN,
|
||||
#else
|
||||
#define _Z4_MS1
|
||||
#endif
|
||||
#if PIN_EXISTS(Z4_MS2)
|
||||
#define _Z4_MS2 Z4_MS2_PIN,
|
||||
#else
|
||||
#define _Z4_MS2
|
||||
#endif
|
||||
#if PIN_EXISTS(Z4_MS3)
|
||||
#define _Z4_MS3 Z4_MS3_PIN,
|
||||
#else
|
||||
#define _Z4_MS3
|
||||
#endif
|
||||
#define _Z4_PINS Z4_STEP_PIN, Z4_DIR_PIN, Z4_ENABLE_PIN, _Z4_CS _Z4_MS1 _Z4_MS2 _Z4_MS3
|
||||
#else
|
||||
#define _Z4_PINS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Generate the final Sensitive Pins array,
|
||||
// keeping the array as small as possible.
|
||||
//
|
||||
|
||||
#if PIN_EXISTS(PS_ON)
|
||||
#define _PS_ON PS_ON_PIN,
|
||||
#else
|
||||
#define _PS_ON
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE)
|
||||
#define _Z_PROBE Z_MIN_PROBE_PIN,
|
||||
#else
|
||||
#define _Z_PROBE
|
||||
#endif
|
||||
|
||||
#if PIN_EXISTS(FAN)
|
||||
#define _FAN0 FAN_PIN,
|
||||
#else
|
||||
#define _FAN0
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN1)
|
||||
#define _FAN1 FAN1_PIN,
|
||||
#else
|
||||
#define _FAN1
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN2)
|
||||
#define _FAN2 FAN2_PIN,
|
||||
#else
|
||||
#define _FAN2
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN3)
|
||||
#define _FAN3 FAN3_PIN,
|
||||
#else
|
||||
#define _FAN3
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN4)
|
||||
#define _FAN4 FAN4_PIN,
|
||||
#else
|
||||
#define _FAN4
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN5)
|
||||
#define _FAN5 FAN5_PIN,
|
||||
#else
|
||||
#define _FAN5
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN6)
|
||||
#define _FAN6 FAN6_PIN,
|
||||
#else
|
||||
#define _FAN6
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN7)
|
||||
#define _FAN7 FAN7_PIN,
|
||||
#else
|
||||
#define _FAN7
|
||||
#endif
|
||||
#if PIN_EXISTS(CONTROLLER_FAN)
|
||||
#define _FANC CONTROLLER_FAN_PIN,
|
||||
#else
|
||||
#define _FANC
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_BED && PINS_EXIST(TEMP_BED, HEATER_BED)
|
||||
#define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN),
|
||||
#else
|
||||
#define _BED_PINS
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_CHAMBER && PIN_EXISTS(TEMP_CHAMBER)
|
||||
#define _CHAMBER_TEMP analogInputToDigitalPin(TEMP_CHAMBER_PIN),
|
||||
#else
|
||||
#define _CHAMBER_TEMP
|
||||
#endif
|
||||
#if TEMP_SENSOR_CHAMBER && PINS_EXIST(TEMP_CHAMBER, HEATER_CHAMBER)
|
||||
#define _CHAMBER_HEATER HEATER_CHAMBER_PIN,
|
||||
#else
|
||||
#define _CHAMBER_HEATER
|
||||
#endif
|
||||
#if TEMP_SENSOR_CHAMBER && PINS_EXIST(TEMP_CHAMBER, CHAMBER_AUTO_FAN)
|
||||
#define _CHAMBER_FAN CHAMBER_AUTO_FAN_PIN,
|
||||
#else
|
||||
#define _CHAMBER_FAN
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_COOLER && PIN_EXISTS(TEMP_COOLER)
|
||||
#define _COOLER_TEMP analogInputToDigitalPin(TEMP_COOLER_PIN),
|
||||
#else
|
||||
#define _COOLER_TEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_COOLER && PIN_EXISTS(COOLER)
|
||||
#define _COOLER COOLER_PIN,
|
||||
#else
|
||||
#define _COOLER
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_COOLER && PINS_EXIST(TEMP_COOLER, COOLER_AUTO_FAN)
|
||||
#define _COOLER_FAN COOLER_AUTO_FAN_PIN,
|
||||
#else
|
||||
#define _COOLER_FAN
|
||||
#endif
|
||||
|
||||
#ifndef HAL_SENSITIVE_PINS
|
||||
#define HAL_SENSITIVE_PINS
|
||||
#endif
|
||||
|
||||
#define SENSITIVE_PINS { \
|
||||
_X_PINS _Y_PINS _Z_PINS _X2_PINS _Y2_PINS _Z2_PINS _Z3_PINS _Z4_PINS _Z_PROBE \
|
||||
_E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS _E5_PINS _E6_PINS _E7_PINS \
|
||||
_H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS _H5_PINS _H6_PINS _H7_PINS \
|
||||
_PS_ON _FAN0 _FAN1 _FAN2 _FAN3 _FAN4 _FAN5 _FAN6 _FAN7 _FANC \
|
||||
_BED_PINS _COOLER _CHAMBER_TEMP _CHAMBER_HEATER _CHAMBER_FAN HAL_SENSITIVE_PINS \
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(STM32F0xx)
|
||||
#error "Oops! Select an STM32F0 board in your IDE."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "Malyan M200 V2"
|
||||
|
||||
#include "../stm32f1/pins_MALYAN_M200.h"
|
||||
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(__STM32F1__, STM32F1xx, STM32F0xx)
|
||||
#error "Oops! Select a 'Malyan M300' board in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "Malyan M300"
|
||||
|
||||
//
|
||||
// EEPROM Emulation
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#ifndef MARLIN_EEPROM_SIZE
|
||||
#define MARLIN_EEPROM_SIZE 0x800U // 2KB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD CARD SPI
|
||||
//
|
||||
#define SDSS SD_SS_PIN
|
||||
|
||||
//
|
||||
// Timers
|
||||
//
|
||||
#define STEP_TIMER 6
|
||||
#define TEMP_TIMER 7
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_MAX_PIN PC13
|
||||
#define Y_MAX_PIN PC14
|
||||
#define Z_MAX_PIN PC15
|
||||
#define Z_MIN_PIN PB7
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PB14
|
||||
#define X_DIR_PIN PB13
|
||||
#define X_ENABLE_PIN PB10
|
||||
|
||||
#define Y_STEP_PIN PB12
|
||||
#define Y_DIR_PIN PB11
|
||||
#define Y_ENABLE_PIN PB10
|
||||
|
||||
#define Z_STEP_PIN PB2
|
||||
#define Z_DIR_PIN PB1
|
||||
#define Z_ENABLE_PIN PB10
|
||||
|
||||
#define E0_STEP_PIN PA7
|
||||
#define E0_DIR_PIN PA6
|
||||
#define E0_ENABLE_PIN PB0
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA0 // Analog Input (HOTEND0 thermistor)
|
||||
#define TEMP_BED_PIN PA4 // Analog Input (BED thermistor)
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA1 // HOTEND0 MOSFET
|
||||
#define HEATER_BED_PIN PA5 // BED MOSFET
|
||||
|
||||
#define AUTO_FAN_PIN PA8
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(__STM32F1__)
|
||||
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
|
||||
#endif
|
||||
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
/**
|
||||
* 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_WIRED_LCD
|
||||
|
||||
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
#error "REPRAPWORLD_GRAPHICAL_LCD is not supported."
|
||||
#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 !IS_NEWPANEL
|
||||
#error "Non-NEWPANEL LCD is not supported."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IS_NEWPANEL
|
||||
#if IS_RRD_SC
|
||||
#error "RRD Smart Controller is not supported."
|
||||
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
#error "REPRAPWORLD_GRAPHICAL_LCD is not supported."
|
||||
#elif ENABLED(LCD_I2C_PANELOLU2)
|
||||
#error "LCD_I2C_PANELOLU2 is not supported."
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
#error "LCD_I2C_VIKI is not supported."
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
#error "VIKI2 / miniVIKI is not supported."
|
||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#error "ELB_FULL_GRAPHIC_CONTROLLER is not supported."
|
||||
#elif ENABLED(MINIPANEL)
|
||||
#error "MINIPANEL is not supported."
|
||||
#else
|
||||
#error "Other generic NEWPANEL LCD is not supported."
|
||||
#endif
|
||||
#endif // IS_NEWPANEL
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality S1 (STM32F103RET6) board pin assignments
|
||||
*/
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Creality S1 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "CR-FDM-V24S1-301"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "Ender 3 S1"
|
||||
#endif
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
//#if NO_EEPROM_SELECTED
|
||||
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
//#endif
|
||||
|
||||
#if ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PA11
|
||||
#define IIC_EEPROM_SCL PA12
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
||||
#elif ENABLED(SDCARD_EEPROM_EMULATION)
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PA5
|
||||
#define Y_STOP_PIN PA6
|
||||
#ifdef BLTOUCH
|
||||
#define Z_STOP_PIN PC14 // BLTouch IN PIN 原理图TOUCH的管脚已经变-----zy
|
||||
#define SERVO0_PIN PC13 // BLTouch PWM-OUT PIN 原理图TOUCH的管脚已经变-----zy
|
||||
#define Z_STOP_PIN_NADD PA15 //Added z-axis limit switch rock_20210816
|
||||
#else
|
||||
#define Z_STOP_PIN PA15 //Z轴限位开关
|
||||
// #define Z_STOP_PIN ONE
|
||||
#endif
|
||||
|
||||
//#define one (c14 || a15)
|
||||
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PC14 // BLTouch IN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PC15 // "Pulled-high"
|
||||
#endif
|
||||
|
||||
#define HAS_CHECKFILAMENT
|
||||
/* CHECKFILAMENT */
|
||||
#if ENABLED(HAS_CHECKFILAMENT)
|
||||
#define CHECKFILAMENT_PIN PC15
|
||||
#endif
|
||||
|
||||
//Backpower
|
||||
#ifndef BACKPOWER_CTRL_PIN
|
||||
#define BACKPOWER_CTRL_PIN PA4 //上电拉低,当ADC检测到24V供电低于20V时,先保存续打数据,然后PA4=1。 //---------zy
|
||||
#endif
|
||||
|
||||
#ifndef CHECK_24V_PIN
|
||||
#define POWER_DETECTION_PIN PB0 //检测24V电源的ADC输入脚
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC3
|
||||
#ifndef X_STEP_PIN
|
||||
#define X_STEP_PIN PC2
|
||||
#endif
|
||||
#ifndef X_DIR_PIN
|
||||
#define X_DIR_PIN PB9
|
||||
#endif
|
||||
|
||||
#define Y_ENABLE_PIN PC3
|
||||
#ifndef Y_STEP_PIN
|
||||
#define Y_STEP_PIN PB8
|
||||
#endif
|
||||
#ifndef Y_DIR_PIN
|
||||
#define Y_DIR_PIN PB7
|
||||
#endif
|
||||
|
||||
#define Z_ENABLE_PIN PC3
|
||||
#ifndef Z_STEP_PIN
|
||||
#define Z_STEP_PIN PB6
|
||||
#endif
|
||||
#ifndef Z_DIR_PIN
|
||||
#define Z_DIR_PIN PB5
|
||||
#endif
|
||||
|
||||
#define E0_ENABLE_PIN PC3
|
||||
#ifndef E0_STEP_PIN
|
||||
#define E0_STEP_PIN PB4
|
||||
#endif
|
||||
#ifndef E0_DIR_PIN
|
||||
#define E0_DIR_PIN PB3
|
||||
#endif
|
||||
|
||||
//
|
||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||
//
|
||||
#define DISABLE_DEBUG
|
||||
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC5 // TH1
|
||||
#define TEMP_BED_PIN PC4 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA1 // HEATER1
|
||||
#define HEATER_BED_PIN PA7 //PA15 // HOT BED
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PA0 // FAN
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN)
|
||||
#define FAN_SOFT_PWM
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
|
||||
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
|
||||
#endif
|
||||
|
||||
#if ENABLED(RET6_12864_LCD)
|
||||
|
||||
// RET6 12864 LCD
|
||||
#define LCD_PINS_RS PB12
|
||||
#define LCD_PINS_ENABLE PB15
|
||||
#define LCD_PINS_D4 PB13
|
||||
|
||||
#define BTN_ENC PB2
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PB14
|
||||
|
||||
#ifndef HAS_PIN_27_BOARD
|
||||
#define BEEPER_PIN PC6
|
||||
#endif
|
||||
|
||||
#elif ENABLED(VET6_12864_LCD)
|
||||
|
||||
// VET6 12864 LCD
|
||||
#define LCD_PINS_RS PA4
|
||||
//#define LCD_PINS_ENABLE PA7
|
||||
#define LCD_PINS_D4 PA5
|
||||
|
||||
#define BTN_ENC PC5
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PA6
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
|
||||
// RET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PB14
|
||||
#define BTN_EN1 PB15
|
||||
#define BTN_EN2 PB12
|
||||
|
||||
//#define LCD_LED_PIN PB2
|
||||
#ifndef BEEPER_PIN
|
||||
#define BEEPER_PIN PB13
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
|
||||
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
|
||||
|
||||
// VET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PA6
|
||||
//#define BTN_EN1 PA7
|
||||
#define BTN_EN2 PA4
|
||||
|
||||
#define BEEPER_PIN PA5
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// M3/M4/M5 - Spindle/Laser Control
|
||||
//
|
||||
#if HAS_CUTTER
|
||||
// #undef HEATER_0_PIN
|
||||
// #undef HEATER_BED_PIN
|
||||
// #undef FAN_PIN
|
||||
// #define SPINDLE_LASER_ENA_PIN PC0 // FET 1
|
||||
// #define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
|
||||
// #define SPINDLE_DIR_PIN PC0 // FET 4
|
||||
#define SPINDLE_LASER_ENA_PIN PC0 // FET 1
|
||||
#define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
|
||||
#define SPINDLE_DIR_PIN PC0 // FET 4
|
||||
|
||||
#define LASER_SOFT_PWM_PIN PC0 //激光软PWM引脚
|
||||
#endif
|
||||
@@ -0,0 +1,261 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality V3 (GD303RET6) board pin assignments
|
||||
*/
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Creality V3 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "CR4NS200320C13"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "Ender 3 V3 SE"
|
||||
#endif
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
//#if NO_EEPROM_SELECTED
|
||||
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
|
||||
// #define SDCARD_EEPROM_EMULATION
|
||||
//#endif
|
||||
|
||||
#if ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PA7
|
||||
#define IIC_EEPROM_SCL PA8
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
||||
#elif ENABLED(SDCARD_EEPROM_EMULATION)
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PA5
|
||||
#define Y_STOP_PIN PA6
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
#define Z_STOP_PIN PC14 // BLTouch IN
|
||||
#define SERVO0_PIN PC13 // BLTouch OUT
|
||||
#elif ENABLED(PROBE_TARE)
|
||||
#define Z_STOP_PIN PC14
|
||||
#define PROBE_TARE_PIN PC13
|
||||
// #define PROBE_ACTIVATION_SWITCH_PIN PB2
|
||||
#else
|
||||
#define Z_STOP_PIN PA15
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PC15 // "Pulled-high"
|
||||
#endif
|
||||
|
||||
// Filament check pins
|
||||
#define HAS_CHECKFILAMENT
|
||||
#if ENABLED(HAS_CHECKFILAMENT)
|
||||
#define CHECKFILAMENT_PIN PC15
|
||||
#endif
|
||||
|
||||
// HX711 corresponding clock interface, this GPIO port do not parallel capacitor,
|
||||
// And should be as short wire as possible (if too long, use shield wire).
|
||||
#define HX711_SCK_PIN PA4
|
||||
// HX711 corresponding data interface, this GPIO port should not parallel capacitor,
|
||||
// And should be as short as possible wire (if too long, use shield wire).
|
||||
#define HX711_SDO_PIN PC6
|
||||
|
||||
#ifndef CHECK_24V_PIN
|
||||
#define POWER_DETECTION_PIN PB0 // Detect the ADC input pin of 24V power supply
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#ifndef X_STEP_PIN
|
||||
#define X_STEP_PIN PC2
|
||||
#endif
|
||||
#ifndef X_DIR_PIN
|
||||
#define X_DIR_PIN PB9
|
||||
#endif
|
||||
#define X_ENABLE_PIN PC3
|
||||
|
||||
#ifndef Y_STEP_PIN
|
||||
#define Y_STEP_PIN PB8
|
||||
#endif
|
||||
#ifndef Y_DIR_PIN
|
||||
#define Y_DIR_PIN PB7
|
||||
#endif
|
||||
#define Y_ENABLE_PIN PC3
|
||||
|
||||
#ifndef Z_STEP_PIN
|
||||
#define Z_STEP_PIN PB6
|
||||
#endif
|
||||
#ifndef Z_DIR_PIN
|
||||
#define Z_DIR_PIN PB5
|
||||
#endif
|
||||
#define Z_ENABLE_PIN PC3
|
||||
|
||||
#ifndef E0_STEP_PIN
|
||||
#define E0_STEP_PIN PB4
|
||||
#endif
|
||||
#ifndef E0_DIR_PIN
|
||||
#define E0_DIR_PIN PB3
|
||||
#endif
|
||||
#define E0_ENABLE_PIN PC3
|
||||
|
||||
#if HAS_TMC_UART
|
||||
|
||||
#define X_SERIAL_TX_PIN PB12
|
||||
#define X_SERIAL_RX_PIN PB12
|
||||
|
||||
//#define Y_SERIAL_TX_PIN X_SERIAL_TX_PIN
|
||||
//#define Y_SERIAL_RX_PIN X_SERIAL_RX_PIN
|
||||
#define Y_SERIAL_TX_PIN PB13
|
||||
#define Y_SERIAL_RX_PIN PB13
|
||||
|
||||
//#define Z_SERIAL_TX_PIN X_SERIAL_TX_PIN
|
||||
//#define Z_SERIAL_RX_PIN X_SERIAL_RX_PIN
|
||||
#define Z_SERIAL_TX_PIN PB14
|
||||
#define Z_SERIAL_RX_PIN PB14
|
||||
|
||||
//#define E0_SERIAL_TX_PIN X_SERIAL_TX_PIN
|
||||
//#define E0_SERIAL_RX_PIN X_SERIAL_RX_PIN
|
||||
#define E0_SERIAL_TX_PIN PB15
|
||||
#define E0_SERIAL_RX_PIN PB15
|
||||
|
||||
#define X_DIAG_PIN PB10
|
||||
#define Y_DIAG_PIN PB11
|
||||
//#define Z_DIAG_PIN PB14
|
||||
//#define E0_DIAG_PIN PB15
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200 // 9600
|
||||
#endif
|
||||
|
||||
// SPI 2
|
||||
// #define W25QXX_CS_PIN -1 // PB12
|
||||
// The current MOSI, MISO, SCK of HAL/STM32 are not defined by the following pins,
|
||||
// Needs to be in buildroot\share\PlatformIO\variants\CREALITY_F107\variant.h modification
|
||||
// #define W25QXX_MOSI_PIN PB15
|
||||
// #define W25QXX_MISO_PIN PB14
|
||||
// #define W25QXX_SCK_PIN -1 // PB13
|
||||
|
||||
//
|
||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||
//
|
||||
#define DISABLE_DEBUG
|
||||
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC5 // TH1
|
||||
#define TEMP_BED_PIN PC4 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA1 // HEATER1
|
||||
#define HEATER_BED_PIN PB2 // HOT BED
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PA0 // FAN
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN)
|
||||
#define FAN_SOFT_PWM
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
|
||||
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
|
||||
#endif
|
||||
|
||||
#if ENABLED(RET6_12864_LCD)
|
||||
|
||||
// RET6 12864 LCD
|
||||
#define LCD_PINS_RS PB12
|
||||
#define LCD_PINS_ENABLE PB15
|
||||
#define LCD_PINS_D4 PB13
|
||||
|
||||
#define BTN_ENC PB2
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PB14
|
||||
|
||||
#ifndef HAS_PIN_27_BOARD
|
||||
#define BEEPER_PIN PC6
|
||||
#endif
|
||||
|
||||
#elif ENABLED(VET6_12864_LCD)
|
||||
|
||||
// VET6 12864 LCD
|
||||
#define LCD_PINS_RS PA4
|
||||
//#define LCD_PINS_ENABLE PA7
|
||||
#define LCD_PINS_D4 PA5
|
||||
|
||||
#define BTN_ENC PC5
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PA6
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
|
||||
// RET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PB1
|
||||
#define BTN_EN1 PA11
|
||||
#define BTN_EN2 PA12
|
||||
|
||||
// //#define LCD_LED_PIN PB2
|
||||
// // #if ENABLED(SPEAKER)
|
||||
// #define BEEPER_PIN PB13
|
||||
// // #undef SPEAKER
|
||||
// // #endif
|
||||
|
||||
#ifndef BEEPER_PIN
|
||||
#define BEEPER_PIN PB0//PB13
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
|
||||
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
|
||||
|
||||
// VET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PA6
|
||||
//#define BTN_EN1 PA7
|
||||
#define BTN_EN2 PA4
|
||||
|
||||
#define BEEPER_PIN PA5
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,214 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality 4.2.x (STM32F103RET6) board pin assignments
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Creality V4 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "Creality V4"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "Ender 3 V3"
|
||||
#endif
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
#if ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PA11
|
||||
#define IIC_EEPROM_SCL PA12
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
||||
#elif ENABLED(SDCARD_EEPROM_EMULATION)
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
||||
#endif
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#ifndef SERVO0_PIN
|
||||
#ifndef HAS_PIN_27_BOARD
|
||||
#define SERVO0_PIN PB0 // BLTouch OUT
|
||||
#else
|
||||
#define SERVO0_PIN PC6
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PA5
|
||||
#define Y_STOP_PIN PA6
|
||||
#define Z_STOP_PIN PA7
|
||||
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PA4 // "Pulled-high"
|
||||
#endif
|
||||
|
||||
// Filament check pins
|
||||
#define HAS_CHECKFILAMENT
|
||||
#if ENABLED(HAS_CHECKFILAMENT)
|
||||
#define CHECKFILAMENT_PIN PA4
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC3
|
||||
#ifndef X_STEP_PIN
|
||||
#define X_STEP_PIN PC2
|
||||
#endif
|
||||
#ifndef X_DIR_PIN
|
||||
#define X_DIR_PIN PB9
|
||||
#endif
|
||||
|
||||
#define Y_ENABLE_PIN PC3
|
||||
#ifndef Y_STEP_PIN
|
||||
#define Y_STEP_PIN PB8
|
||||
#endif
|
||||
#ifndef Y_DIR_PIN
|
||||
#define Y_DIR_PIN PB7
|
||||
#endif
|
||||
|
||||
#define Z_ENABLE_PIN PC3
|
||||
#ifndef Z_STEP_PIN
|
||||
#define Z_STEP_PIN PB6
|
||||
#endif
|
||||
#ifndef Z_DIR_PIN
|
||||
#define Z_DIR_PIN PB5
|
||||
#endif
|
||||
|
||||
#define E0_ENABLE_PIN PC3
|
||||
#ifndef E0_STEP_PIN
|
||||
#define E0_STEP_PIN PB4
|
||||
#endif
|
||||
#ifndef E0_DIR_PIN
|
||||
#define E0_DIR_PIN PB3
|
||||
#endif
|
||||
|
||||
//
|
||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||
//
|
||||
#define DISABLE_DEBUG
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC5 // TH1
|
||||
#define TEMP_BED_PIN PC4 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA1 // HEATER1
|
||||
#define HEATER_BED_PIN PA2 // HOT BED
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PA0 // FAN
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN)
|
||||
#define FAN_SOFT_PWM
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
|
||||
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
|
||||
#endif
|
||||
|
||||
#if ENABLED(RET6_12864_LCD)
|
||||
|
||||
// RET6 12864 LCD
|
||||
#define LCD_PINS_RS PB12
|
||||
#define LCD_PINS_ENABLE PB15
|
||||
#define LCD_PINS_D4 PB13
|
||||
|
||||
#define BTN_ENC PB2
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PB14
|
||||
|
||||
#ifndef HAS_PIN_27_BOARD
|
||||
#define BEEPER_PIN PC6
|
||||
#endif
|
||||
|
||||
#elif ENABLED(VET6_12864_LCD)
|
||||
|
||||
// VET6 12864 LCD
|
||||
#define LCD_PINS_RS PA4
|
||||
#define LCD_PINS_ENABLE PA7
|
||||
#define LCD_PINS_D4 PA5
|
||||
|
||||
#define BTN_ENC PC5
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PA6
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
|
||||
// RET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PB14
|
||||
#define BTN_EN1 PB15
|
||||
#define BTN_EN2 PB12
|
||||
|
||||
//#define LCD_LED_PIN PB2
|
||||
#ifndef BEEPER_PIN
|
||||
#define BEEPER_PIN PB13
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
|
||||
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
|
||||
|
||||
// VET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PA6
|
||||
#define BTN_EN1 PA7
|
||||
#define BTN_EN2 PA4
|
||||
|
||||
#define BEEPER_PIN PA5
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,208 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* CREALITY 4.2.10 (STM32F103) board pin assignments
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "CREALITY supports up to 1 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "Creality V4.2.10"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "3DPrintMill"
|
||||
#endif
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
// FLASH
|
||||
//#define FLASH_EEPROM_EMULATION
|
||||
|
||||
// I2C
|
||||
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
|
||||
#if ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PA11
|
||||
#define IIC_EEPROM_SCL PA12
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
||||
#else
|
||||
#define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
||||
#endif
|
||||
|
||||
// SPI
|
||||
//#define SPI_EEPROM // EEPROM on SPI-0
|
||||
//#define SPI_CHAN_EEPROM1 ?
|
||||
//#define SPI_EEPROM1_CS ?
|
||||
|
||||
// 2K EEPROM
|
||||
//#define SPI_EEPROM2_CS ?
|
||||
|
||||
// 32Mb FLASH
|
||||
//#define SPI_FLASH_CS ?
|
||||
#endif
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PB0 // BLTouch OUT
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PA3
|
||||
#define Y_STOP_PIN PA7
|
||||
#define Z_STOP_PIN PA5
|
||||
|
||||
#define Z_MIN_PROBE_PIN PA5 // BLTouch IN
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PA6 // "Pulled-high"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC3
|
||||
#ifndef X_STEP_PIN
|
||||
#define X_STEP_PIN PC2
|
||||
#endif
|
||||
#ifndef X_DIR_PIN
|
||||
#define X_DIR_PIN PB9
|
||||
#endif
|
||||
|
||||
#define Y_ENABLE_PIN PC3
|
||||
#ifndef Y_STEP_PIN
|
||||
#define Y_STEP_PIN PB8
|
||||
#endif
|
||||
#ifndef Y_DIR_PIN
|
||||
#define Y_DIR_PIN PB7
|
||||
#endif
|
||||
|
||||
#define Z_ENABLE_PIN PC3
|
||||
#ifndef Z_STEP_PIN
|
||||
#define Z_STEP_PIN PB6
|
||||
#endif
|
||||
#ifndef Z_DIR_PIN
|
||||
#define Z_DIR_PIN PB5
|
||||
#endif
|
||||
|
||||
#define E0_ENABLE_PIN PC3
|
||||
#ifndef E0_STEP_PIN
|
||||
#define E0_STEP_PIN PB4
|
||||
#endif
|
||||
#ifndef E0_DIR_PIN
|
||||
#define E0_DIR_PIN PB3
|
||||
#endif
|
||||
|
||||
//
|
||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||
//
|
||||
#define DISABLE_DEBUG
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC5 // TH1
|
||||
#define TEMP_BED_PIN PC4 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA0 // HEATER1
|
||||
#define HEATER_BED_PIN PA1 // HOT BED
|
||||
|
||||
#define FAN_PIN PA2 // FAN
|
||||
#define FAN_SOFT_PWM
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
|
||||
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
|
||||
#endif
|
||||
|
||||
#if ENABLED(RET6_12864_LCD)
|
||||
|
||||
// RET6 12864 LCD
|
||||
#define LCD_PINS_RS PB12
|
||||
#define LCD_PINS_ENABLE PB15
|
||||
#define LCD_PINS_D4 PB13
|
||||
|
||||
#define BTN_ENC PB2
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PB14
|
||||
|
||||
#define BEEPER_PIN PC6
|
||||
|
||||
#elif ENABLED(VET6_12864_LCD)
|
||||
|
||||
// VET6 12864 LCD
|
||||
#define LCD_PINS_RS PA4
|
||||
#define LCD_PINS_ENABLE PA7
|
||||
#define LCD_PINS_D4 PA5
|
||||
|
||||
#define BTN_ENC PC5
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PA6
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
|
||||
// RET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PB14
|
||||
#define BTN_EN1 PB15
|
||||
#define BTN_EN2 PB12
|
||||
|
||||
//#define LCD_LED_PIN PB2
|
||||
#ifndef BEEPER_PIN
|
||||
#define BEEPER_PIN PB13
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
|
||||
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
|
||||
|
||||
// VET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PA6
|
||||
#define BTN_EN1 PA7
|
||||
#define BTN_EN2 PA4
|
||||
|
||||
#define BEEPER_PIN PA5
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* CREALITY v4.2.7 (STM32F103) board pin assignments
|
||||
*/
|
||||
|
||||
#define BOARD_INFO_NAME "Creality v4.2.7"
|
||||
#define DEFAULT_MACHINE_NAME "Creality3D"
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PB9
|
||||
#define X_DIR_PIN PC2
|
||||
#define Y_STEP_PIN PB7
|
||||
|
||||
#define Y_DIR_PIN PB8
|
||||
#define Z_STEP_PIN PB5
|
||||
#define Z_DIR_PIN PB6
|
||||
|
||||
#define E0_STEP_PIN PB3
|
||||
#define E0_DIR_PIN PB4
|
||||
|
||||
#include "pins_CREALITY_V4.h"
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* CREALITY v4.3.1 (STM32F103) board pin assignments
|
||||
*/
|
||||
|
||||
#define BOARD_INFO_NAME "Creality v4.3.1"
|
||||
#define DEFAULT_MACHINE_NAME "Creality3D"
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PB8
|
||||
#define X_DIR_PIN PB7
|
||||
|
||||
#define Y_STEP_PIN PC2
|
||||
#define Y_DIR_PIN PB9
|
||||
|
||||
#include "pins_CREALITY_V4.h"
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality v4.5.2 (STM32F103RET6) board pin assignments
|
||||
*/
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Creality v4.5.2 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_NAME "Creality v4.5.2"
|
||||
|
||||
#define HEATER_0_PIN PA1 // HEATER1
|
||||
#define HEATER_BED_PIN PA2 // HOT BED
|
||||
#define FAN_PIN PA0 // FAN
|
||||
#define PROBE_ACTIVATION_SWITCH_PIN PC6 // Optoswitch to Enable Z Probe
|
||||
|
||||
#include "pins_CREALITY_V45x.h"
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality v4.5.3 (STM32F103RET6) board pin assignments
|
||||
*/
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Creality v4.5.3 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_NAME "Creality v4.5.3"
|
||||
|
||||
#define HEATER_0_PIN PB14 // HEATER1
|
||||
#define HEATER_BED_PIN PB13 // HOT BED
|
||||
#define FAN_PIN PB15 // FAN
|
||||
#define PROBE_ACTIVATION_SWITCH_PIN PB2 // Optoswitch to Enable Z Probe
|
||||
|
||||
#include "pins_CREALITY_V45x.h"
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality v4.5.2 and v4.5.3 (STM32F103RET6) board pin assignments
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#define DEFAULT_MACHINE_NAME "Creality3D"
|
||||
|
||||
//
|
||||
// Release PB4 (Z_STEP_PIN) from JTAG NRST role
|
||||
//
|
||||
#define DISABLE_DEBUG
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
#if ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PA11
|
||||
#define IIC_EEPROM_SCL PA12
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
||||
#elif ENABLED(SDCARD_EEPROM_EMULATION)
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PC4
|
||||
#define Y_STOP_PIN PC5
|
||||
#define Z_STOP_PIN PA4
|
||||
|
||||
#define FIL_RUNOUT_PIN PA7
|
||||
|
||||
//
|
||||
// Probe
|
||||
//
|
||||
#define PROBE_TARE_PIN PA5
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC3
|
||||
#define X_STEP_PIN PB8
|
||||
#define X_DIR_PIN PB7
|
||||
|
||||
#define Y_ENABLE_PIN PC3
|
||||
#define Y_STEP_PIN PB6
|
||||
#define Y_DIR_PIN PB5
|
||||
|
||||
#define Z_ENABLE_PIN PC3
|
||||
#define Z_STEP_PIN PB4
|
||||
#define Z_DIR_PIN PB3
|
||||
|
||||
#define E0_ENABLE_PIN PC3
|
||||
#define E0_STEP_PIN PC2
|
||||
#define E0_DIR_PIN PB9
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PB1 // TH1
|
||||
#define TEMP_BED_PIN PB0 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
|
||||
#define FAN_SOFT_PWM
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define NO_SD_HOST_DRIVE // SD is only seen by the printer
|
||||
|
||||
#define SDIO_SUPPORT // Extra added by Creality
|
||||
#define SDIO_CLOCK 6000000 // In original source code overridden by Creality in sdio.h
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define CASE_LIGHT_PIN PA6
|
||||
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
/**
|
||||
* 21017 Victor Perez Marlin for stm32f1 test
|
||||
*/
|
||||
|
||||
#define BOARD_INFO_NAME "Misc. STM32F1R"
|
||||
#define DEFAULT_MACHINE_NAME "STM32F103RET6"
|
||||
|
||||
// Ignore temp readings during development.
|
||||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PB3
|
||||
#define Y_STOP_PIN PB4
|
||||
#define Z_STOP_PIN PB5
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PC0
|
||||
#define X_DIR_PIN PC1
|
||||
#define X_ENABLE_PIN PA8
|
||||
|
||||
#define Y_STEP_PIN PC2
|
||||
#define Y_DIR_PIN PC3
|
||||
#define Y_ENABLE_PIN PA8
|
||||
|
||||
#define Z_STEP_PIN PC4
|
||||
#define Z_DIR_PIN PC5
|
||||
#define Z_ENABLE_PIN PA8
|
||||
|
||||
#define E0_STEP_PIN PC6
|
||||
#define E0_DIR_PIN PC7
|
||||
#define E0_ENABLE_PIN PA8
|
||||
|
||||
/**
|
||||
* TODO: Currently using same Enable pin to all steppers.
|
||||
*/
|
||||
|
||||
#define E1_STEP_PIN PC8
|
||||
#define E1_DIR_PIN PC9
|
||||
#define E1_ENABLE_PIN PA8
|
||||
|
||||
#define E2_STEP_PIN PC10
|
||||
#define E2_DIR_PIN PC11
|
||||
#define E2_ENABLE_PIN PA8
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define SDSS PA4
|
||||
#define LED_PIN PD2
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PB0 // EXTRUDER 1
|
||||
#define HEATER_1_PIN PB1
|
||||
|
||||
#define HEATER_BED_PIN PA3 // BED
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_BED_PIN PA0 // Analog Input
|
||||
#define TEMP_0_PIN PA1 // Analog Input
|
||||
#define TEMP_1_PIN PA2 // Analog Input
|
||||
|
||||
//
|
||||
// LCD Pins
|
||||
//
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
#error "REPRAPWORLD_GRAPHICAL_LCD is not supported."
|
||||
#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 !IS_NEWPANEL
|
||||
#error "Non-NEWPANEL LCD is not supported."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IS_NEWPANEL
|
||||
#if IS_RRD_SC
|
||||
#error "RRD Smart Controller is not supported."
|
||||
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
#error "REPRAPWORLD_GRAPHICAL_LCD is not supported."
|
||||
#elif ENABLED(LCD_I2C_PANELOLU2)
|
||||
#error "LCD_I2C_PANELOLU2 is not supported."
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
#error "LCD_I2C_VIKI is not supported."
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
#error "VIKI2 / miniVIKI is not supported."
|
||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#error "ELB_FULL_GRAPHIC_CONTROLLER is not supported."
|
||||
#elif ENABLED(MINIPANEL)
|
||||
#error "MINIPANEL is not supported."
|
||||
#else
|
||||
#error "Other generic NEWPANEL LCD is not supported."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
@@ -0,0 +1,199 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* ANYCUBIC Trigorilla Pro (STM32F130ZET6) board pin assignments.
|
||||
* It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it
|
||||
* https://github.com/MarlinFirmware/Marlin/issues/14655
|
||||
* https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "Trigorilla Pro supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "Trigorilla Pro"
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
#define DISABLE_JTAG
|
||||
|
||||
//#define SWAPPED_Z_PLUGS
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#if 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 MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
|
||||
#else
|
||||
#define MARLIN_EEPROM_SIZE (0x800U) // On SD, Limit to 2KB, require this amount of RAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PG10
|
||||
#define Y_STOP_PIN PA12
|
||||
#ifndef Z_MIN_PIN
|
||||
#ifdef SWAPPED_Z_PLUGS
|
||||
#define Z_MIN_PIN PA14
|
||||
#else
|
||||
#define Z_MIN_PIN PA13
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z_MAX_PIN
|
||||
#ifdef SWAPPED_Z_PLUGS
|
||||
#define Z_MAX_PIN PA13
|
||||
#else
|
||||
#define Z_MAX_PIN PA14
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC13
|
||||
#define X_STEP_PIN PE5
|
||||
#define X_DIR_PIN PE6
|
||||
|
||||
#define Y_ENABLE_PIN PE4
|
||||
#define Y_STEP_PIN PE2
|
||||
#define Y_DIR_PIN PE3
|
||||
|
||||
#define Z_ENABLE_PIN PE1
|
||||
#define Z_STEP_PIN PB9
|
||||
#define Z_DIR_PIN PE0
|
||||
|
||||
#define E0_ENABLE_PIN PB8
|
||||
#define E0_STEP_PIN PB4
|
||||
#define E0_DIR_PIN PB5
|
||||
|
||||
#define E1_ENABLE_PIN PG8
|
||||
#define E1_STEP_PIN PC7
|
||||
#define E1_DIR_PIN PC6
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA1 // TH1
|
||||
#define TEMP_BED_PIN PA0 // TB1
|
||||
|
||||
//
|
||||
// Heaters
|
||||
//
|
||||
#define HEATER_0_PIN PG12 // HEATER1
|
||||
#define HEATER_BED_PIN PG11 // HOT BED
|
||||
#define HEATER_BED_INVERTING true
|
||||
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
#define CONTROLLER_FAN_PIN PD6 // FAN
|
||||
#define FAN_PIN PG13 // FAN
|
||||
#define FAN1_PIN PG14 // FAN
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
#define BEEPER_PIN PB0
|
||||
#define LED_PIN PD3
|
||||
//#define POWER_LOSS_PIN PG2 // PG4 PW_DET
|
||||
#define FIL_RUNOUT_PIN PA15 // MT_DET
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
#if HAS_FSMC_TFT
|
||||
#define TFT_RESET_PIN PF11
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
#define FSMC_CS_PIN PD7 // NE4
|
||||
#define FSMC_RS_PIN PD11 // A0
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define ANYCUBIC_TFT35
|
||||
#else
|
||||
#define LCD_RESET_PIN PF11
|
||||
#define LCD_BACKLIGHT_PIN PD13
|
||||
#endif
|
||||
|
||||
// XPT2046 Touch Screen calibration
|
||||
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
|
||||
#ifndef TOUCH_CALIBRATION_X
|
||||
#define TOUCH_CALIBRATION_X -17181
|
||||
#endif
|
||||
#ifndef TOUCH_CALIBRATION_Y
|
||||
#define TOUCH_CALIBRATION_Y 11434
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_X
|
||||
#define TOUCH_OFFSET_X 501
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_Y
|
||||
#define TOUCH_OFFSET_Y -9
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if NEED_TOUCH_PINS
|
||||
#define TOUCH_CS_PIN PB7 // SPI2_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI2_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI2_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI2_MOSI
|
||||
#endif
|
||||
|
||||
// SPI1(PA7) & SPI3(PB5) not available
|
||||
#define SPI_DEVICE 2
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#define SD_SCK_PIN PB13 // SPI2 ok
|
||||
#define SD_MISO_PIN PB14 // SPI2 ok
|
||||
#define SD_MOSI_PIN PB15 // SPI2 ok
|
||||
#define SD_SS_PIN PC11 // PB12 is X- ok
|
||||
#define SD_DETECT_PIN -1 // SD_CD ok
|
||||
#else
|
||||
// SD as custom software SPI (SDIO pins)
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
#define SD_MOSI_PIN PD2
|
||||
#define SD_SS_PIN -1
|
||||
#define ONBOARD_SD_CS_PIN PC11
|
||||
#define SDSS PD2
|
||||
#define SD_DETECT_PIN -1
|
||||
#endif
|
||||
|
||||
#undef SWAPPED_Z_PLUGS
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(STM32F4) && (DISABLED(ALLOW_STM32DUINO) || NOT_TARGET(STM32F4xx))
|
||||
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
#undef ALLOW_STM32DUINO
|
||||
@@ -0,0 +1,224 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Anet ET4 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "Anet ET4 1.x"
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
|
||||
// Use one of these or SDCard-based Emulation will be used
|
||||
#if NO_EEPROM_SELECTED
|
||||
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
|
||||
#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
|
||||
//#define IIC_BL24CXX_EEPROM // Use I2C EEPROM onboard IC (AT24C04C, Size 4KB, PageSize 16B)
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#elif ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PB11
|
||||
#define IIC_EEPROM_SCL PB10
|
||||
#define EEPROM_DEVICE_ADDRESS 0xA0
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PC13
|
||||
#define Y_STOP_PIN PE12
|
||||
#define Z_STOP_PIN PE11
|
||||
|
||||
//
|
||||
// Z Probe
|
||||
//
|
||||
#if ENABLED(BLTOUCH)
|
||||
#error "You will need to use 24V to 5V converter and remove one resistor and capacitor from the motherboard. See https://github.com/davidtgbe/Marlin/blob/bugfix-2.0.x/docs/Tutorials/bltouch-en.md for more information. Comment out this line to proceed at your own risk."
|
||||
#define SERVO0_PIN PC3
|
||||
#elif !defined(Z_MIN_PROBE_PIN)
|
||||
#define Z_MIN_PROBE_PIN PC3
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PA2
|
||||
#endif
|
||||
|
||||
//
|
||||
// Power Loss Detection
|
||||
//
|
||||
#ifndef POWER_LOSS_PIN
|
||||
#define POWER_LOSS_PIN PA8
|
||||
#endif
|
||||
|
||||
//
|
||||
// LED PIN
|
||||
//
|
||||
#define LED_PIN PD12
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PB6
|
||||
#define X_DIR_PIN PB5
|
||||
#define X_ENABLE_PIN PB7
|
||||
|
||||
#define Y_STEP_PIN PB3
|
||||
#define Y_DIR_PIN PD6
|
||||
#define Y_ENABLE_PIN PB4
|
||||
|
||||
#define Z_STEP_PIN PA12
|
||||
#define Z_DIR_PIN PA11
|
||||
#define Z_ENABLE_PIN PA15
|
||||
|
||||
#define E0_STEP_PIN PB9
|
||||
#define E0_DIR_PIN PB8
|
||||
#define E0_ENABLE_PIN PE0
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA1
|
||||
#define TEMP_BED_PIN PA4
|
||||
|
||||
//
|
||||
// Heaters
|
||||
//
|
||||
#define HEATER_0_PIN PA0
|
||||
#define HEATER_BED_PIN PE2
|
||||
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
#define FAN_PIN PE3 // Layer fan
|
||||
#define FAN1_PIN PE1 // Hotend fan
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN FAN1_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#define TFT_RESET_PIN PE6
|
||||
#define TFT_CS_PIN PD7
|
||||
#define TFT_RS_PIN PD13
|
||||
#define TFT_INTERFACE_FSMC_8BIT
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN TFT_CS_PIN
|
||||
#define FSMC_RS_PIN TFT_RS_PIN
|
||||
|
||||
//
|
||||
// Touch Screen
|
||||
// https://ldm-systems.ru/f/doc/catalog/HY-TFT-2,8/XPT2046.pdf
|
||||
//
|
||||
#if NEED_TOUCH_PINS
|
||||
#define TOUCH_CS_PIN PB2
|
||||
#define TOUCH_SCK_PIN PB0
|
||||
#define TOUCH_MOSI_PIN PE5
|
||||
#define TOUCH_MISO_PIN PE4
|
||||
#define TOUCH_INT_PIN PB1
|
||||
#endif
|
||||
|
||||
#if ENABLED(ANET_ET5_TFT35)
|
||||
#ifndef TOUCH_CALIBRATION_X
|
||||
#define TOUCH_CALIBRATION_X 17125
|
||||
#endif
|
||||
#ifndef TOUCH_CALIBRATION_Y
|
||||
#define TOUCH_CALIBRATION_Y -11307
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_X
|
||||
#define TOUCH_OFFSET_X -26
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_Y
|
||||
#define TOUCH_OFFSET_Y 337
|
||||
#endif
|
||||
#ifndef TOUCH_ORIENTATION
|
||||
#define TOUCH_ORIENTATION TOUCH_PORTRAIT
|
||||
#endif
|
||||
#elif ENABLED(ANET_ET4_TFT28)
|
||||
#ifndef TOUCH_CALIBRATION_X
|
||||
#define TOUCH_CALIBRATION_X -11838
|
||||
#endif
|
||||
#ifndef TOUCH_CALIBRATION_Y
|
||||
#define TOUCH_CALIBRATION_Y 8776
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_X
|
||||
#define TOUCH_OFFSET_X 333
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_Y
|
||||
#define TOUCH_OFFSET_Y -17
|
||||
#endif
|
||||
#ifndef TOUCH_ORIENTATION
|
||||
#define TOUCH_ORIENTATION TOUCH_PORTRAIT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
//#define SDIO_SUPPORT
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION CUSTOM_CABLE
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#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 DISABLED(SDIO_SUPPORT)
|
||||
#define SOFTWARE_SPI
|
||||
#define SDSS SDIO_D3_PIN
|
||||
#define SD_SCK_PIN SDIO_CK_PIN
|
||||
#define SD_MISO_PIN SDIO_D0_PIN
|
||||
#define SD_MOSI_PIN SDIO_CMD_PIN
|
||||
#endif
|
||||
|
||||
#ifndef SD_DETECT_PIN
|
||||
#define SD_DETECT_PIN PD3
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define BOARD_INFO_NAME "Anet ET4P 1.x"
|
||||
|
||||
//
|
||||
// TMC2208 Configuration_adv defaults for Anet ET4P-MB_V1.x
|
||||
//
|
||||
#if !AXIS_DRIVER_TYPE_X(TMC2208_STANDALONE) || !AXIS_DRIVER_TYPE_Y(TMC2208_STANDALONE) || !AXIS_DRIVER_TYPE_Z(TMC2208_STANDALONE) || !AXIS_DRIVER_TYPE_E0(TMC2208_STANDALONE)
|
||||
#error "ANET_ET4P requires ([XYZ]|E0)_DRIVER_TYPE set to TMC2208_STANDALONE."
|
||||
#endif
|
||||
|
||||
#include "pins_ANET_ET4.h"
|
||||
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// https://github.com/ktand/Armed
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if 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
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 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
|
||||
|
||||
#if HOTENDS == 1 && TEMP_SENSOR_PROBE
|
||||
#define TEMP_PROBE_PIN PC1
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#if HAS_TMC_UART
|
||||
// TMC2208/TMC2209 stepper drivers
|
||||
//
|
||||
// Software serial
|
||||
//
|
||||
#define X_SERIAL_TX_PIN EXT0_PIN
|
||||
#define X_SERIAL_RX_PIN EXT0_PIN
|
||||
|
||||
#define Y_SERIAL_TX_PIN EXT1_PIN
|
||||
#define Y_SERIAL_RX_PIN EXT1_PIN
|
||||
|
||||
#define Z_SERIAL_TX_PIN EXT2_PIN
|
||||
#define Z_SERIAL_RX_PIN EXT2_PIN
|
||||
|
||||
#define E0_SERIAL_TX_PIN EXT3_PIN
|
||||
#define E0_SERIAL_RX_PIN EXT3_PIN
|
||||
|
||||
#define E1_SERIAL_RX_PIN EXT4_PIN
|
||||
#define E1_SERIAL_TX_PIN EXT4_PIN
|
||||
|
||||
#define Z2_SERIAL_RX_PIN EXT4_PIN
|
||||
#define Z2_SERIAL_TX_PIN EXT4_PIN
|
||||
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
@@ -0,0 +1,164 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* STM32F407VET6 with RAMPS-like shield
|
||||
* 'Black' STM32F407VET6 board - https://www.stm32duino.com/viewtopic.php?t=485
|
||||
* Shield - https://github.com/jmz52/Hardware
|
||||
*/
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if 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 SRAM_EEPROM_EMULATION
|
||||
#define MARLIN_EEPROM_SIZE 0x2000 // 8KB
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(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 SD_SCK_PIN SDIO_CK_PIN
|
||||
#define SD_MISO_PIN SDIO_D0_PIN
|
||||
#define SD_MOSI_PIN SDIO_CMD_PIN
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,322 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "BIGTREE BTT002 V1.0 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "BTT BTT002 V1.0"
|
||||
|
||||
// Use one of these or SDCard-based Emulation will be used
|
||||
#if NO_EEPROM_SELECTED
|
||||
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
|
||||
#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#endif
|
||||
|
||||
// Ignore temp readings during development.
|
||||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PD3
|
||||
#define Y_STOP_PIN PD2
|
||||
#define Z_STOP_PIN PD1 // Shares J4 connector with PC3
|
||||
|
||||
//
|
||||
// Z Probe must be this pin
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PD1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PA15
|
||||
#endif
|
||||
|
||||
//
|
||||
// Power Loss Detection
|
||||
//
|
||||
#ifndef POWER_LOSS_PIN
|
||||
#define POWER_LOSS_PIN PD4
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PA9
|
||||
#define X_DIR_PIN PA10
|
||||
#define X_ENABLE_PIN PA8
|
||||
#ifndef X_CS_PIN
|
||||
#define X_CS_PIN PE2
|
||||
#endif
|
||||
|
||||
#define Y_STEP_PIN PC8
|
||||
#define Y_DIR_PIN PC9
|
||||
#define Y_ENABLE_PIN PC7
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN PE3
|
||||
#endif
|
||||
|
||||
#define Z_STEP_PIN PD15
|
||||
#define Z_DIR_PIN PC6
|
||||
#define Z_ENABLE_PIN PD14
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN PE4
|
||||
#endif
|
||||
|
||||
#define E0_STEP_PIN PD12
|
||||
#define E0_DIR_PIN PD13
|
||||
#define E0_ENABLE_PIN PD11
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN PD7
|
||||
#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_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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 PE2
|
||||
#define X_SERIAL_RX_PIN PE2
|
||||
|
||||
#define Y_SERIAL_TX_PIN PE3
|
||||
#define Y_SERIAL_RX_PIN PE3
|
||||
|
||||
#define Z_SERIAL_TX_PIN PE4
|
||||
#define Z_SERIAL_RX_PIN PE4
|
||||
|
||||
#define E0_SERIAL_TX_PIN PD7
|
||||
#define E0_SERIAL_RX_PIN PD7
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA2 // T0 <-> E0
|
||||
#define TEMP_1_PIN PA0 // T1 <-> E1
|
||||
#define TEMP_BED_PIN PA1 // T2 <-> Bed
|
||||
#define TEMP_PROBE_PIN PC3 // Shares J4 connector with PD1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PE6 // Heater0
|
||||
#define HEATER_BED_PIN PE5 // Hotbed
|
||||
#define FAN_PIN PB8 // Fan1
|
||||
#define FAN1_PIN PB9 // Fan0
|
||||
|
||||
/**
|
||||
* -----------------------------------BTT002 V1.0----------------------------------------
|
||||
* ------ ------ |
|
||||
* PA3 | 1 2 | GND 5V | 1 2 | GND |
|
||||
* NRESET | 3 4 | PC4 (SD_DET) (LCD_D7) PE13 | 3 4 | PE12 (LCD_D6) |
|
||||
* (MOSI) PA7 | 5 6 | PB0 (BTN_EN2) (LCD_D5) PE11 | 5 6 | PE10 (LCD_D4) |
|
||||
* (SD_SS) PA4 | 7 8 | PC5 (BTN_EN1) (LCD_RS) PE8 | 7 8 | PE9 (LCD_EN) |
|
||||
* (SCK) PA5 | 9 10 | PA6 (MISO) (BTN_ENC) PB1 | 9 10 | PE7 (BEEPER) |
|
||||
* ------ ------ |
|
||||
* EXP2 EXP1 |
|
||||
* --------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define EXP1_03_PIN PE13
|
||||
#define EXP1_04_PIN PE12
|
||||
#define EXP1_05_PIN PE11
|
||||
#define EXP1_06_PIN PE10
|
||||
#define EXP1_07_PIN PE8
|
||||
#define EXP1_08_PIN PE9
|
||||
#define EXP1_09_PIN PB1
|
||||
#define EXP1_10_PIN PE7
|
||||
|
||||
#define EXP2_01_PIN PA3
|
||||
#define EXP2_03_PIN -1
|
||||
#define EXP2_04_PIN PC4
|
||||
#define EXP2_05_PIN PA7
|
||||
#define EXP2_06_PIN PB0
|
||||
#define EXP2_07_PIN PA4
|
||||
#define EXP2_08_PIN PC5
|
||||
#define EXP2_09_PIN PA5
|
||||
#define EXP2_10_PIN PA6
|
||||
|
||||
// HAL SPI1 pins
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define SD_SCK_PIN EXP2_09_PIN // SPI1 SCLK
|
||||
#define SD_SS_PIN EXP2_07_PIN // SPI1 SSEL
|
||||
#define SD_MISO_PIN EXP2_10_PIN // SPI1 MISO
|
||||
#define SD_MOSI_PIN EXP2_05_PIN // SPI1 MOSI
|
||||
#endif
|
||||
|
||||
#define SDSS EXP2_07_PIN
|
||||
|
||||
//
|
||||
// LCDs and Controllers
|
||||
//
|
||||
#if HAS_WIRED_LCD
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#define SD_DETECT_PIN EXP2_04_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864)
|
||||
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define DOGLCD_CS EXP1_05_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
#define DOGLCD_MOSI EXP2_05_PIN
|
||||
#define DOGLCD_MISO EXP2_10_PIN
|
||||
#define DOGLCD_SCK EXP2_09_PIN
|
||||
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
#define FORCE_SOFT_SPI
|
||||
|
||||
#define LCD_RESET_PIN EXP1_06_PIN // 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 EXP1_05_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN EXP1_04_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN EXP1_03_PIN
|
||||
#endif
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
//
|
||||
// RGB LEDs
|
||||
//
|
||||
#ifndef RGB_LED_R_PIN
|
||||
#define RGB_LED_R_PIN PB5
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN PB4
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN PB3
|
||||
#endif
|
||||
#ifndef RGB_LED_W_PIN
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
@@ -0,0 +1,375 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(STM32F4)
|
||||
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "BTT E3 RRF"
|
||||
#endif
|
||||
|
||||
#define FPC2_PIN PB11
|
||||
#define FPC3_PIN PB10
|
||||
#define FPC4_PIN PE12
|
||||
#define FPC5_PIN PE13
|
||||
#define FPC6_PIN PE14
|
||||
#define FPC7_PIN PE15
|
||||
#define FPC8_PIN PA3
|
||||
#define FPC9_PIN PA2
|
||||
#define FPC10_PIN PA8
|
||||
#define FPC11_PIN PC15
|
||||
#define FPC12_PIN PC14
|
||||
#define FPC13_PIN PC13
|
||||
#define FPC14_PIN PE6
|
||||
#define FPC15_PIN PE5
|
||||
#define FPC16_PIN PE4
|
||||
#define FPC17_PIN PE3
|
||||
|
||||
//#define BTT_E3_RRF_IDEX_BOARD
|
||||
|
||||
#ifdef BTT_E3_RRF_IDEX_BOARD
|
||||
|
||||
#define X2_ENABLE_PIN FPC13_PIN // X2EN
|
||||
#define X2_STEP_PIN FPC11_PIN // X2STP
|
||||
#define X2_DIR_PIN FPC10_PIN // X2DIR
|
||||
#define X2_SERIAL_TX_PIN FPC12_PIN // X2UART
|
||||
#define X2_SERIAL_RX_PIN FPC12_PIN // X2UART
|
||||
#if X_HOME_TO_MIN
|
||||
#define X_MAX_PIN FPC2_PIN // X2-STOP
|
||||
#else
|
||||
#define X_MIN_PIN FPC2_PIN // X2-STOP
|
||||
#endif
|
||||
|
||||
#define E1_ENABLE_PIN FPC7_PIN // E1EN
|
||||
#define E1_STEP_PIN FPC5_PIN // E1STP
|
||||
#define E1_DIR_PIN FPC4_PIN // E1DIR
|
||||
#define E1_SERIAL_TX_PIN FPC6_PIN // E1UART
|
||||
#define E1_SERIAL_RX_PIN FPC6_PIN // E1UART
|
||||
|
||||
#ifndef FIL1_RUNOUT2_PIN
|
||||
#define FIL_RUNOUT2_PIN FPC3_PIN // E1-STOP
|
||||
#endif
|
||||
|
||||
#define HEATER_1_PIN FPC16_PIN // "HE1"
|
||||
|
||||
#define PT100_PIN FPC8_PIN // Analog Input "PT100"(INA826)
|
||||
#define TEMP_1_PIN FPC9_PIN // Analog Input "TH1"
|
||||
|
||||
#define FAN1_PIN FPC15_PIN // "FAN0" in IDEX board
|
||||
#define FAN2_PIN FPC14_PIN // "FAN1" in IDEX board
|
||||
|
||||
#endif
|
||||
|
||||
// Onboard I2C EEPROM
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PB0 // SERVOS
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PC0 // X-STOP
|
||||
#define Y_STOP_PIN PC1 // Y-STOP
|
||||
#define Z_STOP_PIN PC2 // Z-STOP
|
||||
|
||||
//
|
||||
// Z Probe must be this pin
|
||||
//
|
||||
#define Z_MIN_PROBE_PIN PC5 // PROBE
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PC3 // E0-STOP
|
||||
#endif
|
||||
|
||||
//
|
||||
// Power-loss Detection
|
||||
//
|
||||
#ifndef POWER_LOSS_PIN
|
||||
#define POWER_LOSS_PIN PE0 // Power Loss Detection: PWR-DET
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PD7
|
||||
#define X_STEP_PIN PD5
|
||||
#define X_DIR_PIN PD4
|
||||
|
||||
#define Y_ENABLE_PIN PD3
|
||||
#define Y_STEP_PIN PD0
|
||||
#define Y_DIR_PIN PA15
|
||||
|
||||
#define Z_ENABLE_PIN PD14
|
||||
#define Z_STEP_PIN PC6
|
||||
#define Z_DIR_PIN PC7
|
||||
|
||||
#define E0_ENABLE_PIN PD10
|
||||
#define E0_STEP_PIN PD12
|
||||
#define E0_DIR_PIN PD13
|
||||
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*/
|
||||
#if HAS_TMC_UART
|
||||
//
|
||||
// Software serial
|
||||
//
|
||||
#define X_SERIAL_TX_PIN PD6
|
||||
#define X_SERIAL_RX_PIN PD6
|
||||
|
||||
#define Y_SERIAL_TX_PIN PD1
|
||||
#define Y_SERIAL_RX_PIN PD1
|
||||
|
||||
#define Z_SERIAL_TX_PIN PD15
|
||||
#define Z_SERIAL_RX_PIN PD15
|
||||
|
||||
#define E0_SERIAL_TX_PIN PD11
|
||||
#define E0_SERIAL_RX_PIN PD11
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_BED_PIN PA1 // Analog Input "TB"
|
||||
#define TEMP_0_PIN PA0 // Analog Input "TH0"
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_BED_PIN PB4 // "HB"
|
||||
#define HEATER_0_PIN PB3 // "HE0"
|
||||
|
||||
#define FAN_PIN PB5 // "FAN0"
|
||||
//#define FAN1_PIN PB6 // "FAN1"
|
||||
|
||||
#ifndef CONTROLLER_FAN_PIN
|
||||
#define CONTROLLER_FAN_PIN PB6 // "FAN1"
|
||||
#endif
|
||||
|
||||
#ifndef NEOPIXEL_PIN
|
||||
#define NEOPIXEL_PIN PB7 // LED driving pin
|
||||
#endif
|
||||
|
||||
#ifndef PS_ON_PIN
|
||||
#define PS_ON_PIN PE1 // Power Supply Control
|
||||
#endif
|
||||
|
||||
/**
|
||||
* BTT E3 RRF
|
||||
* _____
|
||||
* 5V | 1 2 | GND
|
||||
* (LCD_EN) PE11 | 3 4 | PB1 (LCD_RS)
|
||||
* (LCD_D4) PE10 | 5 6 PB2 (BTN_EN2)
|
||||
* RESET | 7 8 | PE7 (BTN_EN1)
|
||||
* (BTN_ENC) PE9 | 9 10| PE8 (BEEPER)
|
||||
* -----
|
||||
* EXP1
|
||||
*/
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define BEEPER_PIN PE8
|
||||
#define BTN_ENC PE9
|
||||
|
||||
#define BTN_EN1 PE7
|
||||
#define BTN_EN2 PB2
|
||||
|
||||
#define LCD_PINS_RS PB1
|
||||
#define LCD_PINS_ENABLE PE11
|
||||
#define LCD_PINS_D4 PE10
|
||||
|
||||
// CR10_STOCKDISPLAY default timing is too fast
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
|
||||
#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_E3_RRF.h' for details. Comment out this line to continue."
|
||||
|
||||
#define LCD_PINS_RS PE10
|
||||
#define LCD_PINS_ENABLE PE9
|
||||
#define LCD_PINS_D4 PB1
|
||||
#define LCD_PINS_D5 PB2
|
||||
#define LCD_PINS_D6 PE7
|
||||
#define LCD_PINS_D7 PE8
|
||||
#define ADC_KEYPAD_PIN PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
|
||||
|
||||
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
|
||||
|
||||
#define BTN_ENC PE9
|
||||
#define BTN_EN1 PE7
|
||||
#define BTN_EN2 PB2
|
||||
|
||||
#define DOGLCD_CS PB1
|
||||
#define DOGLCD_A0 PE10
|
||||
#define DOGLCD_SCK PE8
|
||||
#define DOGLCD_MOSI PE11
|
||||
|
||||
#define FORCE_SOFT_SPI
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
#elif IS_TFTGLCD_PANEL
|
||||
|
||||
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||
|
||||
#error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue."
|
||||
|
||||
/**
|
||||
* TFTGLCD_PANEL_SPI display pinout
|
||||
*
|
||||
* Board Display
|
||||
* _____ _____
|
||||
* 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
|
||||
* (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) LCD_CS | 3 4 | SD_CS (PB2)
|
||||
* (FREE) PE10 | 5 6 | PB2 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI)
|
||||
* RESET | 7 8 | PE7 (MOD_RESET) (PE8) SD_DET | 7 8 | (FREE)
|
||||
* (BEEPER) PE9 | 9 10| PE8 (SD_DET) GND | 9 10| 5V
|
||||
* ----- -----
|
||||
* EXP1 EXP1
|
||||
*
|
||||
* Needs custom cable:
|
||||
*
|
||||
* Board Adapter Display
|
||||
* _________
|
||||
* EXP1-1 ----------- EXP1-10
|
||||
* EXP1-2 ----------- EXP1-9
|
||||
* SPI1-4 ----------- EXP1-6
|
||||
* EXP1-4 ----------- FREE
|
||||
* SPI1-3 ----------- EXP1-2
|
||||
* EXP1-6 ----------- EXP1-4
|
||||
* EXP1-7 ----------- FREE
|
||||
* EXP1-8 ----------- EXP1-3
|
||||
* SPI1-1 ----------- EXP1-1
|
||||
* EXP1-10 ----------- EXP1-7
|
||||
*/
|
||||
|
||||
#define TFTGLCD_CS PE7
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BTT_E3_RRF."
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
|
||||
|
||||
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue."
|
||||
|
||||
/** FYSETC TFT TFT81050 display pinout
|
||||
*
|
||||
* Board Display
|
||||
* _____ _____
|
||||
* 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
|
||||
* (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) MOD_RESET | 3 4 | SD_CS (PB2)
|
||||
* (FREE) PE10 | 5 6 | PB2 (SD_CS) (PB1) LCD_CS | 5 6 | MOSI (SPI1-MOSI)
|
||||
* RESET | 7 8 | PE7 (MOD_RESET) (PE8) SD_DET | 7 8 | RESET
|
||||
* (BEEPER) PE9 | 9 10| PE8 (SD_DET) GND | 9 10| 5V
|
||||
* ----- -----
|
||||
* EXP1 EXP1
|
||||
*
|
||||
* Needs custom cable:
|
||||
*
|
||||
* Board Adapter Display
|
||||
* _________
|
||||
* EXP1-1 ----------- EXP1-10
|
||||
* EXP1-2 ----------- EXP1-9
|
||||
* SPI1-4 ----------- EXP1-6
|
||||
* EXP1-4 ----------- EXP1-5
|
||||
* SPI1-3 ----------- EXP1-2
|
||||
* EXP1-6 ----------- EXP1-4
|
||||
* EXP1-7 ----------- EXP1-8
|
||||
* EXP1-8 ----------- EXP1-3
|
||||
* SPI1-1 ----------- EXP1-1
|
||||
* EXP1-10 ----------- EXP1-7
|
||||
*/
|
||||
|
||||
#define CLCD_SPI_BUS 1 // SPI1 connector
|
||||
|
||||
#define BEEPER_PIN PE9
|
||||
|
||||
#define CLCD_MOD_RESET PE7
|
||||
#define CLCD_SPI_CS PB1
|
||||
|
||||
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
|
||||
|
||||
//
|
||||
// SD Support
|
||||
//
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#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
|
||||
|
||||
//#define SDIO_CLOCK 48000000
|
||||
#define SD_DETECT_PIN PC4
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "SD CUSTOM_CABLE is not compatible with BTT E3 RRF."
|
||||
#endif
|
||||
|
||||
//
|
||||
// WIFI
|
||||
//
|
||||
|
||||
#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
|
||||
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
|
||||
#define ESP_WIFI_MODULE_RESET_PIN PA4
|
||||
#define ESP_WIFI_MODULE_ENABLE_PIN PA5
|
||||
#define ESP_WIFI_MODULE_GPIO0_PIN PA6
|
||||
@@ -0,0 +1,510 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 8 || E_STEPPERS > 8
|
||||
#error "BIGTREE GTR V1.0 supports up to 8 hotends / E-steppers."
|
||||
#elif HOTENDS > MAX_E_STEPPERS || E_STEPPERS > MAX_E_STEPPERS
|
||||
#error "Marlin extruder/hotends limit! Increase MAX_E_STEPPERS to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "BTT GTR V1.0"
|
||||
|
||||
// Onboard I2C EEPROM
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24C64 ... 64Kb = 8KB)
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
#define M5_EXTENDER // The M5 extender is attached
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PB11 // BLTOUCH
|
||||
#define SOL0_PIN PC7 // Toolchanger
|
||||
|
||||
#if ENABLED(TOOL_SENSOR)
|
||||
#define TOOL_SENSOR1_PIN PH6
|
||||
#define TOOL_SENSOR2_PIN PI4
|
||||
//#define TOOL_SENSOR3_PIN PF4
|
||||
#else
|
||||
#define PS_ON_PIN PH6
|
||||
#endif
|
||||
|
||||
//
|
||||
// Trinamic Stallguard pins
|
||||
//
|
||||
#define X_DIAG_PIN PF2 // X-
|
||||
#define Y_DIAG_PIN PC13 // Y-
|
||||
#define Z_DIAG_PIN PE0 // Z-
|
||||
#define E0_DIAG_PIN PG14 // X+
|
||||
#define E1_DIAG_PIN PG9 // Y+
|
||||
#define E2_DIAG_PIN PD3 // Z+
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#ifdef X_STALL_SENSITIVITY
|
||||
#define X_STOP_PIN X_DIAG_PIN
|
||||
#if X_HOME_TO_MIN
|
||||
#define X_MAX_PIN E0_DIAG_PIN // X+
|
||||
#else
|
||||
#define X_MIN_PIN E0_DIAG_PIN // X+
|
||||
#endif
|
||||
#else
|
||||
#define X_MIN_PIN X_DIAG_PIN // X-
|
||||
#define X_MAX_PIN E0_DIAG_PIN // X+
|
||||
#endif
|
||||
|
||||
#ifdef Y_STALL_SENSITIVITY
|
||||
#define Y_STOP_PIN Y_DIAG_PIN
|
||||
#if Y_HOME_TO_MIN
|
||||
#define Y_MAX_PIN E1_DIAG_PIN // Y+
|
||||
#else
|
||||
#define Y_MIN_PIN E1_DIAG_PIN // Y+
|
||||
#endif
|
||||
#else
|
||||
#define Y_MIN_PIN Y_DIAG_PIN // Y-
|
||||
#define Y_MAX_PIN E1_DIAG_PIN // Y+
|
||||
#endif
|
||||
|
||||
#ifdef Z_STALL_SENSITIVITY
|
||||
#define Z_STOP_PIN Z_DIAG_PIN
|
||||
#if Z_HOME_TO_MIN
|
||||
#define Z_MAX_PIN E2_DIAG_PIN // Z+
|
||||
#else
|
||||
#define Z_MIN_PIN E2_DIAG_PIN // Z+
|
||||
#endif
|
||||
#else
|
||||
#define Z_MIN_PIN Z_DIAG_PIN // Z-
|
||||
#define Z_MAX_PIN E2_DIAG_PIN // Z+
|
||||
#endif
|
||||
|
||||
//
|
||||
// Pins on the extender
|
||||
//
|
||||
#if ENABLED(M5_EXTENDER)
|
||||
#define X2_STOP_PIN PI4 // M5 M1_STOP
|
||||
#define Y2_STOP_PIN PF12 // M5 M5_STOP
|
||||
#define Z2_STOP_PIN PF4 // M5 M2_STOP
|
||||
#define Z3_STOP_PIN PI7 // M5 M4_STOP
|
||||
#define Z4_STOP_PIN PF6 // M5 M3_STOP
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
|
||||
#if ENABLED(M5_EXTENDER)
|
||||
|
||||
#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
|
||||
|
||||
#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_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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 // M5 MOTOR 1
|
||||
//#define E4_HARDWARE_SERIAL Serial1 // M5 MOTOR 2
|
||||
//#define E5_HARDWARE_SERIAL Serial1 // M5 MOTOR 3
|
||||
//#define E6_HARDWARE_SERIAL Serial1 // M5 MOTOR 4
|
||||
//#define E7_HARDWARE_SERIAL Serial1 // M5 MOTOR 5
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#if ENABLED(M5_EXTENDER)
|
||||
#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
|
||||
#endif
|
||||
|
||||
// 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
|
||||
|
||||
#if ENABLED(M5_EXTENDER)
|
||||
#define TEMP_3_PIN PA3 // M5 TEMP1
|
||||
#define TEMP_4_PIN PF9 // M5 TEMP2
|
||||
#define TEMP_5_PIN PF10 // M5 TEMP3
|
||||
#define TEMP_6_PIN PF7 // M5 TEMP4
|
||||
#define TEMP_7_PIN PF5 // M5 TEMP5
|
||||
#endif
|
||||
|
||||
#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 // GTR K-TEMP
|
||||
#define THERMO_CS2_PIN PH2 // M5 K-TEMP
|
||||
|
||||
#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
|
||||
|
||||
#if ENABLED(M5_EXTENDER)
|
||||
#define HEATER_3_PIN PD15 // M5 HEAT1
|
||||
#define HEATER_4_PIN PD13 // M5 HEAT2
|
||||
#define HEATER_5_PIN PD12 // M5 HEAT3
|
||||
#define HEATER_6_PIN PE13 // M5 HEAT4
|
||||
#define HEATER_7_PIN PI6 // M5 HEAT5
|
||||
#endif
|
||||
|
||||
#define HEATER_BED_PIN PA2 // Hotbed
|
||||
|
||||
#define FAN_PIN PE5 // Fan0
|
||||
#define FAN1_PIN PE6 // Fan1
|
||||
#define FAN2_PIN PC8 // Fan2
|
||||
|
||||
#if ENABLED(M5_EXTENDER)
|
||||
#define FAN3_PIN PI5 // M5 FAN1
|
||||
#define FAN4_PIN PE9 // M5 FAN2
|
||||
#define FAN5_PIN PE11 // M5 FAN3
|
||||
//#define FAN6_PIN PC9 // M5 FAN4
|
||||
//#define FAN7_PIN PE14 // M5 FAN5
|
||||
#endif
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
//
|
||||
// By default the LCD SD (SPI2) is enabled
|
||||
// Onboard SD is on a completely separate SPI bus, and requires
|
||||
// overriding pins to access.
|
||||
//
|
||||
#if SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define SD_DETECT_PIN EXP2_04_PIN
|
||||
#define SDSS EXP2_07_PIN
|
||||
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
|
||||
// Instruct the STM32 HAL to override the default SPI pins from the variant.h file
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SDSS PA4
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PC4
|
||||
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ------ ------
|
||||
* NC | 1 2 | GND 5V | 1 2 | GND
|
||||
* RESET | 3 4 | PB10 (SD_DETECT) (LCD_D7) PG5 | 3 4 | PG6 (LCD_D6)
|
||||
* (MOSI) PB15 | 5 6 | PH10 (BTN_EN2) (LCD_D5) PG7 | 5 6 | PG8 (LCD_D4)
|
||||
* (SD_SS) PB12 | 7 8 | PD10 (BTN_EN1) (LCD_RS) PA8 | 7 8 | PC10 (LCD_EN)
|
||||
* (SCK) PB13 | 9 10 | PB14 (MISO) (BTN_ENC) PA15 | 9 10 | PC11 (BEEPER)
|
||||
* ------ ------
|
||||
* EXP2 EXP1
|
||||
*/
|
||||
#define EXP1_03_PIN PG5
|
||||
#define EXP1_04_PIN PG6
|
||||
#define EXP1_05_PIN PG7
|
||||
#define EXP1_06_PIN PG8
|
||||
#define EXP1_07_PIN PA8
|
||||
#define EXP1_08_PIN PC10
|
||||
#define EXP1_09_PIN PA15
|
||||
#define EXP1_10_PIN PC11
|
||||
|
||||
#define EXP2_04_PIN PB10
|
||||
#define EXP2_05_PIN PB15
|
||||
#define EXP2_06_PIN PH10
|
||||
#define EXP2_07_PIN PB12
|
||||
#define EXP2_08_PIN PD10
|
||||
#define EXP2_09_PIN PB13
|
||||
#define EXP2_10_PIN PB14
|
||||
|
||||
//
|
||||
// LCDs and Controllers
|
||||
//
|
||||
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
|
||||
|
||||
#define TFT_CS_PIN EXP2_07_PIN
|
||||
#define TFT_A0_PIN EXP2_04_PIN
|
||||
#define TFT_SCK_PIN EXP2_09_PIN
|
||||
#define TFT_MISO_PIN EXP2_10_PIN
|
||||
#define TFT_MOSI_PIN EXP2_05_PIN
|
||||
|
||||
#define TOUCH_INT_PIN EXP1_04_PIN
|
||||
#define TOUCH_MISO_PIN EXP1_05_PIN
|
||||
#define TOUCH_MOSI_PIN EXP1_08_PIN
|
||||
#define TOUCH_SCK_PIN EXP1_06_PIN
|
||||
#define TOUCH_CS_PIN EXP1_07_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
||||
// CR10_STOCKDISPLAY default timing is too fast
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864)
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define DOGLCD_CS EXP1_05_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SOFTWARE_SPI
|
||||
#endif
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SOFTWARE_SPI
|
||||
#endif
|
||||
|
||||
//#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN EXP1_06_PIN // 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 EXP1_05_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN EXP1_04_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN EXP1_03_PIN
|
||||
#endif
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
#undef TP
|
||||
#undef M5_EXTENDER
|
||||
@@ -0,0 +1,530 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "BTT OCTOPUS V1.0"
|
||||
#endif
|
||||
|
||||
// Onboard I2C EEPROM
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x8000 // 32KB (24C32A)
|
||||
#define I2C_SCL_PIN PB8
|
||||
#define I2C_SDA_PIN PB9
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
// Avoid conflict with TIMER_TONE
|
||||
#define STEP_TIMER 10
|
||||
|
||||
//
|
||||
// Servos
|
||||
#define SERVO0_PIN PB6
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define LED_PIN PA13
|
||||
|
||||
//
|
||||
// Trinamic Stallguard pins
|
||||
//
|
||||
#define X_DIAG_PIN PG6 // X-STOP
|
||||
#define Y_DIAG_PIN PG9 // Y-STOP
|
||||
#define Z_DIAG_PIN PG10 // Z-STOP
|
||||
#define Z2_DIAG_PIN PG11 // Z2-STOP
|
||||
#define E0_DIAG_PIN PG12 // E0DET
|
||||
#define E1_DIAG_PIN PG13 // E1DET
|
||||
#define E2_DIAG_PIN PG14 // E2DET
|
||||
#define E3_DIAG_PIN PG15 // E3DET
|
||||
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PB7
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#ifdef X_STALL_SENSITIVITY
|
||||
#define X_STOP_PIN X_DIAG_PIN
|
||||
#if X_HOME_TO_MIN
|
||||
#define X_MAX_PIN E0_DIAG_PIN // E0DET
|
||||
#else
|
||||
#define X_MIN_PIN E0_DIAG_PIN // E0DET
|
||||
#endif
|
||||
#elif ENABLED(X_DUAL_ENDSTOPS)
|
||||
#ifndef X_MIN_PIN
|
||||
#define X_MIN_PIN X_DIAG_PIN // X-STOP
|
||||
#endif
|
||||
#ifndef X_MAX_PIN
|
||||
#define X_MAX_PIN E0_DIAG_PIN // E0DET
|
||||
#endif
|
||||
#else
|
||||
#define X_STOP_PIN X_DIAG_PIN // X-STOP
|
||||
#endif
|
||||
|
||||
#ifdef Y_STALL_SENSITIVITY
|
||||
#define Y_STOP_PIN Y_DIAG_PIN
|
||||
#if Y_HOME_TO_MIN
|
||||
#define Y_MAX_PIN E1_DIAG_PIN // E1DET
|
||||
#else
|
||||
#define Y_MIN_PIN E1_DIAG_PIN // E1DET
|
||||
#endif
|
||||
#elif ENABLED(Y_DUAL_ENDSTOPS)
|
||||
#ifndef Y_MIN_PIN
|
||||
#define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
|
||||
#endif
|
||||
#ifndef Y_MAX_PIN
|
||||
#define Y_MAX_PIN E1_DIAG_PIN // E1DET
|
||||
#endif
|
||||
#else
|
||||
#define Y_STOP_PIN Y_DIAG_PIN // Y-STOP
|
||||
#endif
|
||||
|
||||
#ifdef Z_STALL_SENSITIVITY
|
||||
#define Z_STOP_PIN Z_DIAG_PIN
|
||||
#if Z_HOME_TO_MIN
|
||||
#define Z_MAX_PIN E2_DIAG_PIN // PWRDET
|
||||
#else
|
||||
#define Z_MIN_PIN E2_DIAG_PIN // PWRDET
|
||||
#endif
|
||||
#elif ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#ifndef Z_MIN_PIN
|
||||
#define Z_MIN_PIN Z_DIAG_PIN // Z-STOP
|
||||
#endif
|
||||
#ifndef Z_MAX_PIN
|
||||
#define Z_MAX_PIN E2_DIAG_PIN // PWRDET
|
||||
#endif
|
||||
#else
|
||||
#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#define FIL_RUNOUT_PIN PG12 // E0DET
|
||||
#define FIL_RUNOUT2_PIN PG13 // E1DET
|
||||
#define FIL_RUNOUT3_PIN PG14 // E2DET
|
||||
#define FIL_RUNOUT4_PIN PG15 // E3DET
|
||||
|
||||
//
|
||||
// Power Supply Control
|
||||
//
|
||||
#ifndef PS_ON_PIN
|
||||
#define PS_ON_PIN PE11 // PS-ON
|
||||
#endif
|
||||
|
||||
//
|
||||
// Power Loss Detection
|
||||
//
|
||||
#ifndef POWER_LOSS_PIN
|
||||
#define POWER_LOSS_PIN PC0 // PWRDET
|
||||
#endif
|
||||
|
||||
//
|
||||
// NeoPixel LED
|
||||
//
|
||||
#ifndef NEOPIXEL_PIN
|
||||
#define NEOPIXEL_PIN PB0
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PF13 // MOTOR 0
|
||||
#define X_DIR_PIN PF12
|
||||
#define X_ENABLE_PIN PF14
|
||||
#ifndef X_CS_PIN
|
||||
#define X_CS_PIN PC4
|
||||
#endif
|
||||
|
||||
#define Y_STEP_PIN PG0 // MOTOR 1
|
||||
#define Y_DIR_PIN PG1
|
||||
#define Y_ENABLE_PIN PF15
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN PD11
|
||||
#endif
|
||||
|
||||
#define Z_STEP_PIN PF11 // MOTOR 2
|
||||
#define Z_DIR_PIN PG3
|
||||
#define Z_ENABLE_PIN PG5
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN PC6
|
||||
#endif
|
||||
|
||||
#define Z2_STEP_PIN PG4 // MOTOR 3
|
||||
#define Z2_DIR_PIN PC1
|
||||
#define Z2_ENABLE_PIN PA0
|
||||
#ifndef Z2_CS_PIN
|
||||
#define Z2_CS_PIN PC7
|
||||
#endif
|
||||
|
||||
#define E0_STEP_PIN PF9 // MOTOR 4
|
||||
#define E0_DIR_PIN PF10
|
||||
#define E0_ENABLE_PIN PG2
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN PF2
|
||||
#endif
|
||||
|
||||
#define E1_STEP_PIN PC13 // MOTOR 5
|
||||
#define E1_DIR_PIN PF0
|
||||
#define E1_ENABLE_PIN PF1
|
||||
#ifndef E1_CS_PIN
|
||||
#define E1_CS_PIN PE4
|
||||
#endif
|
||||
|
||||
#define E2_STEP_PIN PE2 // MOTOR 6
|
||||
#define E2_DIR_PIN PE3
|
||||
#define E2_ENABLE_PIN PD4
|
||||
#ifndef E2_CS_PIN
|
||||
|
||||
#define E2_CS_PIN PE1
|
||||
#endif
|
||||
|
||||
#define E3_STEP_PIN PE6 // MOTOR 7
|
||||
#define E3_DIR_PIN PA14
|
||||
#define E3_ENABLE_PIN PE0
|
||||
#ifndef E3_CS_PIN
|
||||
#define E3_CS_PIN PD3
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_BED_PIN PF3 // TB
|
||||
#if TEMP_SENSOR_0 == 20
|
||||
#define TEMP_0_PIN PF8 // PT100 Connector
|
||||
#else
|
||||
#define TEMP_0_PIN PF4 // TH0
|
||||
#endif
|
||||
#define TEMP_1_PIN PF5 // TH1
|
||||
#define TEMP_2_PIN PF6 // TH2
|
||||
#define TEMP_3_PIN PF7 // TH3
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_BED_PIN PA1 // Hotbed
|
||||
#define HEATER_0_PIN PA2 // Heater0
|
||||
#define HEATER_1_PIN PA3 // Heater1
|
||||
#define HEATER_2_PIN PB10 // Heater2
|
||||
#define HEATER_3_PIN PB11 // Heater3
|
||||
|
||||
#define FAN_PIN PA8 // Fan0
|
||||
#define FAN1_PIN PE5 // Fan1
|
||||
#define FAN2_PIN PD12 // Fan2
|
||||
#define FAN3_PIN PD13 // Fan3
|
||||
#define FAN4_PIN PD14 // Fan4
|
||||
#define FAN5_PIN PD15 // Fan5
|
||||
|
||||
//
|
||||
// SD Support
|
||||
//
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#if HAS_WIRED_LCD
|
||||
#define SDCARD_CONNECTION LCD
|
||||
#else
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
//
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PA7
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PA6
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PA5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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 PC4
|
||||
#define X_SERIAL_RX_PIN PC4
|
||||
|
||||
#define Y_SERIAL_TX_PIN PD11
|
||||
#define Y_SERIAL_RX_PIN PD11
|
||||
|
||||
#define Z_SERIAL_TX_PIN PC6
|
||||
#define Z_SERIAL_RX_PIN PC6
|
||||
|
||||
#define Z2_SERIAL_TX_PIN PC7
|
||||
#define Z2_SERIAL_RX_PIN PC7
|
||||
|
||||
#define E0_SERIAL_TX_PIN PF2
|
||||
#define E0_SERIAL_RX_PIN PF2
|
||||
|
||||
#define E1_SERIAL_TX_PIN PE4
|
||||
#define E1_SERIAL_RX_PIN PE4
|
||||
|
||||
#define E2_SERIAL_TX_PIN PE1
|
||||
#define E2_SERIAL_RX_PIN PE1
|
||||
|
||||
#define E3_SERIAL_TX_PIN PD3
|
||||
#define E3_SERIAL_RX_PIN PD3
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ______ ______
|
||||
* NC | 1 2 | GND 5V | 1 2 | GND
|
||||
* RESET | 3 4 | PC15 (SD_DETECT) (LCD_D7) PE15 | 3 4 | PE14 (LCD_D6)
|
||||
* (MOSI) PA7 | 5 6 PB1 (BTN_EN2) (LCD_D5) PE13 | 5 6 PE12 (LCD_D4)
|
||||
* (SD_SS) PA4 | 7 8 | PB2 (BTN_EN1) (LCD_RS) PE10 | 7 8 | PE9 (LCD_EN)
|
||||
* (SCK) PA5 | 9 10 | PA6 (MISO) (BTN_ENC) PE7 | 9 10 | PE8 (BEEPER)
|
||||
* ------ -----
|
||||
* EXP2 EXP1
|
||||
*/
|
||||
|
||||
#define EXP1_03_PIN PE15
|
||||
#define EXP1_04_PIN PE14
|
||||
#define EXP1_05_PIN PE13
|
||||
#define EXP1_06_PIN PE12
|
||||
#define EXP1_07_PIN PE10
|
||||
#define EXP1_08_PIN PE9
|
||||
#define EXP1_09_PIN PE7
|
||||
#define EXP1_10_PIN PE8
|
||||
|
||||
#define EXP2_03_PIN -1
|
||||
#define EXP2_04_PIN PC15
|
||||
#define EXP2_05_PIN PA7
|
||||
#define EXP2_06_PIN PB2
|
||||
#define EXP2_07_PIN PA4
|
||||
#define EXP2_08_PIN PB1
|
||||
#define EXP2_09_PIN PA5
|
||||
#define EXP2_10_PIN PA6
|
||||
|
||||
//
|
||||
// Onboard SD card
|
||||
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
|
||||
//
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#ifndef SD_DETECT_STATE
|
||||
#define SD_DETECT_STATE HIGH
|
||||
#elif SD_DETECT_STATE == LOW
|
||||
#error "BOARD_BTT_OCTOPUS_V1_0 onboard SD requires SD_DETECT_STATE set to HIGH."
|
||||
#endif
|
||||
#define SD_DETECT_PIN PC14
|
||||
#elif SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SDSS PA4
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PC15
|
||||
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BTT_MOTOR_EXPANSION)
|
||||
/**
|
||||
* ______ ______
|
||||
* NC | 1 2 | GND NC | 1 2 | GND
|
||||
* NC | 3 4 | M1EN M2EN | 3 4 | M3EN
|
||||
* M1STP | 5 6 M1DIR M1RX | 5 6 M1DIAG
|
||||
* M2DIR | 7 8 | M2STP M2RX | 7 8 | M2DIAG
|
||||
* M3DIR | 9 10 | M3STP M3RX | 9 10 | M3DIAG
|
||||
* ------ ------
|
||||
* EXP2 EXP1
|
||||
*/
|
||||
|
||||
// M1 on Driver Expansion Module
|
||||
#define E4_STEP_PIN EXP2_05_PIN
|
||||
#define E4_DIR_PIN EXP2_06_PIN
|
||||
#define E4_ENABLE_PIN EXP2_04_PIN
|
||||
#define E4_DIAG_PIN EXP1_06_PIN
|
||||
#define E4_CS_PIN EXP1_05_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E4_SERIAL_TX_PIN EXP1_05_PIN
|
||||
#define E4_SERIAL_RX_PIN EXP1_05_PIN
|
||||
#endif
|
||||
|
||||
// M2 on Driver Expansion Module
|
||||
#define E5_STEP_PIN EXP2_08_PIN
|
||||
#define E5_DIR_PIN EXP2_07_PIN
|
||||
#define E5_ENABLE_PIN EXP1_03_PIN
|
||||
#define E5_DIAG_PIN EXP1_08_PIN
|
||||
#define E5_CS_PIN EXP1_07_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E5_SERIAL_TX_PIN EXP1_07_PIN
|
||||
#define E5_SERIAL_RX_PIN EXP1_07_PIN
|
||||
#endif
|
||||
|
||||
// M3 on Driver Expansion Module
|
||||
#define E6_STEP_PIN EXP2_10_PIN
|
||||
#define E6_DIR_PIN EXP2_09_PIN
|
||||
#define E6_ENABLE_PIN EXP1_04_PIN
|
||||
#define E6_DIAG_PIN EXP1_10_PIN
|
||||
#define E6_CS_PIN EXP1_09_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E6_SERIAL_TX_PIN EXP1_09_PIN
|
||||
#define E6_SERIAL_RX_PIN EXP1_09_PIN
|
||||
#endif
|
||||
|
||||
#endif // BTT_MOTOR_EXPANSION
|
||||
|
||||
//
|
||||
// LCDs and Controllers
|
||||
//
|
||||
#if IS_TFTGLCD_PANEL
|
||||
|
||||
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||
#define TFTGLCD_CS EXP2_08_PIN
|
||||
#endif
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
||||
// CR10_STOCKDISPLAY default timing is too fast
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
//#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN EXP1_06_PIN // 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 EXP1_05_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN EXP1_04_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN EXP1_03_PIN
|
||||
#endif
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(120) // DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(80) // DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(580) // DELAY_NS(600)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// WIFI
|
||||
//
|
||||
|
||||
/**
|
||||
* -------
|
||||
* GND | 9 | | 8 | 3.3V
|
||||
* (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
|
||||
* 3.3V | 11 | | 6 | PB14 (ESP-MISO)
|
||||
* (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK)
|
||||
* (ESP-IO4) PD10 | 13 | | 4 | NC
|
||||
* NC | 14 | | 3 | PE15 (ESP-EN)
|
||||
* (ESP-RX) PD8 | 15 | | 2 | NC
|
||||
* (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST)
|
||||
* -------
|
||||
* WIFI
|
||||
*/
|
||||
#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
|
||||
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
|
||||
#define ESP_WIFI_MODULE_RESET_PIN PG7
|
||||
#define ESP_WIFI_MODULE_ENABLE_PIN PG8
|
||||
#define ESP_WIFI_MODULE_GPIO0_PIN PD7
|
||||
#define ESP_WIFI_MODULE_GPIO4_PIN PD10
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "BTT SKR Pro V1.1"
|
||||
|
||||
#include "pins_BTT_SKR_PRO_common.h"
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "BIGTREE SKR Pro V1.2 supports up to 3 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "BTT SKR Pro V1.2"
|
||||
|
||||
#include "pins_BTT_SKR_PRO_common.h"
|
||||
@@ -0,0 +1,488 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION
|
||||
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
|
||||
//#define BTT_MOTOR_EXPANSION
|
||||
|
||||
#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION)
|
||||
#if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
|
||||
#define EXP_MOT_USE_EXP2_ONLY 1
|
||||
#else
|
||||
#error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Use one of these or SDCard-based Emulation will be used
|
||||
#if NO_EEPROM_SELECTED
|
||||
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
|
||||
#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#endif
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PA1
|
||||
#define SERVO1_PIN PC9
|
||||
|
||||
//
|
||||
// Trinamic Stallguard pins
|
||||
//
|
||||
#define X_DIAG_PIN PB10 // X-
|
||||
#define Y_DIAG_PIN PE12 // Y-
|
||||
#define Z_DIAG_PIN PG8 // Z-
|
||||
#define E0_DIAG_PIN PE15 // E0
|
||||
#define E1_DIAG_PIN PE10 // E1
|
||||
#define E2_DIAG_PIN PG5 // E2
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#ifdef X_STALL_SENSITIVITY
|
||||
#define X_STOP_PIN X_DIAG_PIN
|
||||
#if X_HOME_TO_MIN
|
||||
#define X_MAX_PIN PE15 // E0
|
||||
#else
|
||||
#define X_MIN_PIN PE15 // E0
|
||||
#endif
|
||||
#else
|
||||
#define X_MIN_PIN PB10 // X-
|
||||
#define X_MAX_PIN PE15 // E0
|
||||
#endif
|
||||
|
||||
#ifdef Y_STALL_SENSITIVITY
|
||||
#define Y_STOP_PIN Y_DIAG_PIN
|
||||
#if Y_HOME_TO_MIN
|
||||
#define Y_MAX_PIN PE10 // E1
|
||||
#else
|
||||
#define Y_MIN_PIN PE10 // E1
|
||||
#endif
|
||||
#else
|
||||
#define Y_MIN_PIN PE12 // Y-
|
||||
#define Y_MAX_PIN PE10 // E1
|
||||
#endif
|
||||
|
||||
#ifdef Z_STALL_SENSITIVITY
|
||||
#define Z_STOP_PIN Z_DIAG_PIN
|
||||
#if Z_HOME_TO_MIN
|
||||
#define Z_MAX_PIN PG5 // E2
|
||||
#else
|
||||
#define Z_MIN_PIN PG5 // E2
|
||||
#endif
|
||||
#else
|
||||
#define Z_MIN_PIN PG8 // Z-
|
||||
#define Z_MAX_PIN PG5 // E2
|
||||
#endif
|
||||
|
||||
//
|
||||
// Z Probe must be this pin
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PA2
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PE15
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT2_PIN
|
||||
#define FIL_RUNOUT2_PIN PE10
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT3_PIN
|
||||
#define FIL_RUNOUT3_PIN PG5
|
||||
#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_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN FAN1_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION LCD
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ----- -----
|
||||
* NC | 1 2 | GND 5V | 1 2 | GND
|
||||
* RESET | 3 4 | PF12(SD_DETECT) (LCD_D7) PG7 | 3 4 | PG6 (LCD_D6)
|
||||
* (MOSI)PB15 | 5 6 PF11(BTN_EN2) (LCD_D5) PG3 | 5 6 PG2 (LCD_D4)
|
||||
* (SD_SS)PB12 | 7 8 | PG10(BTN_EN1) (LCD_RS) PD10 | 7 8 | PD11 (LCD_EN)
|
||||
* (SCK)PB13 | 9 10| PB14(MISO) (BTN_ENC) PA8 | 9 10| PG4 (BEEPER)
|
||||
* ----- -----
|
||||
* EXP2 EXP1
|
||||
*/
|
||||
|
||||
#define EXP1_03_PIN PG7
|
||||
#define EXP1_04_PIN PG6
|
||||
#define EXP1_05_PIN PG3
|
||||
#define EXP1_06_PIN PG2
|
||||
#define EXP1_07_PIN PD10
|
||||
#define EXP1_08_PIN PD11
|
||||
#define EXP1_09_PIN PA8
|
||||
#define EXP1_10_PIN PG4
|
||||
|
||||
#define EXP2_03_PIN -1
|
||||
#define EXP2_04_PIN PF12
|
||||
#define EXP2_05_PIN PB15
|
||||
#define EXP2_06_PIN PF11
|
||||
#define EXP2_07_PIN PB12
|
||||
#define EXP2_08_PIN PG10
|
||||
#define EXP2_09_PIN PB13
|
||||
#define EXP2_10_PIN PB14
|
||||
|
||||
//
|
||||
// Onboard SD card
|
||||
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
|
||||
//
|
||||
#if SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define SD_DETECT_PIN EXP2_04_PIN
|
||||
#define SDSS EXP2_07_PIN
|
||||
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
|
||||
// The SKR Pro's ONBOARD SD interface is on SPI1.
|
||||
// Due to a pull resistor on the clock line, it needs to use SPI Data Mode 3 to
|
||||
// function with Hardware SPI. This is not currently configurable in the HAL,
|
||||
// so force Software SPI to work around this issue.
|
||||
#define SOFTWARE_SPI
|
||||
#define SDSS PA4
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PB5
|
||||
#define SD_DETECT_PIN PB11
|
||||
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BTT_MOTOR_EXPANSION)
|
||||
/** _____ _____
|
||||
* NC | . . | GND NC | . . | GND
|
||||
* NC | . . | M1EN M2EN | . . | M3EN
|
||||
* M1STP | . . M1DIR M1RX | . . M1DIAG
|
||||
* M2DIR | . . | M2STP M2RX | . . | M2DIAG
|
||||
* M3DIR | . . | M3STP M3RX | . . | M3DIAG
|
||||
* ----- -----
|
||||
* EXP2 EXP1
|
||||
*
|
||||
* NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
|
||||
*/
|
||||
|
||||
// M1 on Driver Expansion Module
|
||||
#define E3_STEP_PIN EXP2_05_PIN
|
||||
#define E3_DIR_PIN EXP2_06_PIN
|
||||
#define E3_ENABLE_PIN EXP2_04_PIN
|
||||
#if !EXP_MOT_USE_EXP2_ONLY
|
||||
#define E3_DIAG_PIN EXP1_06_PIN
|
||||
#define E3_CS_PIN EXP1_05_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E3_SERIAL_TX_PIN EXP1_05_PIN
|
||||
#define E3_SERIAL_RX_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// M2 on Driver Expansion Module
|
||||
#define E4_STEP_PIN EXP2_08_PIN
|
||||
#define E4_DIR_PIN EXP2_07_PIN
|
||||
#if !EXP_MOT_USE_EXP2_ONLY
|
||||
#define E4_ENABLE_PIN EXP1_03_PIN
|
||||
#define E4_DIAG_PIN EXP1_08_PIN
|
||||
#define E4_CS_PIN EXP1_07_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E4_SERIAL_TX_PIN EXP1_07_PIN
|
||||
#define E4_SERIAL_RX_PIN EXP1_07_PIN
|
||||
#endif
|
||||
#else
|
||||
#define E4_ENABLE_PIN EXP2_04_PIN
|
||||
#endif
|
||||
|
||||
// M3 on Driver Expansion Module
|
||||
#define E5_STEP_PIN EXP2_10_PIN
|
||||
#define E5_DIR_PIN EXP2_09_PIN
|
||||
#if !EXP_MOT_USE_EXP2_ONLY
|
||||
#define E5_ENABLE_PIN EXP1_04_PIN
|
||||
#define E5_DIAG_PIN EXP1_10_PIN
|
||||
#define E5_CS_PIN EXP1_09_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E5_SERIAL_TX_PIN EXP1_09_PIN
|
||||
#define E5_SERIAL_RX_PIN EXP1_09_PIN
|
||||
#endif
|
||||
#else
|
||||
#define E5_ENABLE_PIN EXP2_04_PIN
|
||||
#endif
|
||||
|
||||
#endif // BTT_MOTOR_EXPANSION
|
||||
|
||||
//
|
||||
// LCDs and Controllers
|
||||
//
|
||||
#if IS_TFTGLCD_PANEL
|
||||
|
||||
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||
#define TFTGLCD_CS EXP2_08_PIN
|
||||
#endif
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
||||
// CR10_STOCKDISPLAY default timing is too fast
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864)
|
||||
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define DOGLCD_CS EXP1_05_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
//#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN EXP1_06_PIN // 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 EXP1_05_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN EXP1_04_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN EXP1_03_PIN
|
||||
#endif
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(90)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// WIFI
|
||||
//
|
||||
|
||||
/**
|
||||
* -----
|
||||
* TX | 1 2 | GND Enable PG1 // Must be high for module to run
|
||||
* Enable | 3 4 | GPIO2 Reset PG0 // active low, probably OK to leave floating
|
||||
* Reset | 5 6 | GPIO0 GPIO2 PF15 // must be high (ESP3D software configures this with a pullup so OK to leave as floating)
|
||||
* 3.3V | 7 8 | RX GPIO0 PF14 // Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
|
||||
* -----
|
||||
* W1
|
||||
*/
|
||||
#define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
|
||||
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
|
||||
#define ESP_WIFI_MODULE_RESET_PIN PG0
|
||||
#define ESP_WIFI_MODULE_ENABLE_PIN PG1
|
||||
#define ESP_WIFI_MODULE_GPIO0_PIN PF14
|
||||
#define ESP_WIFI_MODULE_GPIO2_PIN PF15
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define BOARD_INFO_NAME "BTT SKR V2 Rev.A"
|
||||
|
||||
#error "SKR V2 Rev.A requires modification or drivers may be damaged. See https://bit.ly/3t5d9JQ for more information. Comment out this line to continue."
|
||||
#define DISABLE_DRIVER_SAFE_POWER_PROTECT
|
||||
|
||||
#include "pins_BTT_SKR_V2_0_common.h"
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define BOARD_INFO_NAME "BTT SKR V2 Rev.B"
|
||||
|
||||
#include "pins_BTT_SKR_V2_0_common.h"
|
||||
@@ -0,0 +1,536 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION
|
||||
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
|
||||
//#define BTT_MOTOR_EXPANSION
|
||||
|
||||
#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION)
|
||||
#if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
|
||||
#define EXP_MOT_USE_EXP2_ONLY 1
|
||||
#else
|
||||
#error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Use one of these or SDCard-based Emulation will be used
|
||||
#if NO_EEPROM_SELECTED
|
||||
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
|
||||
#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#endif
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
// Avoid conflict with TIMER_TONE
|
||||
#define STEP_TIMER 10
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PE5
|
||||
|
||||
//
|
||||
// Trinamic Stallguard pins
|
||||
//
|
||||
#define X_DIAG_PIN PC1 // X-STOP
|
||||
#define Y_DIAG_PIN PC3 // Y-STOP
|
||||
#define Z_DIAG_PIN PC0 // Z-STOP
|
||||
#define E0_DIAG_PIN PC2 // E0DET
|
||||
#define E1_DIAG_PIN PA0 // E1DET
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#ifdef X_STALL_SENSITIVITY
|
||||
#define X_STOP_PIN X_DIAG_PIN
|
||||
#if X_HOME_TO_MIN
|
||||
#define X_MAX_PIN PC2 // E0DET
|
||||
#else
|
||||
#define X_MIN_PIN PC2 // E0DET
|
||||
#endif
|
||||
#elif ENABLED(X_DUAL_ENDSTOPS)
|
||||
#ifndef X_MIN_PIN
|
||||
#define X_MIN_PIN PC1 // X-STOP
|
||||
#endif
|
||||
#ifndef X_MAX_PIN
|
||||
#define X_MAX_PIN PC2 // E0DET
|
||||
#endif
|
||||
#else
|
||||
#define X_STOP_PIN PC1 // X-STOP
|
||||
#endif
|
||||
|
||||
#ifdef Y_STALL_SENSITIVITY
|
||||
#define Y_STOP_PIN Y_DIAG_PIN
|
||||
#if Y_HOME_TO_MIN
|
||||
#define Y_MAX_PIN PA0 // E1DET
|
||||
#else
|
||||
#define Y_MIN_PIN PA0 // E1DET
|
||||
#endif
|
||||
#elif ENABLED(Y_DUAL_ENDSTOPS)
|
||||
#ifndef Y_MIN_PIN
|
||||
#define Y_MIN_PIN PC3 // Y-STOP
|
||||
#endif
|
||||
#ifndef Y_MAX_PIN
|
||||
#define Y_MAX_PIN PA0 // E1DET
|
||||
#endif
|
||||
#else
|
||||
#define Y_STOP_PIN PC3 // Y-STOP
|
||||
#endif
|
||||
|
||||
#ifdef Z_STALL_SENSITIVITY
|
||||
#define Z_STOP_PIN Z_DIAG_PIN
|
||||
#if Z_HOME_TO_MIN
|
||||
#define Z_MAX_PIN PC15 // PWRDET
|
||||
#else
|
||||
#define Z_MIN_PIN PC15 // PWRDET
|
||||
#endif
|
||||
#elif ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#ifndef Z_MIN_PIN
|
||||
#define Z_MIN_PIN PC0 // Z-STOP
|
||||
#endif
|
||||
#ifndef Z_MAX_PIN
|
||||
#define Z_MAX_PIN PC15 // PWRDET
|
||||
#endif
|
||||
#else
|
||||
#ifndef Z_STOP_PIN
|
||||
#define Z_STOP_PIN PC0 // Z-STOP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PE4
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#define FIL_RUNOUT_PIN PC2 // E0DET
|
||||
#define FIL_RUNOUT2_PIN PA0 // E1DET
|
||||
|
||||
//
|
||||
// Power Supply Control
|
||||
//
|
||||
#ifndef PS_ON_PIN
|
||||
#define PS_ON_PIN PE8 // PS-ON
|
||||
#endif
|
||||
|
||||
//
|
||||
// Power Loss Detection
|
||||
//
|
||||
#ifndef POWER_LOSS_PIN
|
||||
#define POWER_LOSS_PIN PC15 // PWRDET
|
||||
#endif
|
||||
|
||||
//
|
||||
// NeoPixel LED
|
||||
//
|
||||
#ifndef NEOPIXEL_PIN
|
||||
#define NEOPIXEL_PIN PE6
|
||||
#endif
|
||||
|
||||
//
|
||||
// Control pin of driver/heater/fan power supply
|
||||
//
|
||||
#define SAFE_POWER_PIN PC13
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PE2
|
||||
#define X_DIR_PIN PE1
|
||||
#define X_ENABLE_PIN PE3
|
||||
#ifndef X_CS_PIN
|
||||
#define X_CS_PIN PE0
|
||||
#endif
|
||||
|
||||
#define Y_STEP_PIN PD5
|
||||
#define Y_DIR_PIN PD4
|
||||
#define Y_ENABLE_PIN PD6
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN PD3
|
||||
#endif
|
||||
|
||||
#define Z_STEP_PIN PA15
|
||||
#define Z_DIR_PIN PA8
|
||||
#define Z_ENABLE_PIN PD1
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN PD0
|
||||
#endif
|
||||
|
||||
#define E0_STEP_PIN PD15
|
||||
#define E0_DIR_PIN PD14
|
||||
#define E0_ENABLE_PIN PC7
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN PC6
|
||||
#endif
|
||||
|
||||
#define E1_STEP_PIN PD11
|
||||
#define E1_DIR_PIN PD10
|
||||
#define E1_ENABLE_PIN PD13
|
||||
#ifndef E1_CS_PIN
|
||||
#define E1_CS_PIN PD12
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_BED_PIN PA1 // TB
|
||||
#define TEMP_0_PIN PA2 // TH0
|
||||
#define TEMP_1_PIN PA3 // TH1
|
||||
|
||||
#if HOTENDS == 1
|
||||
#if TEMP_SENSOR_PROBE
|
||||
#define TEMP_PROBE_PIN TEMP_1_PIN
|
||||
#elif TEMP_SENSOR_CHAMBER
|
||||
#define TEMP_CHAMBER_PIN TEMP_1_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#ifndef HEATER_0_PIN
|
||||
#define HEATER_0_PIN PB3 // Heater0
|
||||
#endif
|
||||
#ifndef HEATER_1_PIN
|
||||
#define HEATER_1_PIN PB4 // Heater1
|
||||
#endif
|
||||
#ifndef HEATER_BED_PIN
|
||||
#define HEATER_BED_PIN PD7 // Hotbed
|
||||
#endif
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PB7 // Fan0
|
||||
#endif
|
||||
#ifndef FAN1_PIN
|
||||
#define FAN1_PIN PB6 // Fan1
|
||||
#endif
|
||||
#ifndef FAN2_PIN
|
||||
#define FAN2_PIN PB5 // Fan2
|
||||
#endif
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
//
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PE14
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PA14
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PE15
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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 PE0
|
||||
#define X_SERIAL_RX_PIN PE0
|
||||
|
||||
#define Y_SERIAL_TX_PIN PD3
|
||||
#define Y_SERIAL_RX_PIN PD3
|
||||
|
||||
#define Z_SERIAL_TX_PIN PD0
|
||||
#define Z_SERIAL_RX_PIN PD0
|
||||
|
||||
#define E0_SERIAL_TX_PIN PC6
|
||||
#define E0_SERIAL_RX_PIN PC6
|
||||
|
||||
#define E1_SERIAL_TX_PIN PD12
|
||||
#define E1_SERIAL_RX_PIN PD12
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Connection
|
||||
//
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION LCD
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ----- -----
|
||||
* NC | 1 2 | GND 5V | 1 2 | GND
|
||||
* RESET | 3 4 | PC4 (SD_DETECT) (LCD_D7) PE13 | 3 4 | PE12 (LCD_D6)
|
||||
* (MOSI) PA7 | 5 6 PB2 (BTN_EN2) (LCD_D5) PE11 | 5 6 PE10 (LCD_D4)
|
||||
* (SD_SS) PA4 | 7 8 | PE7 (BTN_EN1) (LCD_RS) PE9 | 7 8 | PB1 (LCD_EN)
|
||||
* (SCK) PA5 | 9 10| PA6 (MISO) (BTN_ENC) PB0 | 9 10| PC5 (BEEPER)
|
||||
* ----- -----
|
||||
* EXP2 EXP1
|
||||
*/
|
||||
|
||||
#define EXP1_03_PIN PE13
|
||||
#define EXP1_04_PIN PE12
|
||||
#define EXP1_05_PIN PE11
|
||||
#define EXP1_06_PIN PE10
|
||||
#define EXP1_07_PIN PE9
|
||||
#define EXP1_08_PIN PB1
|
||||
#define EXP1_09_PIN PB0
|
||||
#define EXP1_10_PIN PC5
|
||||
|
||||
#define EXP2_03_PIN -1
|
||||
#define EXP2_04_PIN PC4
|
||||
#define EXP2_05_PIN PA7
|
||||
#define EXP2_06_PIN PB2
|
||||
#define EXP2_07_PIN PA4
|
||||
#define EXP2_08_PIN PE7
|
||||
#define EXP2_09_PIN PA5
|
||||
#define EXP2_10_PIN PA6
|
||||
|
||||
//
|
||||
// Onboard SD card
|
||||
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
|
||||
//
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#define 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
|
||||
|
||||
#elif SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SDSS PA4
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PC4
|
||||
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BTT_MOTOR_EXPANSION)
|
||||
/** _____ _____
|
||||
* NC | . . | GND NC | . . | GND
|
||||
* NC | . . | M1EN M2EN | . . | M3EN
|
||||
* M1STP | . . M1DIR M1RX | . . M1DIAG
|
||||
* M2DIR | . . | M2STP M2RX | . . | M2DIAG
|
||||
* M3DIR | . . | M3STP M3RX | . . | M3DIAG
|
||||
* ----- -----
|
||||
* EXP2 EXP1
|
||||
*
|
||||
* NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
|
||||
*/
|
||||
|
||||
// M1 on Driver Expansion Module
|
||||
#define E2_STEP_PIN EXP2_05_PIN
|
||||
#define E2_DIR_PIN EXP2_06_PIN
|
||||
#define E2_ENABLE_PIN EXP2_04_PIN
|
||||
#if !EXP_MOT_USE_EXP2_ONLY
|
||||
#define E2_DIAG_PIN EXP1_06_PIN
|
||||
#define E2_CS_PIN EXP1_05_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E2_SERIAL_TX_PIN EXP1_05_PIN
|
||||
#define E2_SERIAL_RX_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// M2 on Driver Expansion Module
|
||||
#define E3_STEP_PIN EXP2_08_PIN
|
||||
#define E3_DIR_PIN EXP2_07_PIN
|
||||
#if !EXP_MOT_USE_EXP2_ONLY
|
||||
#define E3_ENABLE_PIN EXP1_03_PIN
|
||||
#define E3_DIAG_PIN EXP1_08_PIN
|
||||
#define E3_CS_PIN EXP1_07_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E3_SERIAL_TX_PIN EXP1_07_PIN
|
||||
#define E3_SERIAL_RX_PIN EXP1_07_PIN
|
||||
#endif
|
||||
#else
|
||||
#define E3_ENABLE_PIN EXP2_04_PIN
|
||||
#endif
|
||||
|
||||
// M3 on Driver Expansion Module
|
||||
#define E4_STEP_PIN EXP2_10_PIN
|
||||
#define E4_DIR_PIN EXP2_09_PIN
|
||||
#if !EXP_MOT_USE_EXP2_ONLY
|
||||
#define E4_ENABLE_PIN EXP1_04_PIN
|
||||
#define E4_DIAG_PIN EXP1_10_PIN
|
||||
#define E4_CS_PIN EXP1_09_PIN
|
||||
#if HAS_TMC_UART
|
||||
#define E4_SERIAL_TX_PIN EXP1_09_PIN
|
||||
#define E4_SERIAL_RX_PIN EXP1_09_PIN
|
||||
#endif
|
||||
#else
|
||||
#define E4_ENABLE_PIN EXP2_04_PIN
|
||||
#endif
|
||||
|
||||
#endif // BTT_MOTOR_EXPANSION
|
||||
|
||||
//
|
||||
// LCDs and Controllers
|
||||
//
|
||||
#if IS_TFTGLCD_PANEL
|
||||
|
||||
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||
#define TFTGLCD_CS EXP2_08_PIN
|
||||
#endif
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
||||
// CR10_STOCKDISPLAY default timing is too fast
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864)
|
||||
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define DOGLCD_CS EXP1_05_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
//#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN EXP1_06_PIN // 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 EXP1_05_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN EXP1_04_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN EXP1_03_PIN
|
||||
#endif
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(120)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(80)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(580)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// WIFI
|
||||
//
|
||||
|
||||
/**
|
||||
* -------
|
||||
* GND | 9 | | 8 | 3.3V
|
||||
* (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
|
||||
* 3.3V | 11 | | 6 | PB14 (ESP-MISO)
|
||||
* (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK)
|
||||
* (ESP-IO4) PB11 | 13 | | 4 | NC
|
||||
* NC | 14 | | 3 | 3.3V (ESP-EN)
|
||||
* (ESP-RX) PD8 | 15 | | 2 | NC
|
||||
* (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST)
|
||||
* -------
|
||||
* WIFI
|
||||
*/
|
||||
#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
|
||||
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
|
||||
#define ESP_WIFI_MODULE_RESET_PIN PC14
|
||||
#define ESP_WIFI_MODULE_GPIO0_PIN PB10
|
||||
#define ESP_WIFI_MODULE_GPIO4_PIN PB11
|
||||
@@ -0,0 +1,235 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creality S1 (STM32F401RCT6) board pin assignments
|
||||
*/
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Creality S1 only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "CR-FDM-V24S1-301"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "Ender 3 S1"
|
||||
#endif
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
//#if NO_EEPROM_SELECTED
|
||||
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
//#endif
|
||||
|
||||
#if ENABLED(IIC_BL24CXX_EEPROM)
|
||||
#define IIC_EEPROM_SDA PA11
|
||||
#define IIC_EEPROM_SCL PA12
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
||||
#elif ENABLED(SDCARD_EEPROM_EMULATION)
|
||||
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PA5
|
||||
#define Y_STOP_PIN PA6
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
#define Z_STOP_PIN PC14 // BLTouch IN
|
||||
#define SERVO0_PIN PC13 // BLTouch OUT
|
||||
#elif ENABLED(PROBE_TARE)
|
||||
#define Z_STOP_PIN PC14
|
||||
#define PROBE_TARE_PIN PC13
|
||||
// #define PROBE_ACTIVATION_SWITCH_PIN PB2
|
||||
#else
|
||||
#define Z_STOP_PIN PA15
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Runout Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PC15 // "Pulled-high"
|
||||
#endif
|
||||
|
||||
// Filament check pins
|
||||
#define HAS_CHECKFILAMENT
|
||||
#if ENABLED(HAS_CHECKFILAMENT)
|
||||
#define CHECKFILAMENT_PIN PC15
|
||||
#endif
|
||||
|
||||
// Backpower
|
||||
#ifndef BACKPOWER_CTRL_PIN
|
||||
// When the ADC detects that the 24V power supply is lower than 20V, save the continuation data first and then PA4=1
|
||||
#define BACKPOWER_CTRL_PIN PA4
|
||||
#endif
|
||||
|
||||
#ifndef CHECK_24V_PIN
|
||||
#define POWER_DETECTION_PIN PB0 // Detect the ADC input pin of 24V power supply
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC3
|
||||
#ifndef X_STEP_PIN
|
||||
#define X_STEP_PIN PC2
|
||||
#endif
|
||||
#ifndef X_DIR_PIN
|
||||
#define X_DIR_PIN PB9
|
||||
#endif
|
||||
|
||||
#define Y_ENABLE_PIN PC3
|
||||
#ifndef Y_STEP_PIN
|
||||
#define Y_STEP_PIN PB8
|
||||
#endif
|
||||
#ifndef Y_DIR_PIN
|
||||
#define Y_DIR_PIN PB7
|
||||
#endif
|
||||
|
||||
#define Z_ENABLE_PIN PC3
|
||||
#ifndef Z_STEP_PIN
|
||||
#define Z_STEP_PIN PB6
|
||||
#endif
|
||||
#ifndef Z_DIR_PIN
|
||||
#define Z_DIR_PIN PB5
|
||||
#endif
|
||||
|
||||
#define E0_ENABLE_PIN PC3
|
||||
#ifndef E0_STEP_PIN
|
||||
#define E0_STEP_PIN PB4
|
||||
#endif
|
||||
#ifndef E0_DIR_PIN
|
||||
#define E0_DIR_PIN PB3
|
||||
#endif
|
||||
|
||||
//
|
||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||
//
|
||||
//#define DISABLE_DEBUG
|
||||
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC5 // TH1
|
||||
#define TEMP_BED_PIN PC4 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA1 // HEATER1
|
||||
#define HEATER_BED_PIN PA7 // HOT BED
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PA0 // FAN
|
||||
#endif
|
||||
#if PIN_EXISTS(FAN)
|
||||
#define FAN_SOFT_PWM
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
|
||||
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
|
||||
#endif
|
||||
|
||||
#if ENABLED(RET6_12864_LCD)
|
||||
|
||||
// RET6 12864 LCD
|
||||
#define LCD_PINS_RS PB12
|
||||
#define LCD_PINS_ENABLE PB15
|
||||
#define LCD_PINS_D4 PB13
|
||||
|
||||
#define BTN_ENC PB2
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PB14
|
||||
|
||||
#ifndef HAS_PIN_27_BOARD
|
||||
#define BEEPER_PIN PC6
|
||||
#endif
|
||||
|
||||
#elif ENABLED(VET6_12864_LCD)
|
||||
|
||||
// VET6 12864 LCD
|
||||
#define LCD_PINS_RS PA4
|
||||
//#define LCD_PINS_ENABLE PA7
|
||||
#define LCD_PINS_D4 PA5
|
||||
|
||||
#define BTN_ENC PC5
|
||||
#define BTN_EN1 PB10
|
||||
#define BTN_EN2 PA6
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
|
||||
// RET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PB14
|
||||
#define BTN_EN1 PB15
|
||||
#define BTN_EN2 PB12
|
||||
|
||||
//#define LCD_LED_PIN PB2
|
||||
#ifndef BEEPER_PIN
|
||||
#define BEEPER_PIN PB13
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
|
||||
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
|
||||
|
||||
// VET6 DWIN ENCODER LCD
|
||||
#define BTN_ENC PA6
|
||||
//#define BTN_EN1 PA7
|
||||
#define BTN_EN2 PA4
|
||||
|
||||
#define BEEPER_PIN PA5
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// M3/M4/M5 - Spindle/Laser Control
|
||||
//
|
||||
#if HAS_CUTTER
|
||||
// #undef HEATER_0_PIN
|
||||
// #undef HEATER_BED_PIN
|
||||
// #undef FAN_PIN
|
||||
// #define SPINDLE_LASER_ENA_PIN PC0 // FET 1
|
||||
// #define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
|
||||
// #define SPINDLE_DIR_PIN PC0 // FET 4
|
||||
#define SPINDLE_LASER_ENA_PIN PC0 // FET 1
|
||||
#define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
|
||||
#define SPINDLE_DIR_PIN PC0 // FET 4
|
||||
|
||||
#define LASER_SOFT_PWM_PIN PC0 // Laser soft PWM pin
|
||||
#endif
|
||||
@@ -0,0 +1,297 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if 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
|
||||
|
||||
// Avoid conflict with fans and TIMER_TONE
|
||||
#define TEMP_TIMER 3
|
||||
#define STEP_TIMER 5
|
||||
|
||||
//
|
||||
// EEPROM Emulation
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SRAM_EEPROM_EMULATION
|
||||
//#define I2C_EEPROM
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across
|
||||
// the 128kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#elif ENABLED(I2C_EEPROM)
|
||||
#define MARLIN_EEPROM_SIZE 0x2000 // 8KB
|
||||
#endif
|
||||
|
||||
#ifndef MARLIN_EEPROM_SIZE
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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 PE3
|
||||
#define HEATER_BED_PIN PE2
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PF8
|
||||
#endif
|
||||
#define FAN1_PIN PF9
|
||||
#define FAN2_PIN PA2
|
||||
#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
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(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 SD_SCK_PIN SDIO_CK_PIN
|
||||
#define SD_MISO_PIN SDIO_D0_PIN
|
||||
#define SD_MOSI_PIN SDIO_CMD_PIN
|
||||
#endif
|
||||
|
||||
#elif SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
#define SDSS PF11
|
||||
#define SD_DETECT_PIN PB2
|
||||
|
||||
#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_TMC_UART
|
||||
#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 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 BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
@@ -0,0 +1,269 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#define DEFAULT_MACHINE_NAME "3D Printer"
|
||||
|
||||
#define BOARD_INFO_NAME "FYSETC Cheetah V2.0"
|
||||
#define BOARD_WEBSITE_URL "fysetc.com"
|
||||
|
||||
// USB Flash Drive support
|
||||
//#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
// Ignore temp readings during development.
|
||||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
|
||||
#define FLASH_SECTOR 2
|
||||
#define FLASH_UNIT_SIZE 0x4000 // 16k
|
||||
#define FLASH_ADDRESS_START 0x8008000
|
||||
#endif
|
||||
|
||||
//
|
||||
// Z Probe
|
||||
//
|
||||
#if ENABLED(BLTOUCH)
|
||||
#error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed."
|
||||
#define SERVO0_PIN PA0
|
||||
#elif !defined(Z_MIN_PROBE_PIN)
|
||||
#define Z_MIN_PROBE_PIN PA0
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PB4
|
||||
#define Y_STOP_PIN PB3
|
||||
#define Z_STOP_PIN PB1
|
||||
|
||||
//
|
||||
// Filament runout
|
||||
//
|
||||
#define FIL_RUNOUT_PIN PB5
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PC0
|
||||
#define X_DIR_PIN PC1
|
||||
#define X_ENABLE_PIN PA8
|
||||
|
||||
#define Y_STEP_PIN PC14
|
||||
#define Y_DIR_PIN PC13
|
||||
#define Y_ENABLE_PIN PC15
|
||||
|
||||
#define Z_STEP_PIN PB9
|
||||
#define Z_DIR_PIN PB8
|
||||
#define Z_ENABLE_PIN PC2
|
||||
|
||||
#define E0_STEP_PIN PB2
|
||||
#define E0_DIR_PIN PA15
|
||||
#define E0_ENABLE_PIN PD2
|
||||
|
||||
#if HAS_TMC_UART
|
||||
#define X_HARDWARE_SERIAL Serial2
|
||||
#define Y_HARDWARE_SERIAL Serial2
|
||||
#define Z_HARDWARE_SERIAL Serial2
|
||||
#define E0_HARDWARE_SERIAL Serial2
|
||||
|
||||
// Default TMC slave addresses
|
||||
#ifndef X_SLAVE_ADDRESS
|
||||
#define X_SLAVE_ADDRESS 0
|
||||
#endif
|
||||
#ifndef Y_SLAVE_ADDRESS
|
||||
#define Y_SLAVE_ADDRESS 2
|
||||
#endif
|
||||
#ifndef Z_SLAVE_ADDRESS
|
||||
#define Z_SLAVE_ADDRESS 1
|
||||
#endif
|
||||
#ifndef E0_SLAVE_ADDRESS
|
||||
#define E0_SLAVE_ADDRESS 3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PC6
|
||||
#define HEATER_BED_PIN PC7
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PA1
|
||||
#endif
|
||||
#define FAN1_PIN PC8
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_BED_PIN PC5 // Analog Input
|
||||
#define TEMP_0_PIN PC4 // Analog Input
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define SDSS PA4
|
||||
#define SD_DETECT_PIN PC3
|
||||
|
||||
#ifndef RGB_LED_R_PIN
|
||||
#define RGB_LED_R_PIN PB0
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN PB7
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN PB6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* _____ _____
|
||||
* 5V | 1 2 | GND 5V | 1 2 | GND
|
||||
* RESET | 3 4 | PC3 (SD_DETECT) (LCD_D7) PB7 | 3 4 | PB6 (LCD_D6)
|
||||
* (SD_MOSI) PA7 5 6 | PC11 (BTN_EN2) (LCD_D5) PB14 5 6 | PB13 (LCD_D4)
|
||||
* (SD_SS) PA4 | 7 8 | PC10 (BTN_EN1) (LCD_RS) PB12 | 7 8 | PB15 (LCD_EN)
|
||||
* (SD_SCK) PA5 | 9 10| PA6 (SD_MISO) (BTN_ENC) PC12 | 9 10| PC9 (BEEPER)
|
||||
* ----- -----
|
||||
* EXP2 EXP1
|
||||
*/
|
||||
|
||||
/**
|
||||
* _____
|
||||
* (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC)
|
||||
* (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO)
|
||||
* (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK)
|
||||
* (LCD_RS) PB12 | 7 8 | PB15 (LCD_EN/MOSI)
|
||||
* GND | 9 10| 5V
|
||||
* -----
|
||||
* EXP3
|
||||
*/
|
||||
|
||||
#define EXP1_03_PIN PB7
|
||||
#define EXP1_04_PIN PB6
|
||||
#define EXP1_05_PIN PB14
|
||||
#define EXP1_06_PIN PB13
|
||||
#define EXP1_07_PIN PB12
|
||||
#define EXP1_08_PIN PB15
|
||||
#define EXP1_09_PIN PC12
|
||||
#define EXP1_10_PIN PC9
|
||||
|
||||
#define EXP2_03_PIN -1
|
||||
#define EXP2_04_PIN PC3
|
||||
#define EXP2_05_PIN PA7
|
||||
#define EXP2_06_PIN PC11
|
||||
#define EXP2_07_PIN PA4
|
||||
#define EXP2_08_PIN PC10
|
||||
#define EXP2_09_PIN PA5
|
||||
#define EXP2_10_PIN PA6
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
// CR10_STOCKDISPLAY default timing is too fast
|
||||
#undef BOARD_ST7920_DELAY_1
|
||||
#undef BOARD_ST7920_DELAY_2
|
||||
#undef BOARD_ST7920_DELAY_3
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864)
|
||||
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define DOGLCD_CS EXP1_05_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_06_PIN
|
||||
#define BTN_EN2 EXP2_08_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
//#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN EXP1_06_PIN // 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 EXP1_05_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN EXP1_04_PIN
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN EXP1_03_PIN
|
||||
#endif
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#endif
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_UI_FTDI_EVE)
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define CLCD_MOD_RESET EXP2_08_PIN
|
||||
#define CLCD_SPI_CS EXP2_06_PIN
|
||||
#endif
|
||||
@@ -0,0 +1,314 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "FYSETC S6 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
|
||||
|
||||
// Avoid conflict with TIMER_TONE defined in variant
|
||||
#define STEP_TIMER 10
|
||||
|
||||
//
|
||||
// EEPROM Emulation
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define I2C_EEPROM
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#elif ENABLED(I2C_EEPROM)
|
||||
#define MARLIN_EEPROM_SIZE 0x0800 // 2KB
|
||||
#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
|
||||
#ifndef X_ENABLE_PIN
|
||||
#define X_ENABLE_PIN PE12
|
||||
#endif
|
||||
#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_TMC_UART
|
||||
//
|
||||
// TMC2208/TMC2209 stepper drivers
|
||||
//
|
||||
|
||||
//
|
||||
// Software serial
|
||||
//
|
||||
#ifndef X_SERIAL_TX_PIN
|
||||
#define X_SERIAL_TX_PIN PE9
|
||||
#endif
|
||||
#ifndef X_SERIAL_RX_PIN
|
||||
#define X_SERIAL_RX_PIN PE8
|
||||
#endif
|
||||
#ifndef Y_SERIAL_TX_PIN
|
||||
#define Y_SERIAL_TX_PIN PE14
|
||||
#endif
|
||||
#ifndef Y_SERIAL_RX_PIN
|
||||
#define Y_SERIAL_RX_PIN PE13
|
||||
#endif
|
||||
#ifndef Z_SERIAL_TX_PIN
|
||||
#define Z_SERIAL_TX_PIN PD11
|
||||
#endif
|
||||
#ifndef Z_SERIAL_RX_PIN
|
||||
#define Z_SERIAL_RX_PIN PD12
|
||||
#endif
|
||||
#ifndef E0_SERIAL_TX_PIN
|
||||
#define E0_SERIAL_TX_PIN PD3
|
||||
#endif
|
||||
#ifndef E0_SERIAL_RX_PIN
|
||||
#define E0_SERIAL_RX_PIN PA15
|
||||
#endif
|
||||
#ifndef E1_SERIAL_TX_PIN
|
||||
#define E1_SERIAL_TX_PIN PC4
|
||||
#endif
|
||||
#ifndef E1_SERIAL_RX_PIN
|
||||
#define E1_SERIAL_RX_PIN PC5
|
||||
#endif
|
||||
#ifndef E2_SERIAL_TX_PIN
|
||||
#define E2_SERIAL_TX_PIN PE1
|
||||
#endif
|
||||
#ifndef E2_SERIAL_RX_PIN
|
||||
#define E2_SERIAL_RX_PIN PE0
|
||||
#endif
|
||||
#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
|
||||
//
|
||||
#ifndef HEATER_0_PIN
|
||||
#define HEATER_0_PIN PB3
|
||||
#endif
|
||||
#ifndef HEATER_1_PIN
|
||||
#define HEATER_1_PIN PB4
|
||||
#endif
|
||||
#ifndef HEATER_2_PIN
|
||||
#define HEATER_2_PIN PB15
|
||||
#endif
|
||||
#ifndef HEATER_BED_PIN
|
||||
#define HEATER_BED_PIN PC8
|
||||
#endif
|
||||
|
||||
#define FAN_PIN PB0
|
||||
#define FAN1_PIN PB1
|
||||
#define FAN2_PIN PB2
|
||||
|
||||
//
|
||||
// SPI
|
||||
//
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_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 ENABLED(FYSETC_242_OLED_12864)
|
||||
|
||||
#define BTN_EN1 PC9
|
||||
#define BTN_EN2 PD1
|
||||
#define BTN_ENC PA8
|
||||
|
||||
#define BEEPER_PIN PC6
|
||||
|
||||
#define LCD_PINS_DC PC12
|
||||
#define LCD_PINS_RS PC7 // LCD_RST
|
||||
#define DOGLCD_CS PD2
|
||||
#define DOGLCD_MOSI PC10
|
||||
#define DOGLCD_SCK PC11
|
||||
#define DOGLCD_A0 LCD_PINS_DC
|
||||
#define FORCE_SOFT_SPI
|
||||
|
||||
#define KILL_PIN -1 // NC
|
||||
#define NEOPIXEL_PIN PD0
|
||||
|
||||
#elif HAS_WIRED_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
|
||||
|
||||
#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
|
||||
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 PC12
|
||||
#define LCD_PINS_D6 PD0
|
||||
#define LCD_PINS_D7 PD1
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(640)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#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
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define BOARD_INFO_NAME "FYSETC S6 2.0"
|
||||
|
||||
//
|
||||
// EEPROM Emulation
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#undef NO_EEPROM_SELECTED
|
||||
//#define FLASH_EEPROM_EMULATION
|
||||
#define I2C_EEPROM
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PE9
|
||||
|
||||
#if HAS_TMC_UART
|
||||
#define X_SERIAL_TX_PIN PE8
|
||||
#define Y_SERIAL_TX_PIN PC4
|
||||
#define Y_SERIAL_RX_PIN PC4
|
||||
#define Z_SERIAL_TX_PIN PD12
|
||||
#define E0_SERIAL_TX_PIN PA15
|
||||
#define E1_SERIAL_TX_PIN PC5
|
||||
#define E2_SERIAL_TX_PIN PE0
|
||||
#endif
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
//
|
||||
#define TMC_USE_SW_SPI
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PE14
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PE13
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PE12
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "pins_FYSETC_S6.h"
|
||||
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "FYSETC SPIDER"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM Emulation
|
||||
//
|
||||
#if NO_EEPROM_SELECTED
|
||||
#undef NO_EEPROM_SELECTED
|
||||
//#define FLASH_EEPROM_EMULATION
|
||||
//#define SRAM_EEPROM_EMULATION
|
||||
#define I2C_EEPROM
|
||||
#endif
|
||||
|
||||
#if ENABLED(I2C_EEPROM)
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X2_STEP_PIN PD12
|
||||
#define X2_DIR_PIN PC4
|
||||
#define X2_ENABLE_PIN PE8
|
||||
#define X2_CS_PIN PA15
|
||||
|
||||
#define Z2_STEP_PIN PE1
|
||||
#define Z2_DIR_PIN PE0
|
||||
#define Z2_ENABLE_PIN PC5
|
||||
#define Z2_CS_PIN PD11
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PB15
|
||||
#define HEATER_1_PIN PC8
|
||||
#define HEATER_2_PIN PB3
|
||||
#define HEATER_BED_PIN PB4
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PE9
|
||||
|
||||
#if HAS_TMC_UART
|
||||
#define X_SERIAL_TX_PIN PE7
|
||||
#define X_SERIAL_RX_PIN PE7
|
||||
#define Y_SERIAL_TX_PIN PE15
|
||||
#define Y_SERIAL_RX_PIN PE15
|
||||
#define Z_SERIAL_TX_PIN PD10
|
||||
#define Z_SERIAL_RX_PIN PD10
|
||||
#define E0_SERIAL_TX_PIN PD7
|
||||
#define E0_SERIAL_RX_PIN PD7
|
||||
#define E1_SERIAL_TX_PIN PC14
|
||||
#define E1_SERIAL_RX_PIN PC14
|
||||
#define E2_SERIAL_TX_PIN PC15
|
||||
#define E2_SERIAL_RX_PIN PC15
|
||||
#define X2_SERIAL_TX_PIN PA15
|
||||
#define X2_SERIAL_RX_PIN PA15
|
||||
#define Z2_SERIAL_TX_PIN PD11
|
||||
#define Z2_SERIAL_RX_PIN PD11
|
||||
#endif
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
//
|
||||
#define TMC_USE_SW_SPI
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PE14
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PE13
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PE12
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "FYSETC SPIDER supports up to 3 hotends / E-steppers."
|
||||
#else
|
||||
#include "pins_FYSETC_S6.h"
|
||||
#endif
|
||||
@@ -0,0 +1,255 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if 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"
|
||||
|
||||
// EEPROM
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define I2C_EEPROM
|
||||
#define SOFT_I2C_EEPROM // Force the use of Software I2C
|
||||
#define I2C_SCL_PIN PG14
|
||||
#define I2C_SDA_PIN PG13
|
||||
#define MARLIN_EEPROM_SIZE 0x10000
|
||||
#endif
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PB11
|
||||
|
||||
//
|
||||
// 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 PG6
|
||||
//#endif
|
||||
|
||||
//
|
||||
// Filament runout
|
||||
//
|
||||
#define FIL_RUNOUT_PIN PE5
|
||||
#define FIL_RUNOUT2_PIN PE6
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
//#define E2_STEP_PIN PF4 // best guess
|
||||
//#define E2_DIR_PIN PF3 // best guess
|
||||
//#define E2_ENABLE_PIN PF5 // best guess
|
||||
//#ifndef E2_CS_PIN
|
||||
// #define E2_CS_PIN PB2 // best guess
|
||||
//#endif
|
||||
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*/
|
||||
#ifndef X_SERIAL_TX_PIN
|
||||
#define X_SERIAL_TX_PIN PB2
|
||||
#endif
|
||||
#ifndef X_SERIAL_RX_PIN
|
||||
#define X_SERIAL_RX_PIN PB2
|
||||
#endif
|
||||
#ifndef Y_SERIAL_TX_PIN
|
||||
#define Y_SERIAL_TX_PIN PE2
|
||||
#endif
|
||||
#ifndef Y_SERIAL_RX_PIN
|
||||
#define Y_SERIAL_RX_PIN PE2
|
||||
#endif
|
||||
#ifndef Z_SERIAL_TX_PIN
|
||||
#define Z_SERIAL_TX_PIN PE3
|
||||
#endif
|
||||
#ifndef Z_SERIAL_RX_PIN
|
||||
#define Z_SERIAL_RX_PIN PE3
|
||||
#endif
|
||||
#ifndef E0_SERIAL_TX_PIN
|
||||
#define E0_SERIAL_TX_PIN PE4
|
||||
#endif
|
||||
#ifndef E0_SERIAL_RX_PIN
|
||||
#define E0_SERIAL_RX_PIN PE4
|
||||
#endif
|
||||
#ifndef E1_SERIAL_TX_PIN
|
||||
#define E1_SERIAL_TX_PIN PE1
|
||||
#endif
|
||||
#ifndef E1_SERIAL_RX_PIN
|
||||
#define E1_SERIAL_RX_PIN PE1
|
||||
#endif
|
||||
#ifndef EX_SERIAL_TX_PIN
|
||||
#define E2_SERIAL_TX_PIN PE0
|
||||
#endif
|
||||
#ifndef EX_SERIAL_RX_PIN
|
||||
#define E2_SERIAL_RX_PIN PE0
|
||||
#endif
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC1 // Analog Input
|
||||
#define TEMP_1_PIN PC2 // Analog Input
|
||||
#define TEMP_BED_PIN PC0 // Analog Input
|
||||
|
||||
// Lergde-K can choose thermocouple/thermistor mode in software.
|
||||
// For use with thermistors, these pins must be OUT/LOW.
|
||||
// This is done automatically.
|
||||
#define TEMP_0_TR_ENABLE_PIN PF10
|
||||
#define TEMP_1_TR_ENABLE_PIN PF9
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA1
|
||||
#define HEATER_1_PIN PA0
|
||||
#define HEATER_BED_PIN PA2
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PF7
|
||||
#endif
|
||||
|
||||
#define FAN1_PIN PF6
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN PB1
|
||||
#endif
|
||||
|
||||
#ifndef E1_AUTO_FAN_PIN
|
||||
#define E1_AUTO_FAN_PIN PB0
|
||||
#endif
|
||||
|
||||
#define CONTROLLER_FAN_PIN PF8
|
||||
|
||||
//
|
||||
// LED / Lighting
|
||||
//
|
||||
//#define CASE_LIGHT_PIN_CI -1
|
||||
//#define CASE_LIGHT_PIN_DO -1
|
||||
//#define NEOPIXEL_PIN -1
|
||||
#ifndef RGB_LED_R_PIN
|
||||
#define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires
|
||||
#endif
|
||||
#ifndef RGB_LED_G_PIN
|
||||
#define RGB_LED_G_PIN PB7
|
||||
#endif
|
||||
#ifndef RGB_LED_B_PIN
|
||||
#define RGB_LED_B_PIN PB9
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD support
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define SDIO_CLOCK 4800000
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define SDSS PC11
|
||||
#define LED_PIN PA15 // Alive
|
||||
#define PS_ON_PIN PA4
|
||||
#define KILL_PIN -1
|
||||
#define POWER_LOSS_PIN PA4 // Power-loss / nAC_FAULT
|
||||
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
#define SD_MOSI_PIN PD2
|
||||
#define SD_SS_PIN PC11
|
||||
|
||||
#define SD_DETECT_PIN PA8
|
||||
#define BEEPER_PIN PC7
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
|
||||
#if HAS_FSMC_TFT
|
||||
//#define TFT_DRIVER LERDGE_ST7796
|
||||
|
||||
#define TFT_RESET_PIN PD6
|
||||
#define TFT_BACKLIGHT_PIN PD3
|
||||
|
||||
#define TFT_CS_PIN PD7
|
||||
#define TFT_RS_PIN PD11
|
||||
|
||||
#define TOUCH_CS_PIN PG15
|
||||
#define TOUCH_SCK_PIN PB3
|
||||
#define TOUCH_MOSI_PIN PB5
|
||||
#define TOUCH_MISO_PIN PB4
|
||||
#endif
|
||||
|
||||
#if IS_NEWPANEL
|
||||
#define BTN_EN1 PG10
|
||||
#define BTN_EN2 PG11
|
||||
#define BTN_ENC PG9
|
||||
#endif
|
||||
@@ -0,0 +1,213 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "LERDGE S supports up to 2 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "Lerdge S"
|
||||
#define DEFAULT_MACHINE_NAME "LERDGE"
|
||||
|
||||
#define STEP_TIMER 4
|
||||
#define TEMP_TIMER 2
|
||||
|
||||
//#define I2C_EEPROM
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PD12
|
||||
//#define SERVO1_PIN -1
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_MIN_PIN PG9
|
||||
#define Y_MIN_PIN PG10
|
||||
#define Z_MIN_PIN PG11
|
||||
|
||||
#define X_MAX_PIN PG12
|
||||
#define Y_MAX_PIN PG13
|
||||
#define Z_MAX_PIN PG14
|
||||
|
||||
//
|
||||
// Filament runout
|
||||
//
|
||||
#define FIL_RUNOUT_PIN PC5
|
||||
|
||||
//
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PG8
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PF7
|
||||
#define X_DIR_PIN PF8
|
||||
#define X_ENABLE_PIN PF6
|
||||
|
||||
#define Y_STEP_PIN PF10
|
||||
#define Y_DIR_PIN PF11
|
||||
#define Y_ENABLE_PIN PF9
|
||||
|
||||
#define Z_STEP_PIN PF13
|
||||
#define Z_DIR_PIN PF14
|
||||
#define Z_ENABLE_PIN PF12
|
||||
|
||||
#define E0_STEP_PIN PG0
|
||||
#define E0_DIR_PIN PG1
|
||||
#define E0_ENABLE_PIN PF15
|
||||
|
||||
#define E1_STEP_PIN PG3
|
||||
#define E1_DIR_PIN PG4
|
||||
#define E1_ENABLE_PIN PG2
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC0 // See below for activation of thermistor readings
|
||||
#define TEMP_1_PIN PC1 // See below for activation of thermistor readings
|
||||
#define TEMP_BED_PIN PC3
|
||||
|
||||
// Lergde-S can choose thermocouple/thermistor mode in software.
|
||||
// For use with thermistors, these pins must be OUT/LOW.
|
||||
// This is done automatically.
|
||||
#define TEMP_0_TR_ENABLE_PIN PF3
|
||||
#define TEMP_1_TR_ENABLE_PIN PF4
|
||||
|
||||
// MAX6675 Cold-Junction-Compensated K-Thermocouple to Digital Converter (0°C to +1024°C)
|
||||
// https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
|
||||
|
||||
#define MAX6675_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested
|
||||
#define MAX6675_DO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested
|
||||
#define MAX6675_SS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong
|
||||
|
||||
// Expansion board with second max6675
|
||||
// Warning: Some boards leave the slot unpopulated.
|
||||
|
||||
//#define MAX6675_SCK2_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested
|
||||
//#define MAX6675_DO2_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested
|
||||
//#define MAX6675_SS2_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA0
|
||||
#define HEATER_1_PIN PA1
|
||||
#define HEATER_BED_PIN PA3
|
||||
|
||||
#define FAN_PIN PA15 // heater 0 fan 1
|
||||
#define FAN1_PIN PB10 // heater 1 fan 2
|
||||
#define FAN2_PIN PF5 // heater 0 fan 2 and heater 1 fan 1 (two sockets, switched together)
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN PF5
|
||||
#endif
|
||||
|
||||
//
|
||||
// Průša i3 MK2 Multi Material Multiplexer Support
|
||||
//
|
||||
//#define E_MUX0_PIN -1
|
||||
//#define E_MUX1_PIN -1
|
||||
|
||||
//
|
||||
// LED / Lighting
|
||||
//
|
||||
//Lerdge-S board has two LED connectors (this is the one on the mainboard)
|
||||
#define CASE_LIGHT_PIN PC7
|
||||
|
||||
//on the dual extrusion addon board is a RGB connector
|
||||
#define RGB_LED_R_PIN PC7 // Shared with the mainboard LED light connector (CASE_LIGHT_PIN)
|
||||
#define RGB_LED_G_PIN PB0
|
||||
#define RGB_LED_B_PIN PB1
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define SDSS PC11 // SD is working using SDIO, not sure if this definition is needed?
|
||||
#define LED_PIN PC6 // Mainboard soldered green LED
|
||||
#define PS_ON_PIN PB2 // Board has a power module connector
|
||||
#define KILL_PIN -1 // There is no reset button on the LCD
|
||||
#define POWER_LOSS_PIN -1 // PB2 could be used for this as well
|
||||
|
||||
//
|
||||
// SD support
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define SDIO_CLOCK 4800000
|
||||
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
#define SD_MOSI_PIN PD2
|
||||
#define SD_SS_PIN PC11
|
||||
|
||||
#define SD_DETECT_PIN PG15
|
||||
|
||||
//
|
||||
// Persistent Storage
|
||||
// If no option is selected below the SD Card will be used
|
||||
// (this section modelled after pins_LONGER3D_LK.h)
|
||||
// Warning: Not tested yet! Pins traced with multimeter, mistakes are possible
|
||||
//#define SPI_EEPROM
|
||||
|
||||
#if ENABLED(SPI_EEPROM)
|
||||
// Lerdge has an SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf
|
||||
#define SPI_CHAN_EEPROM1 1
|
||||
#define SPI_EEPROM1_CS PB12 // datasheet: /CS pin, found with multimeter, not tested
|
||||
#define EEPROM_SCK PB13 // datasheet: CLK pin, found with multimeter, not tested
|
||||
#define EEPROM_MISO PB14 // datasheet: DO pin, found with multimeter, not tested
|
||||
#define EEPROM_MOSI PB15 // datasheet: DI pin, found with multimeter, not tested
|
||||
#define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
|
||||
#define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now...
|
||||
#else
|
||||
#define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
|
||||
// The LCD is initialized in FSMC mode
|
||||
#define BEEPER_PIN PD13
|
||||
|
||||
#define BTN_EN1 PC14
|
||||
#define BTN_EN2 PC15
|
||||
#define BTN_ENC PC13
|
||||
|
||||
#define TFT_RESET_PIN PD6
|
||||
#define TFT_BACKLIGHT_PIN PD3
|
||||
|
||||
#define TFT_CS_PIN PD7 // TFT works
|
||||
#define TFT_RS_PIN PD11 // TFT works
|
||||
|
||||
// There is touch, but calibration is off
|
||||
#define TOUCH_CS_PIN PB6
|
||||
#define TOUCH_SCK_PIN PB3
|
||||
#define TOUCH_MOSI_PIN PB5
|
||||
#define TOUCH_MISO_PIN PB4
|
||||
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "LERDGE X only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "Lerdge X"
|
||||
#define DEFAULT_MACHINE_NAME "LERDGE"
|
||||
|
||||
#define STEP_TIMER 4
|
||||
#define TEMP_TIMER 2
|
||||
|
||||
#define I2C_EEPROM
|
||||
#define I2C_SCL_PIN PB8
|
||||
#define I2C_SDA_PIN PB9
|
||||
#define MARLIN_EEPROM_SIZE 0x10000 // FM24CL64 F-RAM 64K (8Kx8)
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
//#define SERVO0_PIN PD13
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#define Y_STEP_PIN PB0
|
||||
#define Y_DIR_PIN PC5
|
||||
#define Y_ENABLE_PIN PB1
|
||||
|
||||
#define Z_STEP_PIN PA7
|
||||
#define Z_DIR_PIN PA6
|
||||
#define Z_ENABLE_PIN PC4
|
||||
|
||||
#define E0_STEP_PIN PA4
|
||||
#define E0_DIR_PIN PA3
|
||||
#define E0_ENABLE_PIN PA5
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN PC15 // FAN1_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
// Lerdge supports auto-power off and power loss sense through a single pin.
|
||||
#define POWER_LOSS_PIN PC14 // Power-loss / nAC_FAULT
|
||||
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
#define SD_MOSI_PIN PD2
|
||||
#define SD_SS_PIN PC11
|
||||
|
||||
//
|
||||
// SD support
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define SD_DETECT_PIN PA8
|
||||
#define SDIO_CLOCK 4800000
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
|
||||
// The LCD is initialized in FSMC mode
|
||||
#define BEEPER_PIN PD12
|
||||
|
||||
#define BTN_EN1 PE3
|
||||
#define BTN_EN2 PE4
|
||||
#define BTN_ENC PE2
|
||||
|
||||
#define TFT_RESET_PIN PD6
|
||||
#define TFT_BACKLIGHT_PIN PD3
|
||||
|
||||
#define TFT_CS_PIN PD7
|
||||
#define TFT_RS_PIN PD11
|
||||
|
||||
#define TOUCH_CS_PIN PB6
|
||||
#define TOUCH_SCK_PIN PB3
|
||||
#define TOUCH_MOSI_PIN PB5
|
||||
#define TOUCH_MISO_PIN PB4
|
||||
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "MKS_ROBIN2 supports up to 2 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_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
|
||||
@@ -0,0 +1,363 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "MKS Robin Nano V3 supports up to 2 hotends / E-steppers."
|
||||
#elif HAS_FSMC_TFT
|
||||
#error "MKS Robin Nano V3 doesn't support FSMC-based TFT displays."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "MKS Robin Nano V3"
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
// Avoid conflict with TIMER_TONE
|
||||
#define STEP_TIMER 10
|
||||
|
||||
// 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
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
#define I2C_SCL_PIN PB6
|
||||
#define I2C_SDA_PIN PB7
|
||||
|
||||
//
|
||||
// Release PB4 (Z_DIR_PIN) from JTAG NRST role
|
||||
//
|
||||
//#define DISABLE_DEBUG
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PA8 // Enable BLTOUCH
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_DIAG_PIN PD15
|
||||
#define Y_DIAG_PIN PD2
|
||||
#define Z_DIAG_PIN PC8
|
||||
#define E0_DIAG_PIN PC4
|
||||
#define E1_DIAG_PIN PE7
|
||||
|
||||
//
|
||||
#define X_STOP_PIN PA15
|
||||
#define Y_STOP_PIN PD2
|
||||
#define Z_MIN_PIN PC8
|
||||
#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 PD5
|
||||
#endif
|
||||
|
||||
#define Y_ENABLE_PIN PE1
|
||||
#define Y_STEP_PIN PE0
|
||||
#define Y_DIR_PIN PB9
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN PD7
|
||||
#endif
|
||||
|
||||
#define Z_ENABLE_PIN PB8
|
||||
#define Z_STEP_PIN PB5
|
||||
#define Z_DIR_PIN PB4
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN PD4
|
||||
#endif
|
||||
|
||||
#define E0_ENABLE_PIN PB3
|
||||
#define E0_STEP_PIN PD6
|
||||
#define E0_DIR_PIN PD3
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN PD9
|
||||
#endif
|
||||
|
||||
#define E1_ENABLE_PIN PA3
|
||||
#define E1_STEP_PIN PD15
|
||||
#define E1_DIR_PIN PA1
|
||||
#ifndef E1_CS_PIN
|
||||
#define E1_CS_PIN PD8
|
||||
#endif
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
// This board only supports SW SPI for stepper drivers
|
||||
//
|
||||
#if HAS_TMC_SPI
|
||||
#define TMC_USE_SW_SPI
|
||||
#endif
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1
|
||||
#define TMC_SW_MOSI PD14
|
||||
#endif
|
||||
#if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1
|
||||
#define TMC_SW_MISO PD1
|
||||
#endif
|
||||
#if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1
|
||||
#define TMC_SW_SCK PD0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_UART
|
||||
//
|
||||
// Software serial
|
||||
// No Hardware serial for steppers
|
||||
//
|
||||
#define X_SERIAL_TX_PIN PD5
|
||||
#define X_SERIAL_RX_PIN PD5
|
||||
|
||||
#define Y_SERIAL_TX_PIN PD7
|
||||
#define Y_SERIAL_RX_PIN PD7
|
||||
|
||||
#define Z_SERIAL_TX_PIN PD4
|
||||
#define Z_SERIAL_RX_PIN PD4
|
||||
|
||||
#define E0_SERIAL_TX_PIN PD9
|
||||
#define E0_SERIAL_RX_PIN PD9
|
||||
|
||||
#define E1_SERIAL_TX_PIN PD8
|
||||
#define E1_SERIAL_RX_PIN PD8
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PC1 // TH1
|
||||
#define TEMP_1_PIN PA2 // TH2
|
||||
#define TEMP_BED_PIN PC0 // TB1
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PE5 // HEATER1
|
||||
#define HEATER_1_PIN PB0 // HEATER2
|
||||
#define HEATER_BED_PIN PA0 // HOT BED
|
||||
|
||||
#define FAN_PIN PC14 // FAN
|
||||
#define FAN1_PIN PB1 // FAN1
|
||||
|
||||
//
|
||||
// Thermocouples
|
||||
//
|
||||
//#define MAX6675_SS_PIN HEATER_0_PIN // TC1 - CS1
|
||||
//#define MAX6675_SS_PIN HEATER_1_PIN // TC2 - CS2
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define MT_DET_1 PA4
|
||||
#define MT_DET_2 PE6
|
||||
#define PW_DET PA13
|
||||
#define PW_OFF PB2
|
||||
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN MT_DET_1
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT2_PIN
|
||||
#define FIL_RUNOUT2_PIN MT_DET_2
|
||||
#endif
|
||||
|
||||
#define POWER_LOSS_PIN PW_DET
|
||||
#define PS_ON_PIN PW_OFF
|
||||
|
||||
//
|
||||
// Enable MKSPWC support
|
||||
//
|
||||
//#define SUICIDE_PIN PB2
|
||||
//#define KILL_PIN PA2
|
||||
//#define KILL_PIN_INVERTING true
|
||||
|
||||
//#define LED_PIN PB2
|
||||
|
||||
// Random Info
|
||||
#define USB_SERIAL -1 // USB Serial
|
||||
#define WIFI_SERIAL 3 // USART3
|
||||
#define MKS_WIFI_MODULE_SERIAL 1 // USART1
|
||||
#define MKS_WIFI_MODULE_SPI 2 // SPI2
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
//
|
||||
// Onboard SD card
|
||||
//
|
||||
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define CUSTOM_SPI_PINS // TODO: needed because is the only way to set SPI3 for SD on STM32 (by now)
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI3
|
||||
#define SD_SS_PIN -1
|
||||
#define SDSS PC9
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#define SD_DETECT_PIN PD12
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD SD
|
||||
//
|
||||
#if SD_CONNECTION_IS(LCD)
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS PE10
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PE12
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
#define SPI_FLASH
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_DEVICE 2
|
||||
#define SPI_FLASH_SIZE 0x1000000
|
||||
#if ENABLED(SPI_FLASH)
|
||||
#define W25QXX_CS_PIN PB12
|
||||
#define W25QXX_MOSI_PIN PC3
|
||||
#define W25QXX_MISO_PIN PC2
|
||||
#define W25QXX_SCK_PIN PB13
|
||||
#endif
|
||||
|
||||
/**
|
||||
* _____ _____
|
||||
* (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK)
|
||||
* (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS)
|
||||
* (LCD_D4)PE14 | · · PE15(LCD_D5) (BTN_EN2) PE11 | · · PA7 (SPI1 MOSI)
|
||||
* (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI1_RS) PE12 | · · | RESET
|
||||
* GND | · · | 5V GND | · · | 3.3V
|
||||
*  ̄ ̄ ̄  ̄ ̄ ̄
|
||||
* EXP1 EXP2
|
||||
*/
|
||||
|
||||
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
|
||||
#ifndef TOUCH_CALIBRATION_X
|
||||
#define TOUCH_CALIBRATION_X -17253
|
||||
#endif
|
||||
#ifndef TOUCH_CALIBRATION_Y
|
||||
#define TOUCH_CALIBRATION_Y 11579
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_X
|
||||
#define TOUCH_OFFSET_X 514
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_Y
|
||||
#define TOUCH_OFFSET_Y -24
|
||||
#endif
|
||||
#ifndef TOUCH_ORIENTATION
|
||||
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
|
||||
#endif
|
||||
|
||||
#define TFT_CS_PIN PD11
|
||||
#define TFT_SCK_PIN PA5
|
||||
#define TFT_MISO_PIN PA6
|
||||
#define TFT_MOSI_PIN PA7
|
||||
#define TFT_DC_PIN PD10
|
||||
#define TFT_RST_PIN PC6
|
||||
#define TFT_A0_PIN TFT_DC_PIN
|
||||
|
||||
#define TFT_RESET_PIN PC6
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define TOUCH_BUTTONS_HW_SPI
|
||||
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
|
||||
|
||||
#define LCD_BACKLIGHT_PIN PD13
|
||||
#ifndef TFT_WIDTH
|
||||
#define TFT_WIDTH 480
|
||||
#endif
|
||||
#ifndef TFT_HEIGHT
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define TOUCH_CS_PIN PE14 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define BTN_EN1 PE8
|
||||
#define BTN_EN2 PE11
|
||||
#define BEEPER_PIN PC5
|
||||
#define BTN_ENC PE13
|
||||
|
||||
#define LCD_READ_ID 0xD3
|
||||
#define LCD_USE_DMA_SPI
|
||||
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN PC5
|
||||
#define BTN_ENC PE13
|
||||
#define LCD_PINS_ENABLE PD13
|
||||
#define LCD_PINS_RS PC6
|
||||
#define BTN_EN1 PE8
|
||||
#define BTN_EN2 PE11
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
// 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 PD11
|
||||
#define DOGLCD_CS PE15
|
||||
//#define DOGLCD_SCK PA5
|
||||
//#define DOGLCD_MOSI PA7
|
||||
|
||||
// Required for MKS_MINI_12864 with this board
|
||||
//#define MKS_LCD12864B
|
||||
//#undef SHOW_BOOTSCREEN
|
||||
|
||||
#else // !MKS_MINI_12864
|
||||
|
||||
#define LCD_PINS_D4 PE14
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#define LCD_PINS_D5 PE15
|
||||
#define LCD_PINS_D6 PD11
|
||||
#define LCD_PINS_D7 PD10
|
||||
#endif
|
||||
|
||||
#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 // !MKS_MINI_12864
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
@@ -0,0 +1,374 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "MKS Robin Nano V3 supports up to 1 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "MKS Robin PRO V2"
|
||||
|
||||
// Avoid conflict with TIMER_TONE
|
||||
#define STEP_TIMER 10
|
||||
|
||||
// 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
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
//
|
||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||
//
|
||||
//#define DISABLE_DEBUG
|
||||
|
||||
//
|
||||
// Note: MKS Robin board is using SPI2 interface.
|
||||
//
|
||||
//#define SPI_MODULE 2
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PA8 // Enable BLTOUCH
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_DIAG_PIN PA15
|
||||
#define Y_DIAG_PIN PA12
|
||||
#define Z_DIAG_PIN PA11
|
||||
#define E0_DIAG_PIN PC4
|
||||
#define E1_DIAG_PIN PE7
|
||||
|
||||
#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
|
||||
#ifndef X_CS_PIN
|
||||
#define X_CS_PIN PD5
|
||||
#endif
|
||||
|
||||
#define Y_ENABLE_PIN PE1
|
||||
#define Y_STEP_PIN PE0
|
||||
#define Y_DIR_PIN PB9
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN PD7
|
||||
#endif
|
||||
|
||||
#define Z_ENABLE_PIN PB8
|
||||
#define Z_STEP_PIN PB5
|
||||
#define Z_DIR_PIN PB4
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN PD4
|
||||
#endif
|
||||
|
||||
#define E0_ENABLE_PIN PB3
|
||||
#define E0_STEP_PIN PD6
|
||||
#define E0_DIR_PIN PD3
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN PD9
|
||||
#endif
|
||||
|
||||
#define E1_ENABLE_PIN PA3
|
||||
#define E1_STEP_PIN PD15
|
||||
#define E1_DIR_PIN PA1
|
||||
#ifndef E1_CS_PIN
|
||||
#define E1_CS_PIN PD8
|
||||
#endif
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
//
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PD14
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PD1
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PD0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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 PD5
|
||||
#define X_SERIAL_RX_PIN PD5
|
||||
|
||||
#define Y_SERIAL_TX_PIN PD7
|
||||
#define Y_SERIAL_RX_PIN PD7
|
||||
|
||||
#define Z_SERIAL_TX_PIN PD4
|
||||
#define Z_SERIAL_RX_PIN PD4
|
||||
|
||||
#define E0_SERIAL_TX_PIN PD9
|
||||
#define E0_SERIAL_RX_PIN PD9
|
||||
|
||||
#define E1_SERIAL_TX_PIN PD8
|
||||
#define E1_SERIAL_RX_PIN PD8
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif // HAS_TMC_UART
|
||||
|
||||
//
|
||||
// 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 SUICIDE_PIN PB2 // Enable MKSPWC support
|
||||
//#define KILL_PIN PA2 // Enable MKSPWC support
|
||||
//#define KILL_PIN_INVERTING true // Enable MKSPWC support
|
||||
//#define LED_PIN PB2
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
//#define USE_NEW_SPI_API 1
|
||||
|
||||
//
|
||||
// Onboard SD card
|
||||
// NOT compatible with LCD
|
||||
//
|
||||
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
||||
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
|
||||
#if USE_NEW_SPI_API
|
||||
#define SD_SPI MARLIN_SPI(HardwareSPI3, PC9)
|
||||
#else
|
||||
#define ENABLE_SPI3
|
||||
#define SD_SS_PIN -1
|
||||
#define SDSS PC9
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#endif
|
||||
#define SD_DETECT_PIN PD12
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
//
|
||||
// LCD SD
|
||||
//
|
||||
#if SDCARD_CONNECTION == LCD
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS PE10
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PE12
|
||||
#endif
|
||||
#endif
|
||||
*/
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
#define SPI_FLASH
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_DEVICE 2
|
||||
#define SPI_FLASH_SIZE 0x1000000
|
||||
#if ENABLED(SPI_FLASH)
|
||||
#define W25QXX_CS_PIN PB12
|
||||
#define W25QXX_MOSI_PIN PB15
|
||||
#define W25QXX_MISO_PIN PB14
|
||||
#define W25QXX_SCK_PIN PB13
|
||||
#endif
|
||||
|
||||
/**
|
||||
* _____ _____
|
||||
* (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK)
|
||||
* (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS)
|
||||
* (LCD_D4)PE14 | · · | PE15(LCD_D5) (BTN_EN2) PE11 | · · | PA7 (SPI1 MOSI)
|
||||
* (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI DET) PE12 | · · | RESET
|
||||
* GND | · · | 5V GND | · · | 3.3V
|
||||
*  ̄ ̄ ̄  ̄ ̄ ̄
|
||||
* EXP1 EXP2
|
||||
*/
|
||||
|
||||
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
|
||||
#ifndef TOUCH_CALIBRATION_X
|
||||
#define TOUCH_CALIBRATION_X -17253
|
||||
#endif
|
||||
#ifndef TOUCH_CALIBRATION_Y
|
||||
#define TOUCH_CALIBRATION_Y 11579
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_X
|
||||
#define TOUCH_OFFSET_X 514
|
||||
#endif
|
||||
#ifndef TOUCH_OFFSET_Y
|
||||
#define TOUCH_OFFSET_Y -24
|
||||
#endif
|
||||
#ifndef TOUCH_ORIENTATION
|
||||
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
|
||||
#endif
|
||||
|
||||
#define TFT_CS_PIN PD11
|
||||
#define TFT_SCK_PIN PA5
|
||||
#define TFT_MISO_PIN PA6
|
||||
#define TFT_MOSI_PIN PA7
|
||||
#define TFT_DC_PIN PD10
|
||||
#define TFT_RST_PIN PC6
|
||||
#define TFT_A0_PIN TFT_DC_PIN
|
||||
|
||||
#define TFT_RESET_PIN PC6
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define TOUCH_BUTTONS_HW_SPI
|
||||
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
|
||||
|
||||
#define LCD_BACKLIGHT_PIN PD13
|
||||
#ifndef TFT_WIDTH
|
||||
#define TFT_WIDTH 480
|
||||
#endif
|
||||
#ifndef TFT_HEIGHT
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define TOUCH_CS_PIN PE14 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define BTN_EN1 PE8
|
||||
#define BTN_EN2 PE11
|
||||
#define BEEPER_PIN PC5
|
||||
#define BTN_ENC PE13
|
||||
|
||||
#define LCD_READ_ID 0xD3
|
||||
#define LCD_USE_DMA_SPI
|
||||
|
||||
//#define TFT_DRIVER ST7796
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN PC5
|
||||
#define BTN_ENC PE13
|
||||
#define LCD_PINS_ENABLE PD13
|
||||
#define LCD_PINS_RS PC6
|
||||
#define BTN_EN1 PE8
|
||||
#define BTN_EN2 PE11
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
// 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 PD11
|
||||
#define DOGLCD_CS PE15
|
||||
//#define DOGLCD_SCK PA5
|
||||
//#define DOGLCD_MOSI PA7
|
||||
|
||||
// Required for MKS_MINI_12864 with this board
|
||||
//#define MKS_LCD12864B
|
||||
//#undef SHOW_BOOTSCREEN
|
||||
|
||||
#else // !MKS_MINI_12864
|
||||
|
||||
#define LCD_PINS_D4 PE14
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#define LCD_PINS_D5 PE15
|
||||
#define LCD_PINS_D6 PD11
|
||||
#define LCD_PINS_D7 PD10
|
||||
#endif
|
||||
|
||||
#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 // !MKS_MINI_12864
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin assignments for the RUMBA32
|
||||
*
|
||||
* https://aus3d.com.au/rumba32
|
||||
* https://github.com/Aus3D/RUMBA32
|
||||
*/
|
||||
|
||||
#define BOARD_INFO_NAME "RUMBA32"
|
||||
|
||||
#if NO_EEPROM_SELECTED
|
||||
#if MB(RUMBA32_V1_0)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
#elif MB(RUMBA32_V1_1)
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24LC64T-I/OT)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#endif
|
||||
|
||||
#include "pins_RUMBA32_common.h"
|
||||
|
||||
#if MB(RUMBA32_V1_1)
|
||||
|
||||
#define SERVO0_PIN PA15
|
||||
#undef BTN_PIN
|
||||
|
||||
#if HAS_TMC_UART
|
||||
//
|
||||
// TMC2208/TMC2209 stepper drivers - Software Serial is used according to below pins
|
||||
//
|
||||
#define X_SERIAL_TX_PIN PA14
|
||||
#define X_SERIAL_RX_PIN PC14
|
||||
|
||||
#define Y_SERIAL_TX_PIN PA13
|
||||
#define Y_SERIAL_RX_PIN PE4
|
||||
|
||||
#define Z_SERIAL_TX_PIN PB10
|
||||
#define Z_SERIAL_RX_PIN PE0
|
||||
|
||||
#define E0_SERIAL_TX_PIN PD11
|
||||
#define E0_SERIAL_RX_PIN PC13
|
||||
|
||||
#define E1_SERIAL_TX_PIN PB3
|
||||
#define E1_SERIAL_RX_PIN PD5
|
||||
|
||||
#define E2_SERIAL_TX_PIN PB4
|
||||
#define E2_SERIAL_RX_PIN PD1
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin assignments for the MKS RUMBA32
|
||||
*
|
||||
* https://github.com/makerbase-mks/MKS-RUMBA32
|
||||
*
|
||||
* The MKS and Aus3D versions have the same pinout but the MKS version
|
||||
* has some added resistors and LEDs. The resistors needed for the
|
||||
* TMC2208/9 UART interface are among the additions. Also added were
|
||||
* connectors and resistors dedicated to the TMC2130 sensorless homing
|
||||
* interface.
|
||||
*/
|
||||
|
||||
#define BOARD_INFO_NAME "MKS RUMBA32"
|
||||
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
#define FLASH_EEPROM_LEVELING
|
||||
#endif
|
||||
|
||||
#include "pins_RUMBA32_common.h"
|
||||
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL Serial1
|
||||
//#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 PA3
|
||||
#define X_SERIAL_RX_PIN PC14
|
||||
|
||||
#define Y_SERIAL_TX_PIN PA4
|
||||
#define Y_SERIAL_RX_PIN PE4
|
||||
|
||||
#define Z_SERIAL_TX_PIN PD13
|
||||
#define Z_SERIAL_RX_PIN PE0
|
||||
|
||||
#define E0_SERIAL_TX_PIN PD14
|
||||
#define E0_SERIAL_RX_PIN PC13
|
||||
|
||||
#define E1_SERIAL_TX_PIN PD15
|
||||
#define E1_SERIAL_RX_PIN PD5
|
||||
|
||||
#define E2_SERIAL_TX_PIN PD12
|
||||
#define E2_SERIAL_RX_PIN PD1
|
||||
#endif
|
||||
@@ -0,0 +1,187 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Common pin assignments for all RUMBA32 boards
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "RUMBA32 boards support up to 3 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
||||
// Use soft PWM for fans - PWM is not working properly when paired with STM32 Arduino Core v1.7.0
|
||||
// This can be removed when Core version is updated and PWM behaviour is fixed.
|
||||
#define FAN_SOFT_PWM
|
||||
|
||||
//
|
||||
// Configure Timers
|
||||
// TIM6 is used for TONE
|
||||
// TIM7 is used for SERVO
|
||||
// TIMER_SERIAL defaults to TIM7 and must be overridden in the platformio.h file if SERVO will also be used.
|
||||
// This will be difficult to solve from the Arduino IDE, without modifying the RUMBA32 variant
|
||||
// included with the STM32 framework.
|
||||
|
||||
#define STEP_TIMER 10
|
||||
#define TEMP_TIMER 14
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PA7
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PA6
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PA5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
//
|
||||
// SPI
|
||||
//
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_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_WIRED_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 IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 PE13
|
||||
#define LCD_PINS_D6 PE14
|
||||
#define LCD_PINS_D7 PE15
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(640)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,357 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Source: https://github.com/stm32duino/Arduino_Core_STM32/blob/master/variants/ST3DP001_EVAL/variant.cpp
|
||||
|
||||
/**
|
||||
* HOW TO COMPILE
|
||||
*
|
||||
* PlatformIO - Use the STM32F401VE_STEVAL environment (or the "Auto Build Marlin" extension).
|
||||
*
|
||||
* Arduino - Tested with 1.8.10
|
||||
* Install library per https://github.com/stm32duino/Arduino_Core_STM32
|
||||
* Make the following selections under the TOOL menu in the Arduino IDE
|
||||
* Board: "3D printer boards"
|
||||
* Board part number: "STEVAL-3DP001V1"
|
||||
* U(S)ART support: "Enabled (generic "Serial")"
|
||||
* USB support (if available): "CDC (no generic "Serial")"
|
||||
* Optimize: "Smallest (-Os default)"
|
||||
* C Runtime Library: "newlib Nano (default)"
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#ifndef MACHINE_NAME
|
||||
#define MACHINE_NAME "STEVAL-3DP001V1"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_MIN_PIN 39 // PD8 X_STOP
|
||||
#define Y_MIN_PIN 40 // PD9 Y_STOP
|
||||
#define Z_MIN_PIN 41 // PD10 Z_STOP
|
||||
|
||||
#define X_MAX_PIN 44 // PD0 W_STOP
|
||||
#define Y_MAX_PIN 43 // PA8 V_STOP
|
||||
#define Z_MAX_PIN 42 // PD11 U_STOP
|
||||
|
||||
//
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
//#ifndef Z_MIN_PROBE_PIN
|
||||
// #define Z_MIN_PROBE_PIN 16 // PA4
|
||||
//#endif
|
||||
|
||||
//
|
||||
// Filament runout
|
||||
//
|
||||
//#define FIL_RUNOUT_PIN 53 // PA3 BED_THE
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
|
||||
#define X_STEP_PIN 61 // PE14 X_PWM
|
||||
#define X_DIR_PIN 62 // PE15 X_DIR
|
||||
#define X_ENABLE_PIN 60 // PE13 X_RES
|
||||
#define X_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
#define Y_STEP_PIN 64 // PB10 Y_PWM
|
||||
#define Y_DIR_PIN 65 // PE9 Y_DIR
|
||||
#define Y_ENABLE_PIN 63 // PE10 Y_RES
|
||||
#define Y_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
#define Z_STEP_PIN 67 // PC6 Z_PWM
|
||||
#define Z_DIR_PIN 68 // PC0 Z_DIR
|
||||
#define Z_ENABLE_PIN 66 // PC15 Z_RES
|
||||
#define Z_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
#define E0_STEP_PIN 71 // PD12 E1_PW
|
||||
#define E0_DIR_PIN 70 // PC13 E1_DIR
|
||||
#define E0_ENABLE_PIN 69 // PC14 E1_RE
|
||||
#define E0_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
#define E1_STEP_PIN 73 // PE5 E2_PWM
|
||||
#define E1_DIR_PIN 74 // PE6 E2_DIR
|
||||
#define E1_ENABLE_PIN 72 // PE4 E2_RESE
|
||||
#define E1_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
#define E2_STEP_PIN 77 // PB8 E3_PWM
|
||||
#define E2_DIR_PIN 76 // PE2 E3_DIR
|
||||
#define E2_ENABLE_PIN 75 // PE3 E3_RESE
|
||||
#define E2_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
// needed to pass a sanity check
|
||||
#define X2_CS_PIN 16 // PA4 SPI_CS
|
||||
#define Y2_CS_PIN 16 // PA4 SPI_CS
|
||||
#define Z2_CS_PIN 16 // PA4 SPI_CS
|
||||
#define Z3_CS_PIN 16 // PA4 SPI_CS
|
||||
#define E3_CS_PIN 16 // PA4 SPI_CS
|
||||
#define E4_CS_PIN 16 // PA4 SPI_CS
|
||||
#define E5_CS_PIN 16 // PA4 SPI_CS
|
||||
|
||||
#if HAS_L64XX
|
||||
#define L6470_CHAIN_SCK_PIN 17 // PA5
|
||||
#define L6470_CHAIN_MISO_PIN 18 // PA6
|
||||
#define L6470_CHAIN_MOSI_PIN 19 // PA7
|
||||
#define L6470_CHAIN_SS_PIN 16 // PA4
|
||||
|
||||
//#define SD_SCK_PIN L6470_CHAIN_SCK_PIN
|
||||
//#define SD_MISO_PIN L6470_CHAIN_MISO_PIN
|
||||
//#define SD_MOSI_PIN L6470_CHAIN_MOSI_PIN
|
||||
#else
|
||||
//#define SD_SCK_PIN 13 // PB13 SPI_S
|
||||
//#define SD_MISO_PIN 12 // PB14 SPI_M
|
||||
//#define SD_MOSI_PIN 11 // PB15 SPI_M
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Macro to reset/enable L6474 stepper drivers
|
||||
*
|
||||
* IMPORTANT - To disable (bypass) L6474s, install the corresponding
|
||||
* resistors (R11 - R17) and change the "V" to "0" for the
|
||||
* corresponding pins here:
|
||||
*/
|
||||
#define ENABLE_RESET_L64XX_CHIPS(V) do{ OUT_WRITE(X_ENABLE_PIN, V); \
|
||||
OUT_WRITE(Y_ENABLE_PIN, V); \
|
||||
OUT_WRITE(Z_ENABLE_PIN, V); \
|
||||
OUT_WRITE(E0_ENABLE_PIN,V); \
|
||||
OUT_WRITE(E1_ENABLE_PIN,V); \
|
||||
OUT_WRITE(E2_ENABLE_PIN,V); \
|
||||
}while(0)
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN 3 // Analog input 3, digital pin 54 PA0 E1_THERMISTOR
|
||||
#define TEMP_1_PIN 4 // Analog input 4, digital pin 55 PA1 E2_THERMISTOR
|
||||
#define TEMP_2_PIN 5 // Analog input 5, digital pin 56 PA2 E3_THERMISTOR
|
||||
#define TEMP_BED_PIN 0 // Analog input 0, digital pin 51 PC2 BED_THERMISTOR_1
|
||||
#define TEMP_BED_1_PIN 1 // Analog input 1, digital pin 52 PC3 BED_THERMISTOR_2
|
||||
#define TEMP_BED_2_PIN 2 // Analog input 2, digital pin 53 PA3 BED_THERMISTOR_3
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 48 // PC7 E1_HEAT_PWM
|
||||
#define HEATER_1_PIN 49 // PB0 E2_HEAT_PWM
|
||||
#define HEATER_2_PIN 50 // PB1 E3_HEAT_PWM
|
||||
#define HEATER_BED_PIN 46 // PD14 (BED_HEAT_1 FET
|
||||
#define HEATER_BED_1_PIN 45 // PD13 (BED_HEAT_2 FET
|
||||
#define HEATER_BED_2_PIN 47 // PD15 (BED_HEAT_3 FET
|
||||
|
||||
#define FAN_PIN 57 // PC4 E1_FAN PWM pin, Part cooling fan FET
|
||||
#define FAN1_PIN 58 // PC5 E2_FAN PWM pin, Extruder fan FET
|
||||
#define FAN2_PIN 59 // PE8 E3_FAN PWM pin, Controller fan FET
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN 58 // FAN1_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Misc functions
|
||||
//
|
||||
#define SDSS 16 // PA4 SPI_CS
|
||||
#define LED_PIN -1 // 9 // PE1 green LED Heart beat
|
||||
#define PS_ON_PIN -1
|
||||
#define KILL_PIN -1
|
||||
#define POWER_LOSS_PIN -1 // PWR_LOSS / nAC_FAULT
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
//#define SD_DETECT_PIN 66 // PA15 SD_CA
|
||||
//#define BEEPER_PIN 24 // PC9 SDIO_D1
|
||||
//#define LCD_PINS_RS 65 // PE9 Y_DIR
|
||||
//#define LCD_PINS_ENABLE 59 // PE8 E3_FAN
|
||||
//#define LCD_PINS_D4 10 // PB12 SPI_C
|
||||
//#define LCD_PINS_D5 13 // PB13 SPI_S
|
||||
//#define LCD_PINS_D6 12 // PB14 SPI_M
|
||||
//#define LCD_PINS_D7 11 // PB15 SPI_M
|
||||
//#define BTN_EN1 57 // PC4 E1_FAN
|
||||
//#define BTN_EN2 58 // PC5 E2_FAN
|
||||
//#define BTN_ENC 52 // PC3 BED_THE
|
||||
|
||||
//
|
||||
// Extension pins
|
||||
//
|
||||
//#define EXT0_PIN 49 // PB0 E2_HEAT
|
||||
//#define EXT1_PIN 50 // PB1 E3_HEAT
|
||||
//#define EXT2_PIN // PB2 not used (tied to ground
|
||||
//#define EXT3_PIN 39 // PD8 X_STOP
|
||||
//#define EXT4_PIN 40 // PD9 Y_STOP
|
||||
//#define EXT5_PIN 41 // PD10 Z_STOP
|
||||
//#define EXT6_PIN 42 // PD11
|
||||
//#define EXT7_PIN 71 // PD12 E1_PW
|
||||
//#define EXT8_PIN 64 // PB10 Y_PWM
|
||||
|
||||
// WIFI
|
||||
// 2 // PD3 CTS
|
||||
// 3 // PD4 RTS
|
||||
// 4 // PD5 TX
|
||||
// 5 // PD6 RX
|
||||
// 6 // PB5 WIFI_WAKEUP
|
||||
// 7 // PE11 WIFI_RESET
|
||||
// 8 // PE12 WIFI_BOOT
|
||||
|
||||
// I2C USER
|
||||
// 14 // PB7 SDA
|
||||
// 15 // PB6 SCL
|
||||
|
||||
// JTAG
|
||||
// 20 // PA13 JTAG_TMS/SWDIO
|
||||
// 21 // PA14 JTAG_TCK/SWCLK
|
||||
// 22 // PB3 JTAG_TDO/SWO
|
||||
|
||||
//
|
||||
// Onboard SD support
|
||||
//
|
||||
#define SDIO_D0_PIN 23 // PC8 SDIO_D0
|
||||
#define SDIO_D1_PIN 24 // PC9 SDIO_D1
|
||||
//#define SD_CARD_DETECT_PIN 25 // PA15 SD_CARD_DETECT
|
||||
#define SDIO_D2_PIN 26 // PC10 SDIO_D2
|
||||
#define SDIO_D3_PIN 27 // PC11 SDIO_D3
|
||||
#define SDIO_CK_PIN 28 // PC12 SDIO_CK
|
||||
#define SDIO_CMD_PIN 29 // PD2 SDIO_CMD
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
|
||||
#ifndef SDIO_SUPPORT
|
||||
#define SOFTWARE_SPI // Use soft SPI for onboard SD
|
||||
#undef SDSS
|
||||
#define SDSS SDIO_D3_PIN
|
||||
#define SD_SCK_PIN SDIO_CK_PIN
|
||||
#define SD_MISO_PIN SDIO_D0_PIN
|
||||
#define SD_MOSI_PIN SDIO_CMD_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// OTG
|
||||
// 30 // PA11 OTG_DM
|
||||
// 31 // PA12 OTG_DP
|
||||
|
||||
// USER_PINS
|
||||
// 34 // PD7 USER3
|
||||
// 35 // PB9 USER1
|
||||
// 36 // PE0 USER2
|
||||
// 37 // PB4 USER4
|
||||
|
||||
// USERKET
|
||||
// 38 // PE7 USER_BUTTON
|
||||
|
||||
// 0 // PA9 TX
|
||||
// 1 // PA10 RX
|
||||
|
||||
// IR/PROBE
|
||||
// 32 // PD1 IR_OUT
|
||||
// 33 // PC1 IR_ON
|
||||
|
||||
/**
|
||||
* Logical pin vs. port/pin cross reference
|
||||
*
|
||||
* PA0 54 // E1_THERMISTOR PA9 0 // TX
|
||||
* PA1 55 // E2_THERMISTOR PA10 1 // RX
|
||||
* PA2 56 // E3_THERMISTOR PD3 2 // CTS
|
||||
* PA3 53 // BED_THERMISTOR_3 PD4 3 // RTS
|
||||
* PA4 16 // SPI_CS PD5 4 // TX
|
||||
* PA5 17 // SPI_SCK PD6 5 // RX
|
||||
* PA6 18 // SPI_MISO PB5 6 // WIFI_WAKEUP
|
||||
* PA7 19 // SPI_MOSI PE11 7 // WIFI_RESET
|
||||
* PA8 43 // V_STOP PE12 8 // WIFI_BOOT
|
||||
* PA9 0 // TX PE1 9 // STATUS_LED
|
||||
* PA10 1 // RX PB12 10 // SPI_CS
|
||||
* PA11 30 // OTG_DM PB15 11 // SPI_MOSI
|
||||
* PA12 31 // OTG_DP PB14 12 // SPI_MISO
|
||||
* PA13 20 // JTAG_TMS/SWDIO PB13 13 // SPI_SCK
|
||||
* PA14 21 // JTAG_TCK/SWCLK PB7 14 // SDA
|
||||
* PA15 25 // SD_CARD_DETECT PB6 15 // SCL
|
||||
* PB0 49 // E2_HEAT_PWM PA4 16 // SPI_CS
|
||||
* PB1 50 // E3_HEAT_PWM PA5 17 // SPI_SCK
|
||||
* PB3 22 // JTAG_TDO/SWO PA6 18 // SPI_MISO
|
||||
* PB4 37 // USER4 PA7 19 // SPI_MOSI
|
||||
* PB5 6 // WIFI_WAKEUP PA13 20 // JTAG_TMS/SWDIO
|
||||
* PB6 15 // SCL PA14 21 // JTAG_TCK/SWCLK
|
||||
* PB7 14 // SDA PB3 22 // JTAG_TDO/SWO
|
||||
* PB8 77 // E3_PWM PC8 23 // SDIO_D0
|
||||
* PB9 35 // USER1 PC9 24 // SDIO_D1
|
||||
* PB10 64 // Y_PWM PA15 25 // SD_CARD_DETECT
|
||||
* PB12 10 // SPI_CS PC10 26 // SDIO_D2
|
||||
* PB13 13 // SPI_SCK PC11 27 // SDIO_D3
|
||||
* PB14 12 // SPI_MISO PC12 28 // SDIO_CK
|
||||
* PB15 11 // SPI_MOSI PD2 29 // SDIO_CMD
|
||||
* PC0 68 // Z_DIR PA11 30 // OTG_DM
|
||||
* PC1 33 // IR_ON PA12 31 // OTG_DP
|
||||
* PC2 51 // BED_THERMISTOR_1 PD1 32 // IR_OUT
|
||||
* PC3 52 // BED_THERMISTOR_2 PC1 33 // IR_ON
|
||||
* PC4 57 // E1_FAN PD7 34 // USER3
|
||||
* PC5 58 // E2_FAN PB9 35 // USER1
|
||||
* PC6 67 // Z_PWM PE0 36 // USER2
|
||||
* PC7 48 // E1_HEAT_PWM PB4 37 // USER4
|
||||
* PC8 23 // SDIO_D0 PE7 38 // USER_BUTTON
|
||||
* PC9 24 // SDIO_D1 PD8 39 // X_STOP
|
||||
* PC10 26 // SDIO_D2 PD9 40 // Y_STOP
|
||||
* PC11 27 // SDIO_D3 PD10 41 // Z_STOP
|
||||
* PC12 28 // SDIO_CK PD11 42 // U_STOP
|
||||
* PC13 70 // E1_DIR PA8 43 // V_STOP
|
||||
* PC14 69 // E1_RESET PD0 44 // W_STOP
|
||||
* PC15 66 // Z_RESET PD13 45 // BED_HEAT_2
|
||||
* PD0 44 // W_STOP PD14 46 // BED_HEAT_1
|
||||
* PD1 32 // IR_OUT PD15 47 // BED_HEAT_3
|
||||
* PD2 29 // SDIO_CMD PC7 48 // E1_HEAT_PWM
|
||||
* PD3 2 // CTS PB0 49 // E2_HEAT_PWM
|
||||
* PD4 3 // RTS PB1 50 // E3_HEAT_PWM
|
||||
* PD5 4 // TX PC2 51 // BED_THERMISTOR_1
|
||||
* PD6 5 // RX PC3 52 // BED_THERMISTOR_2
|
||||
* PD7 34 // USER3 PA3 53 // BED_THERMISTOR_3
|
||||
* PD8 39 // X_STOP PA0 54 // E1_THERMISTOR
|
||||
* PD9 40 // Y_STOP PA1 55 // E2_THERMISTOR
|
||||
* PD10 41 // Z_STOP PA2 56 // E3_THERMISTOR
|
||||
* PD11 42 // U_STOP PC4 57 // E1_FAN
|
||||
* PD12 71 // E1_PWM PC5 58 // E2_FAN
|
||||
* PD13 45 // BED_HEAT_2 PE8 59 // E3_FAN
|
||||
* PD14 46 // BED_HEAT_1 PE13 60 // X_RESET
|
||||
* PD15 47 // BED_HEAT_3 PE14 61 // X_PWM
|
||||
* PE0 36 // USER2 PE15 62 // X_DIR
|
||||
* PE1 9 // STATUS_LED PE10 63 // Y_RESET
|
||||
* PE2 76 // E3_DIR PB10 64 // Y_PWM
|
||||
* PE3 75 // E3_RESET PE9 65 // Y_DIR
|
||||
* PE4 72 // E2_RESET PC15 66 // Z_RESET
|
||||
* PE5 73 // E2_PWM PC6 67 // Z_PWM
|
||||
* PE6 74 // E2_DIR PC0 68 // Z_DIR
|
||||
* PE7 38 // USER_BUTTON PC14 69 // E1_RESET
|
||||
* PE8 59 // E3_FAN PC13 70 // E1_DIR
|
||||
* PE9 65 // Y_DIR PD12 71 // E1_PWM
|
||||
* PE10 63 // Y_RESET PE4 72 // E2_RESET
|
||||
* PE11 7 // WIFI_RESET PE5 73 // E2_PWM
|
||||
* PE12 8 // WIFI_BOOT PE6 74 // E2_DIR
|
||||
* PE13 60 // X_RESET PE3 75 // E3_RESET
|
||||
* PE14 61 // X_PWM PE2 76 // E3_DIR
|
||||
* PE15 62 // X_DIR PB8 77 // E3_PWM
|
||||
*/
|
||||
@@ -0,0 +1,196 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define ALLOW_STM32DUINO
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "STM32F4 supports up to 2 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
#define DEFAULT_MACHINE_NAME "STM32F446VET6"
|
||||
#define BOARD_INFO_NAME "STM32F4 VAkE"
|
||||
|
||||
//#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
//#define SERVO0_PIN PE13
|
||||
//#define SERVO1_PIN PE14
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PE10
|
||||
#define Y_STOP_PIN PE9
|
||||
#define Z_STOP_PIN PE8
|
||||
|
||||
//
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PA4
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament runout
|
||||
//
|
||||
#define FIL_RUNOUT_PIN PA3
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
|
||||
#define STEPPER_ENABLE_PIN PB2
|
||||
|
||||
#define X_STEP_PIN PC6 // X_STEP
|
||||
#define X_DIR_PIN PC7 // X_DIR
|
||||
#define X_ENABLE_PIN PB2 //
|
||||
#ifndef X_CS_PIN
|
||||
#define X_CS_PIN PC8 // X_CS
|
||||
#endif
|
||||
|
||||
#define Y_STEP_PIN PD9 // Y_STEP
|
||||
#define Y_DIR_PIN PD10 // Y_DIR
|
||||
#define Y_ENABLE_PIN PB2 //
|
||||
#ifndef Y_CS_PIN
|
||||
#define Y_CS_PIN PD11 // Y_CS
|
||||
#endif
|
||||
|
||||
#define Z_STEP_PIN PE15 // Z_STEP
|
||||
#define Z_DIR_PIN PB10 // Z_DIR
|
||||
#define Z_ENABLE_PIN PB2
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN PD8
|
||||
#endif
|
||||
|
||||
#define E0_STEP_PIN PB1
|
||||
#define E0_DIR_PIN PB13
|
||||
#define E0_ENABLE_PIN PB2
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN PE11
|
||||
#endif
|
||||
|
||||
#define E1_STEP_PIN PC4
|
||||
#define E1_DIR_PIN PC5
|
||||
#define E1_ENABLE_PIN PB2
|
||||
#ifndef E1_CS_PIN
|
||||
#define E1_CS_PIN PB0
|
||||
#endif
|
||||
|
||||
#define SD_SCK_PIN PE12 // PA5 // SPI1 for SD card
|
||||
#define SD_MISO_PIN PE13 // PA6
|
||||
#define SD_MOSI_PIN PE14 // PA7
|
||||
|
||||
// added for SD card : optional or not ???
|
||||
//#define SD_CHIP_SELECT_PIN SDSS // The default chip select pin for the SD card is SS.
|
||||
// The following three pins must not be redefined for hardware SPI.
|
||||
//#define SPI_MOSI_PIN SD_MOSI_PIN // SPI Master Out Slave In pin
|
||||
//#define SPI_MISO_PIN SD_MISO_PIN // SPI Master In Slave Out pin
|
||||
//#define SPI_SCK_PIN SD_SCK_PIN // SPI Clock pin
|
||||
|
||||
//
|
||||
// Temperature Sensors (Analog inputs)
|
||||
//
|
||||
|
||||
#define TEMP_0_PIN PC0 // Analog Input
|
||||
#define TEMP_1_PIN PC1 // Analog Input
|
||||
#define TEMP_2_PIN PC2 // Analog Input
|
||||
#define TEMP_3_PIN PC3 // Analog Input
|
||||
#define TEMP_BED_PIN PC3 // Analog Input
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
|
||||
#define HEATER_0_PIN PD15
|
||||
#define HEATER_1_PIN PD14
|
||||
#define HEATER_BED_PIN PD12
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PD13
|
||||
#endif
|
||||
#define FAN1_PIN PB5 // PA0
|
||||
#define FAN2_PIN PB4 // PA1
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN PD13
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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
|
||||
|
||||
#define LED_PIN PB14 // Alive
|
||||
#define PS_ON_PIN PE0
|
||||
#define KILL_PIN PD5
|
||||
#define POWER_LOSS_PIN PA4 // ?? Power loss / nAC_FAULT
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define SD_DETECT_PIN PB7
|
||||
#define SD_SS_PIN PB_15 // USD_CS -> CS for onboard SD
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_WIRED_LCD
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define SDSS PB6 // CS for SD card in LCD
|
||||
#endif
|
||||
#define BEEPER_PIN PC9
|
||||
#define LCD_PINS_RS PC12
|
||||
#define LCD_PINS_ENABLE PD7
|
||||
#define LCD_PINS_D4 PD1
|
||||
#define LCD_PINS_D5 PD2
|
||||
#define LCD_PINS_D6 PD3
|
||||
#define LCD_PINS_D7 PD4
|
||||
#define BTN_EN1 PD6
|
||||
#define BTN_EN2 PD0
|
||||
#define BTN_ENC PB12
|
||||
#endif
|
||||
|
||||
//
|
||||
// ST7920 Delays
|
||||
//
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
@@ -0,0 +1,197 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(STM32F767xx)
|
||||
#error "Oops! Select an STM32F767 environment"
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "NUCLEO-F767ZI"
|
||||
#define DEFAULT_MACHINE_NAME "Prototype Board"
|
||||
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// Decrease delays and flash wear by spreading writes across the
|
||||
// 128 kB sector allocated for EEPROM emulation.
|
||||
// Not yet supported on F7 hardware
|
||||
//#define FLASH_EEPROM_LEVELING
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Timer assignments
|
||||
*
|
||||
* TIM1 -
|
||||
* TIM2 - Hardware PWM (Fan/Heater Pins)
|
||||
* TIM3 - Hardware PWM (Servo Pins)
|
||||
* TIM4 - STEP_TIMER (Marlin)
|
||||
* TIM5 -
|
||||
* TIM6 - TIMER_TONE (variant.h)
|
||||
* TIM7 - TIMER_SERVO (variant.h)
|
||||
* TIM9 - TIMER_SERIAL (platformio.ini)
|
||||
* TIM10 - For some reason trips Watchdog when used for SW Serial
|
||||
* TIM11 -
|
||||
* TIM12 -
|
||||
* TIM13 -
|
||||
* TIM14 - TEMP_TIMER (Marlin)
|
||||
*
|
||||
*/
|
||||
#define STEP_TIMER 4
|
||||
#define TEMP_TIMER 14
|
||||
|
||||
/**
|
||||
* These pin assignments are arbitrary and intending for testing purposes.
|
||||
* Assignments may not be ideal, and not every assignment has been tested.
|
||||
* Proceed at your own risk.
|
||||
* _CN7_
|
||||
* (X_STEP) PC6 | · · | PB8 (X_EN)
|
||||
* (X_DIR) PB15 | · · | PB9 (X_CS)
|
||||
* (LCD_D4) PB13 | · · | AVDD
|
||||
* _CN8_ PB12 | · · | GND
|
||||
* NC | · · | PC8 (HEATER_0) PA15 | · · | PA5 (SCLK)
|
||||
* IOREF | · · | PC9 (BEEPER) PC7 | · · | PA6 (MISO)
|
||||
* RESET | · · | PC10 (SERVO1_PIN) PB5 | · · | PA7 (MOSI)
|
||||
* +3.3V | · · | PC11 (HEATER_BED) PB3 | · · | PD14 (SD_DETECT)
|
||||
* +5V | · · | PC12 (SDSS) PA4 | · · | PD15 (LCD_ENABLE)
|
||||
* GND | · · | PD2 (SERVO0_PIN) PB4 | · · | PF12 (LCD_RS)
|
||||
* GND | · · | PG2  ̄ ̄ ̄
|
||||
* VIN | · · | PG3
|
||||
*  ̄ ̄ ̄ _CN10
|
||||
* AVDD | · · | PF13 (BTN_EN1)
|
||||
* _CN9_ AGND | · · | PE9 (BTN_EN2)
|
||||
* (TEMP_0) PA3 | · · | PD7 GND | · · | PE11 (BTN_ENC)
|
||||
* (TEMP_BED) PC0 | · · | PD6 PB1 | · · | PF14
|
||||
* PC3 | · · | PD5 PC2 | · · | PE13
|
||||
* PF3 | · · | PD4 PF4 | · · | PF15
|
||||
* PF5 | · · | PD3 (E_STEP) PB6 | · · | PG14 (E_EN)
|
||||
* PF10 | · · | GND (E_DIR) PB2 | · · | PG9 (E_CS)
|
||||
* NC | · · | PE2 GND | · · | PE8
|
||||
* PA7 | · · | PE4 PD13 | · · | PE7
|
||||
* PF2 | · · | PE5 PD12 | · · | GND
|
||||
* (Y_STEP) PF1 | · · | PE6 (Y_EN) (Z_STEP) PD11 | · · | PE10 (Z_EN)
|
||||
* (Y_DIR) PF0 | · · | PE3 (Y_CS) (Z_DIR) PE2 | · · | PE12 (Z_CS)
|
||||
* GND | · · | PF8 GND | · · | PE14
|
||||
* (Z_MAX) PD0 | · · | PF7 (X_MIN) PA0 | · · | PE15
|
||||
* (Z_MIN) PD1 | · · | PF9 (X_MAX) PB0 | · · | PB10 (FAN)
|
||||
* (Y_MAX) PG0 | · · | PG1 (Y_MIN) PE0 | · · | PB11 (FAN1)
|
||||
*  ̄ ̄ ̄  ̄ ̄ ̄ ̄
|
||||
*/
|
||||
|
||||
#define X_MIN_PIN PF7
|
||||
#define X_MAX_PIN PF9
|
||||
#define Y_MIN_PIN PG1
|
||||
#define Y_MAX_PIN PG0
|
||||
#define Z_MIN_PIN PD1
|
||||
#define Z_MAX_PIN PD0
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PC6
|
||||
#define X_DIR_PIN PB15
|
||||
#define X_ENABLE_PIN PB8
|
||||
#define X_CS_PIN PB9
|
||||
|
||||
#define Y_STEP_PIN PF1
|
||||
#define Y_DIR_PIN PF0
|
||||
#define Y_ENABLE_PIN PE6
|
||||
#define Y_CS_PIN PE3
|
||||
|
||||
#define Z_STEP_PIN PD11
|
||||
#define Z_DIR_PIN PE2
|
||||
#define Z_ENABLE_PIN PE10
|
||||
#define Z_CS_PIN PE12
|
||||
|
||||
#define E0_STEP_PIN PB6
|
||||
#define E0_DIR_PIN PB2
|
||||
#define E0_ENABLE_PIN PG14
|
||||
#define E0_CS_PIN PG9
|
||||
|
||||
#if HAS_TMC_UART
|
||||
#define X_SERIAL_TX_PIN PB9
|
||||
#define X_SERIAL_RX_PIN PB9
|
||||
|
||||
#define Y_SERIAL_TX_PIN PE3
|
||||
#define Y_SERIAL_RX_PIN PE3
|
||||
|
||||
#define Z_SERIAL_TX_PIN PE12
|
||||
#define Z_SERIAL_RX_PIN PE12
|
||||
|
||||
#define E_SERIAL_TX_PIN PG9
|
||||
#define E_SERIAL_RX_PIN PG9
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA3
|
||||
#define TEMP_BED_PIN PC0
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PA15 // PWM Capable, TIM2_CH1
|
||||
#define HEATER_BED_PIN PB3 // PWM Capable, TIM2_CH2
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PB10 // PWM Capable, TIM2_CH3
|
||||
#endif
|
||||
#define FAN1_PIN PB11 // PWM Capable, TIM2_CH4
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN FAN1_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
#define SERVO0_PIN PB4 // PWM Capable, TIM3_CH1
|
||||
#define SERVO1_PIN PB5 // PWM Capable, TIM3_CH2
|
||||
|
||||
// SPI for external SD Card (Not entirely sure this will work)
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_SS_PIN PA4
|
||||
#define SDSS PA4
|
||||
|
||||
#define LED_PIN LED_BLUE
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if IS_RRD_FG_SC
|
||||
#define BEEPER_PIN PC7 // LCD_BEEPER
|
||||
#define BTN_ENC PE11 // BTN_ENC
|
||||
#define SD_DETECT_PIN PD14
|
||||
#define LCD_PINS_RS PF12 // LCD_RS
|
||||
#define LCD_PINS_ENABLE PD15 // LCD_EN
|
||||
#define LCD_PINS_D4 PB13 // LCD_D4
|
||||
#define BTN_EN1 PF13 // BTN_EN1
|
||||
#define BTN_EN2 PE9 // BTN_EN2
|
||||
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(63)
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(780)
|
||||
#endif
|
||||
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(STM32F7xx)
|
||||
#error "Oops! Select an STM32F7 board in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "RemRam v1"
|
||||
#define DEFAULT_MACHINE_NAME "RemRam"
|
||||
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define SRAM_EEPROM_EMULATION // Emulate the EEPROM using Backup SRAM
|
||||
#endif
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "RemRam only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#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"
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN 32
|
||||
#endif
|
||||
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,236 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if NOT_TARGET(STM32H7)
|
||||
#error "Oops! Select an STM32H7 board in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
#define BOARD_INFO_NAME "BTT SKR SE BX"
|
||||
#define DEFAULT_MACHINE_NAME "BIQU-BX"
|
||||
|
||||
// Onboard I2C EEPROM
|
||||
#define I2C_EEPROM
|
||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (24C32 ... 32Kb = 4KB)
|
||||
|
||||
// USB Flash Drive support
|
||||
#define HAS_OTG_USB_HOST_SUPPORT
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_MIN_PIN PB11
|
||||
#define X_MAX_PIN PD13
|
||||
#define Y_MIN_PIN PB12
|
||||
#define Y_MAX_PIN PB13
|
||||
#define Z_MIN_PIN PD12
|
||||
#define Z_MAX_PIN PD11
|
||||
|
||||
#define FIL_RUNOUT_PIN PD13
|
||||
#define FIL_RUNOUT2_PIN PB13
|
||||
|
||||
#define LED_PIN PA13
|
||||
#define BEEPER_PIN PA14
|
||||
|
||||
#define TFT_BACKLIGHT_PIN PB5
|
||||
|
||||
#define POWER_MONITOR_PIN PB0
|
||||
#define RPI_POWER_PIN PE5
|
||||
|
||||
#define SAFE_POWER_PIN PI11
|
||||
#define SERVO0_PIN PA2
|
||||
|
||||
//
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PH2 // Probe
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PG13
|
||||
#define X_DIR_PIN PG12
|
||||
#define X_ENABLE_PIN PG14
|
||||
#define X_CS_PIN PG10
|
||||
|
||||
#define Y_STEP_PIN PB3
|
||||
#define Y_DIR_PIN PD3
|
||||
#define Y_ENABLE_PIN PB4
|
||||
#define Y_CS_PIN PD4
|
||||
|
||||
#define Z_STEP_PIN PD7
|
||||
#define Z_DIR_PIN PD6
|
||||
#define Z_ENABLE_PIN PG9
|
||||
#define Z_CS_PIN PD5
|
||||
|
||||
#define E0_STEP_PIN PC14
|
||||
#define E0_DIR_PIN PC13
|
||||
#define E0_ENABLE_PIN PC15
|
||||
#define E0_CS_PIN PI8
|
||||
|
||||
#define E1_STEP_PIN PA8
|
||||
#define E1_DIR_PIN PC9
|
||||
#define E1_ENABLE_PIN PD2
|
||||
#define E1_CS_PIN PC8
|
||||
|
||||
//
|
||||
// Software SPI pins for TMC2130 stepper drivers
|
||||
//
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PC6
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PG3
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PC7
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
* Hardware serial communication ports.
|
||||
* If undefined software serial is used according to the pins below
|
||||
*/
|
||||
//#define X_HARDWARE_SERIAL 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 PG10
|
||||
#define X_SERIAL_RX_PIN PG10
|
||||
|
||||
#define Y_SERIAL_TX_PIN PD4
|
||||
#define Y_SERIAL_RX_PIN PD4
|
||||
|
||||
#define Z_SERIAL_TX_PIN PD5
|
||||
#define Z_SERIAL_RX_PIN PD5
|
||||
|
||||
#define E0_SERIAL_TX_PIN PI8
|
||||
#define E0_SERIAL_RX_PIN PI8
|
||||
|
||||
#define E1_SERIAL_TX_PIN PC8
|
||||
#define E1_SERIAL_RX_PIN PC8
|
||||
|
||||
// Reduce baud rate to improve software serial reliability
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PH4 // TH0
|
||||
#define TEMP_1_PIN PA3 // TH1
|
||||
#define TEMP_BED_PIN PH5 // TB
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PC4
|
||||
#define HEATER_1_PIN PC5
|
||||
#define HEATER_BED_PIN PA4
|
||||
|
||||
#define FAN_PIN PA5 // "FAN0"
|
||||
#define FAN1_PIN PA6 // "FAN1"
|
||||
#define FAN2_PIN PA7 // "FAN2"
|
||||
|
||||
#define NEOPIXEL_PIN PH3
|
||||
#define NEOPIXEL2_PIN PB1
|
||||
|
||||
#if HAS_LTDC_TFT
|
||||
|
||||
// LTDC_LCD Timing
|
||||
#define LTDC_LCD_CLK 50 // LTDC clock frequency = 50Mhz
|
||||
#define LTDC_LCD_HSYNC 30 // Horizontal synchronization
|
||||
#define LTDC_LCD_HBP 114 // Horizontal back porch
|
||||
#define LTDC_LCD_HFP 16 // Horizontal front porch
|
||||
#define LTDC_LCD_VSYNC 3 // Vertical synchronization
|
||||
#define LTDC_LCD_VBP 32 // Vertical back porch
|
||||
#define LTDC_LCD_VFP 10 // Vertical front porch
|
||||
|
||||
#define TFT_BACKLIGHT_PIN PB5
|
||||
#define LCD_DE_PIN PF10
|
||||
#define LCD_CLK_PIN PG7
|
||||
#define LCD_VSYNC_PIN PI9
|
||||
#define LCD_HSYNC_PIN PI10
|
||||
#define LCD_R7_PIN PG6 // R5
|
||||
#define LCD_R6_PIN PH12
|
||||
#define LCD_R5_PIN PH11
|
||||
#define LCD_R4_PIN PH10
|
||||
#define LCD_R3_PIN PH9
|
||||
#define LCD_G7_PIN PI2 // G6
|
||||
#define LCD_G6_PIN PI1
|
||||
#define LCD_G5_PIN PI0
|
||||
#define LCD_G4_PIN PH15
|
||||
#define LCD_G3_PIN PH14
|
||||
#define LCD_G2_PIN PH13
|
||||
#define LCD_B7_PIN PI7 // B5
|
||||
#define LCD_B6_PIN PI6
|
||||
#define LCD_B5_PIN PI5
|
||||
#define LCD_B4_PIN PI4
|
||||
#define LCD_B3_PIN PG11
|
||||
|
||||
// GT911 Capacitive Touch Sensor
|
||||
#if ENABLED(TFT_TOUCH_DEVICE_GT911)
|
||||
#define GT911_RST_PIN PE4
|
||||
#define GT911_INT_PIN PE3
|
||||
#define GT911_SW_I2C_SCL_PIN PE2
|
||||
#define GT911_SW_I2C_SDA_PIN PE6
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if IS_NEWPANEL
|
||||
#define BTN_EN1 PH6
|
||||
#define BTN_EN2 PH7
|
||||
#define BTN_ENC PH8
|
||||
#endif
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#define SOFTWARE_SPI
|
||||
#define SDSS PA15
|
||||
#define SS_PIN SDSS
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#define SD_DETECT_PIN PI3
|
||||
Reference in New Issue
Block a user