2019-09-15 20:23:04 +00:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 14:00:57 +00:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2019-09-15 20:23:04 +00:00
|
|
|
*
|
|
|
|
* 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
|
2020-07-23 03:20:14 +00:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2019-09-15 20:23:04 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2021-03-05 10:30:52 +00:00
|
|
|
#define ALLOW_STM32DUINO
|
|
|
|
#include "env_validate.h"
|
|
|
|
|
|
|
|
#if HOTENDS > 1 || E_STEPPERS > 1
|
2020-12-15 06:44:00 +00:00
|
|
|
#error "LERDGE X only supports one hotend / E-stepper. Comment out this line to continue."
|
2019-09-15 20:23:04 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define BOARD_INFO_NAME "Lerdge X"
|
|
|
|
#define DEFAULT_MACHINE_NAME "LERDGE"
|
|
|
|
|
2020-08-22 06:22:14 +00:00
|
|
|
#define STEP_TIMER 4
|
|
|
|
#define TEMP_TIMER 2
|
2020-07-06 22:08:52 +00:00
|
|
|
|
|
|
|
#define I2C_EEPROM
|
2021-03-12 02:12:24 +00:00
|
|
|
#define I2C_SCL_PIN PB8
|
|
|
|
#define I2C_SDA_PIN PB9
|
|
|
|
#define MARLIN_EEPROM_SIZE 0x10000 // FM24CL64 F-RAM 64K (8Kx8)
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2021-01-21 07:26:12 +00:00
|
|
|
// USB Flash Drive support
|
|
|
|
#define HAS_OTG_USB_HOST_SUPPORT
|
|
|
|
|
2019-09-15 20:23:04 +00:00
|
|
|
//
|
|
|
|
// Servos
|
|
|
|
//
|
2020-07-06 22:08:52 +00:00
|
|
|
//#define SERVO0_PIN PD13
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Limit Switches
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define X_STOP_PIN PB12
|
|
|
|
#define Y_STOP_PIN PB13
|
|
|
|
#define Z_STOP_PIN PB14
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Filament runout
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define FIL_RUNOUT_PIN PE1
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Z Probe (when not Z_MIN_PIN)
|
|
|
|
//
|
|
|
|
//#ifndef Z_MIN_PROBE_PIN
|
2020-07-06 22:08:52 +00:00
|
|
|
// #define Z_MIN_PROBE_PIN PB15
|
2019-09-15 20:23:04 +00:00
|
|
|
//#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Steppers
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define X_STEP_PIN PB10
|
|
|
|
#define X_DIR_PIN PB2
|
|
|
|
#define X_ENABLE_PIN PB11
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Y_STEP_PIN PB0
|
|
|
|
#define Y_DIR_PIN PC5
|
|
|
|
#define Y_ENABLE_PIN PB1
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Z_STEP_PIN PA7
|
|
|
|
#define Z_DIR_PIN PA6
|
|
|
|
#define Z_ENABLE_PIN PC4
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define E0_STEP_PIN PA4
|
|
|
|
#define E0_DIR_PIN PA3
|
|
|
|
#define E0_ENABLE_PIN PA5
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Temperature Sensors
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define TEMP_0_PIN PC0 // Analog Input
|
|
|
|
#define TEMP_1_PIN -1 // Analog Input
|
|
|
|
#define TEMP_BED_PIN PC1 // Analog Input
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Heaters / Fans
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define HEATER_0_PIN PA1
|
|
|
|
#define HEATER_1_PIN -1
|
|
|
|
#define HEATER_BED_PIN PA2
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2020-07-06 22:08:52 +00:00
|
|
|
//#ifndef FAN_PIN
|
|
|
|
// #define FAN_PIN PC15
|
|
|
|
//#endif
|
2020-03-22 02:13:19 +00:00
|
|
|
#define FAN1_PIN PC15
|
|
|
|
#define FAN2_PIN PA0
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2020-04-16 08:24:41 +00:00
|
|
|
#ifndef E0_AUTO_FAN_PIN
|
|
|
|
#define E0_AUTO_FAN_PIN PC15 // FAN1_PIN
|
|
|
|
#endif
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// LED / Lighting
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
//#define CASE_LIGHT_PIN_CI -1
|
|
|
|
//#define CASE_LIGHT_PIN_DO -1
|
|
|
|
//#define NEOPIXEL_PIN -1
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Misc. Functions
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define SDSS PC11
|
|
|
|
#define LED_PIN PC7 // Alive
|
|
|
|
#define PS_ON_PIN -1
|
|
|
|
#define KILL_PIN -1
|
2020-07-06 22:08:52 +00:00
|
|
|
|
|
|
|
// Lerdge supports auto-power off and power loss sense through a single pin.
|
2020-08-22 06:22:14 +00:00
|
|
|
#define POWER_LOSS_PIN PC14 // Power-loss / nAC_FAULT
|
2019-09-15 20:23:04 +00:00
|
|
|
|
2021-01-01 20:31:15 +00:00
|
|
|
#define SD_SCK_PIN PC12
|
|
|
|
#define SD_MISO_PIN PC8
|
|
|
|
#define SD_MOSI_PIN PD2
|
|
|
|
#define SD_SS_PIN PC11
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// SD support
|
|
|
|
//
|
|
|
|
#define SDIO_SUPPORT
|
2020-07-06 22:08:52 +00:00
|
|
|
#define SD_DETECT_PIN PA8
|
2020-12-31 04:00:36 +00:00
|
|
|
#define SDIO_CLOCK 4800000
|
2019-09-15 20:23:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// LCD / Controller
|
|
|
|
//
|
|
|
|
|
|
|
|
// The LCD is initialized in FSMC mode
|
2020-03-22 02:13:19 +00:00
|
|
|
#define BEEPER_PIN PD12
|
|
|
|
|
|
|
|
#define BTN_EN1 PE3
|
|
|
|
#define BTN_EN2 PE4
|
|
|
|
#define BTN_ENC PE2
|
|
|
|
|
2020-07-06 22:08:52 +00:00
|
|
|
#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
|