update code base to Marlin 2.0.9.2

This commit is contained in:
Stefan Kalscheuer
2021-10-03 18:57:12 +02:00
parent b9d7ba838e
commit 7077da3591
2617 changed files with 332093 additions and 103438 deletions

View File

@@ -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(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif

12
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h Executable file → Normal file
View File

@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -25,19 +25,11 @@
* Azteeg X5 GT pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "Azteeg X5 GT"
#define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
//
// Servos
//

77
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h Executable file → Normal file
View File

@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -24,10 +24,7 @@
/**
* Azteeg X5 MINI pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Azteeg X5 MINI"
@@ -38,6 +35,9 @@
// LED
//
#define LED_PIN P1_18
#define LED2_PIN P1_20
#define LED3_PIN P1_19
#define LED4_PIN P1_21
//
// Servos
@@ -79,14 +79,13 @@
#define E0_ENABLE_PIN P0_04
//
// DIGIPOT slave addresses
// DIGIPOT slave addresses (7-bit unshifted)
//
#ifndef DIGIPOT_I2C_ADDRESS_A
#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
#define DIGIPOT_I2C_ADDRESS_A 0x2C
#endif
#ifndef DIGIPOT_I2C_ADDRESS_B
#define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT
#define DIGIPOT_I2C_ADDRESS_B 0x2E
#endif
//
@@ -109,7 +108,7 @@
//
// Display
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#if ENABLED(CR10_STOCKDISPLAY)
@@ -144,15 +143,15 @@
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define SHIFT_OUT P0_18 // (51) (MOSI) J3-10 & AUX-3
#define SHIFT_CLK P0_15 // (52) (SCK) J3-9 & AUX-3
#define SHIFT_LD P1_31 // (49) not 5V tolerant J3-1 & AUX-3
#elif DISABLED(NEWPANEL)
//#define SHIFT_OUT P2_11 // (35) J3-3 & AUX-4
//#define SHIFT_CLK P3_26 // (31) J3-2 & AUX-4
//#define SHIFT_LD P3_25 // (33) J3-4 & AUX-4
//#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4
#if IS_RRW_KEYPAD
#define SHIFT_OUT_PIN P0_18 // (51) (MOSI) J3-10 & AUX-3
#define SHIFT_CLK_PIN P0_15 // (52) (SCK) J3-9 & AUX-3
#define SHIFT_LD_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3
#elif !IS_NEWPANEL
//#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4
//#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4
//#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4
//#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4
#endif
#if ANY(VIKI2, miniVIKI)
@@ -160,19 +159,24 @@
#define BEEPER_PIN P1_30 // (37) may change if cable changes
#define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2
#define DOGLCD_SCK SCK_PIN
#define DOGLCD_MOSI MOSI_PIN
#define DOGLCD_SCK SD_SCK_PIN
#define DOGLCD_MOSI SD_MOSI_PIN
#define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes
#define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes
#else
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 P1_17 // (71) ENET_MDIO
#define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER
#define LCD_PINS_D7 P1_10 // (75) ENET_RXD1
#endif
#define BEEPER_PIN P1_30 // (37) not 5V tolerant
#define DOGLCD_CS P0_16 // (16)
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#if ENABLED(MINIPANEL)
@@ -185,15 +189,7 @@
#endif
#endif // HAS_SPI_LCD
//
// EEPROM
//
#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION)
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
#endif
#endif // HAS_WIRED_LCD
//
// SD Support
@@ -202,19 +198,18 @@
#define SDCARD_CONNECTION ONBOARD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN P1_23
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN P1_23
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif

14
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h Executable file → Normal file
View File

@@ -16,27 +16,19 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Azteeg X5 MINI pin assignments
* Azteeg X5 MINI WIFI pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "Azteeg X5 MINI WIFI"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
//
// DIGIPOT slave addresses
//

View File

@@ -0,0 +1,285 @@
/**
* 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
/**
* BigTreeTech SKR E3 Turbo pin assignments
*/
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BTT SKR E3 Turbo"
#endif
// Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32)
//
// Servos
//
#define SERVO0_PIN P1_23
//
// TMC StallGuard DIAG pins
//
#define X_DIAG_PIN P1_29 // X-STOP
#define Y_DIAG_PIN P1_28 // Y-STOP
#define Z_DIAG_PIN P1_27 // Z-STOP
#define E0_DIAG_PIN P1_26 // E0DET
#define E1_DIAG_PIN P1_25 // E1DET
//
// Limit Switches
#define X_STOP_PIN X_DIAG_PIN
#define Y_STOP_PIN Y_DIAG_PIN
#define Z_STOP_PIN Z_DIAG_PIN
//
// Z Probe
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_22
#endif
//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN P1_26 // E0DET
#define FIL_RUNOUT2_PIN P1_25 // E1DET
//
// Power Supply Control
//
#ifndef PS_ON_PIN
#define PS_ON_PIN P1_21
#endif
// LED driving pin
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN P1_24
#endif
//
// Power Loss Detection
//
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN P1_20 // PWRDET
#endif
//
// Steppers
//
#define X_STEP_PIN P1_04
#define X_DIR_PIN P1_08
#define X_ENABLE_PIN P1_00
#ifndef X_CS_PIN
#define X_CS_PIN P1_01
#endif
#define Y_STEP_PIN P1_14
#define Y_DIR_PIN P1_15
#define Y_ENABLE_PIN P1_09
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_10
#endif
#define Z_STEP_PIN P4_29
#define Z_DIR_PIN P4_28
#define Z_ENABLE_PIN P1_16
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_17
#endif
#define E0_STEP_PIN P2_06
#define E0_DIR_PIN P2_07
#define E0_ENABLE_PIN P0_04
#ifndef E0_CS_PIN
#define E0_CS_PIN P0_05
#endif
#define E1_STEP_PIN P2_11
#define E1_DIR_PIN P2_12
#define E1_ENABLE_PIN P0_21
#ifndef E1_CS_PIN
#define E1_CS_PIN P0_22
#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_SERIAL_TX_PIN P1_01
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_10
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_17
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P0_05
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P0_22
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
//
// TMC Low Power Standby pins
//
#define X_STDBY_PIN P3_26
#define Y_STDBY_PIN P3_25
#define Z_STDBY_PIN P1_18
#define E0_STDBY_PIN P1_19
#define E1_STDBY_PIN P2_13
//
// Temperature Sensors
//
#define TEMP_0_PIN P0_24
#define TEMP_1_PIN P0_23
#define TEMP_BED_PIN P0_25
#define TEMP_BOARD_PIN P1_30 // Onboard thermistor, NTC100K
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_03 // EXTRUDER 0
#define HEATER_1_PIN P2_04 // EXTRUDER 1
#define HEATER_BED_PIN P2_05 // BED
#define FAN_PIN P2_01
#define FAN1_PIN P2_02
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN FAN1_PIN
#endif
/**
* ------
* 5V | 1 2 | GND
* (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS)
* (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2)
* RESET | 7 8 | P0_19 (BTN_EN1)
* (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER)
* ------
* EXP
*/
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_17
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN P0_20
#define EXP1_07_PIN -1
#define EXP1_08_PIN P0_19
#define EXP1_09_PIN P0_16
#define EXP1_10_PIN P2_08
#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
#error "Ender-3 V2 display requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue."
/**
* Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo
* ------ ------ RX 8 --> 5 P0_15
* 5V | 1 2 | GND 5V | 1 2 | GND TX 7 --> 9 P0_16
* (BTN_E1) A | 3 4 | B (BTN_E2) (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) BEEPER 5 --> 10 P2_08
* BEEPER | 5 6 ENT (BTN_ENC) (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2)
* (SKR_RX1) TX | 7 8 | RX (SKR_TX1) Reset | 7 8 | P0_19 (BTN_EN1)
* NC | 9 10 | NC (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER)
* ------ ------
*/
#define BEEPER_PIN EXP1_10_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_04_PIN
#define BTN_ENC EXP1_06_PIN
#elif HAS_WIRED_LCD
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXP1_10_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP1_09_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_E3_TURBO.h' for details. Comment out this line to continue."
#define LCD_PINS_RS EXP1_05_PIN
#define LCD_PINS_ENABLE EXP1_09_PIN
#define LCD_PINS_D4 EXP1_04_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_08_PIN
#define LCD_PINS_D7 EXP1_10_PIN
#define ADC_KEYPAD_PIN P1_23 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP1_09_PIN
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_A0 EXP1_05_PIN
#define DOGLCD_SCK EXP1_10_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#else
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_SKR_E3_TURBO."
#endif
#endif // HAS_WIRED_LCD
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN P2_00
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define SD_SS_PIN P0_06
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "SD CUSTOM_CABLE is not compatible with SKR E3 Turbo."
#endif

14
Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h Executable file → Normal file
View File

@@ -16,21 +16,19 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#define BOARD_INFO_NAME "BIGTREE SKR 1.4 TURBO"
#define SKR_HAS_LPC1769
/**
* BigTreeTech SKR 1.4 Turbo pin assignments
*/
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
#define BOARD_INFO_NAME "BTT SKR V1.4 TURBO"
//
// Include SKR 1.4 pins
//
#define REQUIRE_LPC1769
#include "../lpc1768/pins_BTT_SKR_V1_4.h"

29
Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h Executable file → Normal file
View File

@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -25,18 +25,10 @@
* Cohesion3D Mini pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "Cohesion3D Mini"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
//
// Servos
//
@@ -110,10 +102,15 @@
// Auto fans
//
#define AUTO_FAN_PIN P2_04 // FET 4
#define ORIG_E0_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E1_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E2_AUTO_FAN_PIN AUTO_FAN_PIN
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// Misc. Functions
@@ -142,7 +139,7 @@
// connector are shared with the onboard SD card, and Marlin does not support reading
// G-code files from the onboard SD card.
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#define BEEPER_PIN P0_27 // EXP2-7 - open drain
@@ -161,7 +158,7 @@
#error "SDSUPPORT is not currently supported by the Cohesion3D boards"
#endif
#endif // HAS_SPI_LCD
#endif // HAS_WIRED_LCD
//
// Ethernet pins

52
Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h Executable file → Normal file
View File

@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -25,18 +25,10 @@
* Cohesion3D ReMix pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "Cohesion3D ReMix"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
//
// Servos
//
@@ -139,9 +131,15 @@
#else
#define AUTO_FAN_PIN P1_22 // FET 3
#endif
#define ORIG_E0_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E1_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E2_AUTO_FAN_PIN AUTO_FAN_PIN
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// Misc. Functions
@@ -206,7 +204,7 @@
#define NEOPIXEL_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left)
#endif
#elif HAS_SPI_LCD
#elif HAS_WIRED_LCD
#define BEEPER_PIN P1_31 // EXP1-1
//#define SD_DETECT_PIN P0_27 // EXP2-7
@@ -222,7 +220,7 @@
#define KILL_PIN P2_11 // EXP2-10
#endif // HAS_SPI_LCD
#endif // HAS_WIRED_LCD
//
// SD Support
@@ -231,19 +229,17 @@
#define SDCARD_CONNECTION ONBOARD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3
#define MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3
#define MOSI_PIN P0_09 // (51) system defined J3-10 & AUX-3
#define SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3
#define SD_MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3
#define SD_MOSI_PIN P0_09 // (51) system defined J3-10 & AUX-3
#if SD_CONNECTION_IS(LCD)
#define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin
#else
#undef SD_DETECT_PIN
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#endif
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif

View File

@@ -0,0 +1,183 @@
/**
* 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
/**
* FLYmaker FLY-CDY pin assignments
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "FLY-CDY"
#define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-CDY"
//
// Servos
//
#define SERVO0_PIN P1_26
//
// Limit Switches
//
#define X_MIN_PIN P1_29 // X-
#define X_MAX_PIN P1_28 // X+
#define Y_MIN_PIN P1_27 // Y-
#define Y_MAX_PIN P1_25 // Y+
#define Z_MIN_PIN P1_22 // Z-
#define Z_MAX_PIN P0_27 // Z+
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P1_01
#define X_ENABLE_PIN P1_00
#ifndef X_CS_PIN
#define X_CS_PIN P1_04
#endif
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P1_09
#define Y_ENABLE_PIN P1_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_10
#endif
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P1_15
#define Z_ENABLE_PIN P1_14
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_16
#endif
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P4_29
#define E0_ENABLE_PIN P1_17
#ifndef E0_CS_PIN
#define E0_CS_PIN P4_28
#endif
#define E1_STEP_PIN P2_04
#define E1_DIR_PIN P2_11
#define E1_ENABLE_PIN P0_04
#ifndef E1_CS_PIN
#define E1_CS_PIN P2_12
#endif
#define E2_STEP_PIN P2_05
#define E2_DIR_PIN P0_11
#define E2_ENABLE_PIN P2_13
#ifndef E2_CS_PIN
#define E2_CS_PIN P0_10
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P0_20
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_19
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_21
#endif
#endif
#if HAS_TMC_UART
#define X_SERIAL_TX_PIN P1_04
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_10
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_16
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P4_28
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P2_12
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN P0_10
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN P0_26_A3 // (T4)
#define TEMP_1_PIN P0_25_A2 // (T3)
#define TEMP_2_PIN P0_24_A1 // (T2)
#define TEMP_BED_PIN P0_23_A0 // (T1)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P3_26
#define HEATER_0_PIN P3_25
#define HEATER_1_PIN P1_20
#define HEATER_2_PIN P1_23
#ifndef FAN_PIN
#define FAN_PIN P1_18
#endif
#define FAN1_PIN P1_21
#define FAN2_PIN P1_24
//
// LCD / Controller
//
#define BEEPER_PIN P2_07
#define LCD_PINS_RS P2_10
#define LCD_PINS_ENABLE P0_22
#define LCD_PINS_D4 P1_19
#define LCD_PINS_D5 P2_08
#define LCD_PINS_D6 P1_30
#define LCD_PINS_D7 P1_31
#define BTN_EN1 P0_00
#define BTN_EN2 P0_01
#define BTN_ENC P0_28
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_SS_PIN P0_06
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define SD_DETECT_PIN P0_05
#elif SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN P0_16
#define SD_DETECT_PIN P2_06
#endif

52
Marlin/src/pins/lpc1769/pins_MKS_SGEN.h Executable file → Normal file
View File

@@ -16,59 +16,43 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS SGen pin assignments
*
* Pins diagram:
* https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20PIN.pdf
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#define BOARD_INFO_NAME "MKS SGen"
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
#define MKS_HAS_LPC1769
#define REQUIRE_LPC1769
#include "../lpc1768/pins_MKS_SBASE.h"
#undef E1_STEP_PIN
#undef E1_DIR_PIN
#undef E1_ENABLE_PIN
//#undef BTN_EN1
//#undef BTN_EN2
//#define BTN_EN1 P1_23 // EXP2.5
//#define BTN_EN2 P1_22 // EXP2.3
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* The shortage of pins becomes apparent.
* In the worst case you may have to give up the LCD.
* RX pins must be interrupt-capable.
*/
#define X_SERIAL_TX_PIN P4_29 // J8-2
#define X_SERIAL_RX_PIN P4_29 // J8-2
#define X_SERIAL_TX_PIN P1_22 // J8-2
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P2_08 // J8-3
#define Y_SERIAL_RX_PIN P2_08 // J8-3
#define Y_SERIAL_TX_PIN P1_23 // J8-3
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P2_11 // J8-4
#define Z_SERIAL_RX_PIN P2_11 // J8-4
#define E0_SERIAL_TX_PIN P2_13 // J8-5
#define E0_SERIAL_RX_PIN P2_13 // J8-5
#define Z_SERIAL_TX_PIN P2_12 // J8-4
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P2_11 // J8-5
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P4_28 // J8-6
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#define TMC_BAUD_RATE 19200
#endif

View File

@@ -0,0 +1,438 @@
/**
* 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
/**
* MKS SGen-L V2 pin assignments
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "MKS SGEN_L V2"
#define BOARD_WEBSITE_URL "github.com/makerbase-mks"
//
// EEPROM, MKS SGEN_L V2.0 hardware has 4K EEPROM on the board
//
#if NO_EEPROM_SELECTED
//#define SDCARD_EEPROM_EMULATION
//#define I2C_EEPROM // AT24C32
#define FLASH_EEPROM_EMULATION
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif
//
// Servos
//
#define SERVO0_PIN P1_23 // SERVO P1.23
#define SERVO1_PIN P2_00 // SERVO P2.0
//
// Trinamic Stallguard pins, can connect or disconnect by jumpers cap on the board
//
#define X_DIAG_PIN P1_29 // X-
#define Y_DIAG_PIN P1_27 // Y-
#define Z_DIAG_PIN P1_25 // Z-
#define E0_DIAG_PIN P1_28 // X+
#define E1_DIAG_PIN P1_26 // Y+
//
// Limit Switches
//
#if X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN P1_28 // X+
#else
#define X_MIN_PIN P1_28 // X+
#endif
#else
#define X_MIN_PIN P1_29 // X-
#define X_MAX_PIN P1_28 // X+
#endif
#if Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
#define Y_MAX_PIN P1_26 // Y+
#else
#define Y_MIN_PIN P1_26 // Y+
#endif
#else
#define Y_MIN_PIN P1_27 // Y-
#define Y_MAX_PIN P1_26 // Y+
#endif
#if Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN P1_24 // Z+
#else
#define Z_MIN_PIN P1_24 // Z+
#endif
#else
#define Z_MIN_PIN P1_25 // Z-
#define Z_MAX_PIN P1_24 // Z+
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_24
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_03
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_01
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_08
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_15
#endif
#define E1_STEP_PIN P1_09
#define E1_DIR_PIN P1_14
#define E1_ENABLE_PIN P0_10
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_17
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P1_16
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_05
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_04
#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
#define X_SERIAL_TX_PIN P1_01
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_08
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_10
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P1_15
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P1_17
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif // HAS_TMC_UART
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // Analog Input A0 (TH1)
#define TEMP_BED_PIN P0_24_A1 // Analog Input A1 (TB)
#define TEMP_1_PIN P0_25_A2 // Analog Input A2 (TH2)
#define TEMP_2_PIN P0_26_A3 // Analog Input A3 (P0.26, No pull up)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#if HAS_MULTI_HOTEND
#ifndef HEATER_1_PIN
#define HEATER_1_PIN P2_06
#endif
#else
#ifndef FAN2_PIN
#define FAN2_PIN P2_06 // HE1 for FAN3
#endif
#endif
#ifndef FAN_PIN
#define FAN_PIN P2_04 // FAN1
#endif
#ifndef FAN1_PIN
#define FAN1_PIN P1_04 // FAN2
#endif
//
// Misc. Functions
//
#define LED_PIN P1_18 // Used as a status indicator
//
// Power Supply Control
//
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P2_00 // SERVO1
#define KILL_PIN P1_24 // Z+
#define KILL_PIN_STATE HIGH
#endif
//
// RGB LED
//
#if ENABLED(RGB_LED)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_19
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_20
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_21
#endif
#else
#define LED2_PIN P1_19 // Initialized by HAL/LPC1768/main.cpp
#define LED3_PIN P1_20
#define LED4_PIN P1_21
#endif
/** ------ ------
* (BEEPER) 1.31 |10 9 | 1.30 (BTN_ENC) (MISO) 0.8 |10 9 | 0.7 (SD_SCK)
* (LCD_EN) 0.18 | 8 7 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 8 7 | 0.28 (SD_CS2)
* (LCD_D4) 0.15 | 6 5 | 0.17 (LCD_D5) (BTN_EN2) 3.26 | 6 5 | 0.9 (SD_MOSI)
* (LCD_D6) 1.0 | 4 3 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 4 3 | RST
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN P1_22
#define EXP1_04_PIN P1_00
#define EXP1_05_PIN P0_17
#define EXP1_06_PIN P0_15
#define EXP1_07_PIN P0_16
#define EXP1_08_PIN P0_18
#define EXP1_09_PIN P1_30
#define EXP1_10_PIN P1_31
#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN P0_27
#define EXP2_05_PIN P0_09
#define EXP2_06_PIN P3_26
#define EXP2_07_PIN P0_28
#define EXP2_08_PIN P3_25
#define EXP2_09_PIN P0_07
#define EXP2_10_PIN P0_08
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_08_PIN
#endif
#define SD_DETECT_PIN EXP2_04_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
#else
#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
#define LCD_SDSS EXP2_07_PIN
#if ENABLED(MKS_12864OLED_SSD1306)
#define LCD_PINS_DC EXP1_05_PIN
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 LCD_PINS_DC
#define DOGLCD_SCK EXP1_06_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_D7 EXP1_03_PIN
#define KILL_PIN -1 // NC
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_CS_PIN EXP1_04_PIN
#define TFT_A0_PIN EXP1_03_PIN
#define TFT_DC_PIN EXP1_03_PIN
#define TFT_MISO_PIN EXP2_10_PIN
#define TFT_BACKLIGHT_PIN EXP1_08_PIN
#define TFT_RESET_PIN EXP1_07_PIN
#define LCD_USE_DMA_SPI
#define TOUCH_INT_PIN EXP1_05_PIN
#define TOUCH_CS_PIN EXP1_06_PIN
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
// Disable any LCD related PINs config
#define LCD_PINS_ENABLE -1
#define LCD_PINS_RS -1
#ifndef TFT_BUFFER_SIZE
#define TFT_BUFFER_SIZE 1200
#endif
#ifndef TFT_QUEUE_SIZE
#define TFT_QUEUE_SIZE 6144
#endif
#else // !MKS_12864OLED_SSD1306
#define LCD_PINS_RS EXP1_07_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_SCK EXP2_09_PIN
#define DOGLCD_MOSI EXP2_05_PIN
#define LCD_BACKLIGHT_PIN -1
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#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
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS EXP1_05_PIN
#define DOGLCD_A0 EXP1_04_PIN
#endif
#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 // !FYSETC_MINI_12864
#endif // !MKS_12864OLED_SSD1306
#endif // !CR10_STOCKDISPLAY
#endif // HAS_WIRED_LCD
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN EXP2_04_PIN
#define SD_SCK_PIN EXP2_09_PIN
#define SD_MISO_PIN EXP2_10_PIN
#define SD_MOSI_PIN EXP2_05_PIN
#if SD_CONNECTION_IS(ONBOARD)
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#else
#define SD_SS_PIN EXP2_07_PIN
#endif
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// Other Pins
//
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PS_ON_PIN P1_23 // SERVO0 P1.23

83
Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h Executable file → Normal file
View File

@@ -16,28 +16,20 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Smoothieboard pin assignments
* Smoothieware Smoothieboard pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "Smoothieboard"
#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
//
// Servos
//
@@ -115,8 +107,73 @@
#define STAT_LED_RED_PIN P1_19
#define STAT_LED_BLUE_PIN P1_20
#elif HAS_SPI_LCD
#elif HAS_WIRED_LCD
#error "Marlin's Smoothieboard support cannot drive your LCD."
/**
* SD Support
*
* For the RRD GLCD it CANNOT share the same SPI as the LCD so it must be
* hooked up to the onboard SDCard SPI and use a spare pin for the SDCS.
* Also note that an external SDCard sharing the SPI port with the
* onboard/internal SDCard must be ejected before rebooting as the bootloader
* does not like the external card. NOTE Smoothie will not boot if the external
* sdcard is inserted in the RRD LCD sdcard slot at boot time, it must be
* inserted after it has booted.
*/
#define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET)
#define SD_MISO_PIN P0_08 // EXP2 Pin 1 (PB3, SD_MISO)
#define SD_SCK_PIN P0_07 // EXP2 Pin 2 (SD_SCK)
#define SD_SS_PIN P0_28 // EXP2 Pin 4 (SD_CSEL, SD_CS)
#define SD_MOSI_PIN P0_09 // EXP2 Pin 6 (PB2, SD_MOSI)
/**
* The Smoothieboard supports the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with either
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board
* found at http://smoothieware.org/rrdglcdadapter
*
* Other links to information about setting up a display panel with Smoothieboard
* http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg
* http://smoothieware.org/panel
*/
#if IS_RRD_FG_SC
// EXP1 Pins
#define BEEPER_PIN P1_31 // EXP1 Pin 1
#define BTN_ENC P1_30 // EXP1 Pin 2
#define LCD_PINS_ENABLE P0_18 // EXP1 Pin 3 (MOSI)
#define LCD_PINS_RS P0_16 // EXP1 Pin 4 (CS)
#define LCD_PINS_D4 P0_15 // EXP1 Pin 5 (SCK)
// EXP2 Pins
#define BTN_EN2 P3_26 // EXP2 Pin 3
#define BTN_EN1 P3_25 // EXP2 Pin 5
#elif IS_TFTGLCD_PANEL
#define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET)
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS P3_26 // EXP2 Pin 3
#endif
#else
#error "Marlin's Smoothieboard support cannot drive your LCD."
#endif
#endif
/**
* I2C Digipots - MCP4451
* Address 58 (2C << 1)
* Set from 0 - 127 with stop bit.
* (Ex. 3F << 1 | 1)
*/
#define DIGIPOTS_I2C_SCL P0_00
#define DIGIPOTS_I2C_SDA_X P0_04
#define DIGIPOTS_I2C_SDA_Y P0_10
#define DIGIPOTS_I2C_SDA_Z P0_19
#define DIGIPOTS_I2C_SDA_E0 P0_21
#define DIGIPOTS_I2C_SDA_E1 P4_29
#ifndef DIGIPOT_I2C_ADDRESS_A
#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address (58 <- 2C << 1)
#endif

138
Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h Executable file → Normal file
View File

@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -25,30 +25,32 @@
* TH3D EZBoard pin assignments
*/
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#include "env_validate.h"
//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config
#define BOARD_INFO_NAME "TH3D EZBoard"
#define BOARD_WEBSITE_URL "th3dstudio.com"
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
//#define SDCARD_EEPROM_EMULATION
//
// Servos
//
#define SERVO0_PIN P2_04
#if ENABLED(V3_EZABL_ON_SERVO)
#define SERVO0_PIN -1
#else
#define SERVO0_PIN P2_04
#endif
//
// Limit Switches
//
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_25
#define Z_STOP_PIN P1_26
#if ENABLED(V3_EZABL_ON_SERVO)
#define Z_STOP_PIN P2_04
#else
#define Z_STOP_PIN P1_26
#endif
//
// Filament Runout Sensor
@@ -83,19 +85,21 @@
#if HAS_TMC_UART
//
// TMC220x stepper drivers
// Software serial
//
#define X_SERIAL_TX_PIN P0_04
#define X_SERIAL_RX_PIN P0_05
#define Y_SERIAL_TX_PIN P0_10
#define Y_SERIAL_RX_PIN P0_11
#define Z_SERIAL_TX_PIN P0_19
#define Z_SERIAL_RX_PIN P0_20
#define E0_SERIAL_TX_PIN P0_22
#define E0_SERIAL_RX_PIN P0_21
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#define TMC_BAUD_RATE 19200
#endif
//
@@ -109,13 +113,6 @@
#endif
#define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24
#define TEMP_1_PIN P0_25_A2 // Analog Input P0_25
#if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILWIDTH_PIN P0_26_A3 // Analog Input P0_26
#else
#define TEMP_2_PIN P0_26_A3 // Analog Input P0_26
#endif
//
// Heaters / Fans
@@ -131,9 +128,15 @@
// Auto fans
//
#define AUTO_FAN_PIN P1_22 // FET 3
#define ORIG_E0_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E1_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E2_AUTO_FAN_PIN AUTO_FAN_PIN
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// SD Card
@@ -141,43 +144,84 @@
#define SDCARD_CONNECTION ONBOARD
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
//#define SD_DETECT_PIN P0_25 // SD_CD
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06
#define SS_PIN ONBOARD_SD_CS_PIN
#define SD_SS_PIN ONBOARD_SD_CS_PIN
//
// LCD / Controller
//
/**
* _____
* 5V | · · | GND
* (LCD_EN) P0_18 | · · | P0_16 (LCD_RS)
* (LCD_D4) P0_15 | · · | P3_25 (BTN_EN2)
* (RESET) P2_11 | · · | P3_26 (BTN_EN1)
* (BTN_ENC) P1_30 | · · | P1_31 (BEEPER)
* -----
* EXP1
* ------
* 5V | 1 2 | GND
* P0_18 | 3 4 | P0_16
* P0_15 | 5 6 P3_25
* P2_11 | 7 8 | P3_26
* P1_30 | 9 10 | P1_31
* ------
* EXP1
*
* LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
* defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
*
* A remote SD card is currently not supported because the pins routed to the EXP2
* connector are shared with the onboard SD card.
*
*/
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN P3_25
#define EXP1_07_PIN P2_11
#define EXP1_08_PIN P3_26
#define EXP1_09_PIN P1_30
#define EXP1_10_PIN P1_31
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN P1_31
#define BTN_EN1 P3_26
#define BTN_EN2 P3_25
#define BTN_ENC P1_30
#define LCD_PINS_RS P0_16
#define LCD_PINS_ENABLE P0_18
#define LCD_PINS_D4 P0_15
#define KILL_PIN P2_11
#elif HAS_SPI_LCD
#error "Only the CR10_STOCKDISPLAY is supported with TH3D EZBoard."
/** ------
* 5V | 1 2 | GND
* LCD_EN | 3 4 | LCD_RS
* LCD_D4 | 5 6 EN2
* KILL | 7 8 | EN1
* ENC | 9 10 | BEEPER
* ------
*/
#define BEEPER_PIN EXP1_10_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define KILL_PIN EXP1_07_PIN
#elif ENABLED(MKS_MINI_12864)
/** ------
* 5V | 1 2 | GND
* SPI-MOSI | 3 4 | SPI-CS
* A0 | 5 6 EN2
* -- | 7 8 | EN1
* ENC | 9 10 | SPI-SCK
* ------
*/
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_A0 EXP1_05_PIN
#define DOGLCD_SCK EXP1_10_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define LCD_CONTRAST_INIT 160
#define LCD_CONTRAST_MIN 120
#define LCD_CONTRAST_MAX 180
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#elif HAS_WIRED_LCD
#error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard."
#endif
#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864)
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP1_09_PIN
#endif