|
| 1 | +/** |
| 2 | + * Marlin 3D Printer Firmware |
| 3 | + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] |
| 4 | + * |
| 5 | + * Based on Sprinter and grbl. |
| 6 | + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
| 7 | + * |
| 8 | + * This program is free software: you can redistribute it and/or modify |
| 9 | + * it under the terms of the GNU General Public License as published by |
| 10 | + * the Free Software Foundation, either version 3 of the License, or |
| 11 | + * (at your option) any later version. |
| 12 | + * |
| 13 | + * This program is distributed in the hope that it will be useful, |
| 14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | + * GNU General Public License for more details. |
| 17 | + * |
| 18 | + * You should have received a copy of the GNU General Public License |
| 19 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 20 | + * |
| 21 | + */ |
| 22 | +#pragma once |
| 23 | + |
| 24 | +#include "env_validate.h" |
| 25 | + |
| 26 | +#define BOARD_INFO_NAME "XTLW Climber-8th-LPC" |
| 27 | + |
| 28 | +// |
| 29 | +// Servos |
| 30 | +// |
| 31 | +#define SERVO0_PIN P1_26 |
| 32 | + |
| 33 | +// |
| 34 | +// Limit Switches |
| 35 | +// |
| 36 | +#define X_MIN_PIN P1_29 |
| 37 | +#define X_MAX_PIN P1_28 |
| 38 | +#define Y_STOP_PIN P1_25 |
| 39 | +#define Z_STOP_PIN P1_22 |
| 40 | + |
| 41 | +// |
| 42 | +// Steppers |
| 43 | +// |
| 44 | +#define X_STEP_PIN P2_00 |
| 45 | +#define X_DIR_PIN P1_01 |
| 46 | +#define X_ENABLE_PIN P1_00 |
| 47 | +#ifndef X_CS_PIN |
| 48 | + #define X_CS_PIN P1_04 |
| 49 | +#endif |
| 50 | + |
| 51 | +#define X2_STEP_PIN P2_05 |
| 52 | +#define X2_DIR_PIN P0_11 |
| 53 | +#define X2_ENABLE_PIN P2_13 |
| 54 | +#ifndef X2_CS_PIN |
| 55 | + #define X2_CS_PIN P0_10 |
| 56 | +#endif |
| 57 | + |
| 58 | +#define Y_STEP_PIN P2_01 |
| 59 | +#define Y_DIR_PIN P1_09 |
| 60 | +#define Y_ENABLE_PIN P1_08 |
| 61 | +#ifndef Y_CS_PIN |
| 62 | + #define Y_CS_PIN P1_10 |
| 63 | +#endif |
| 64 | + |
| 65 | +#define Z_STEP_PIN P2_02 |
| 66 | +#define Z_DIR_PIN P1_15 |
| 67 | +#define Z_ENABLE_PIN P1_14 |
| 68 | +#ifndef Z_CS_PIN |
| 69 | + #define Z_CS_PIN P1_16 |
| 70 | +#endif |
| 71 | + |
| 72 | +#define E0_STEP_PIN P2_03 |
| 73 | +#define E0_DIR_PIN P4_29 |
| 74 | +#define E0_ENABLE_PIN P1_17 |
| 75 | +#ifndef E0_CS_PIN |
| 76 | + #define E0_CS_PIN P4_28 |
| 77 | +#endif |
| 78 | + |
| 79 | +#define E1_STEP_PIN P2_04 |
| 80 | +#define E1_DIR_PIN P2_11 |
| 81 | +#define E1_ENABLE_PIN P0_04 |
| 82 | +#ifndef E1_CS_PIN |
| 83 | + #define E1_CS_PIN P2_12 |
| 84 | +#endif |
| 85 | + |
| 86 | +// |
| 87 | +// Software SPI pins for TMC2130 stepper drivers |
| 88 | +// |
| 89 | +#if ENABLED(TMC_USE_SW_SPI) |
| 90 | + #ifndef TMC_SW_MOSI |
| 91 | + #define TMC_SW_MOSI P0_20 |
| 92 | + #endif |
| 93 | + #ifndef TMC_SW_MISO |
| 94 | + #define TMC_SW_MISO P0_19 |
| 95 | + #endif |
| 96 | + #ifndef TMC_SW_SCK |
| 97 | + #define TMC_SW_SCK P0_21 |
| 98 | + #endif |
| 99 | +#endif |
| 100 | + |
| 101 | +#if HAS_TMC_UART |
| 102 | + |
| 103 | + #define X_SERIAL_TX_PIN P1_04 |
| 104 | + #define X_SERIAL_RX_PIN P1_04 |
| 105 | + |
| 106 | + #define X2_SERIAL_TX_PIN P0_10 |
| 107 | + #define X2_SERIAL_RX_PIN P0_10 |
| 108 | + |
| 109 | + #define Y_SERIAL_TX_PIN P1_10 |
| 110 | + #define Y_SERIAL_RX_PIN P1_10 |
| 111 | + |
| 112 | + #define Z_SERIAL_TX_PIN P1_16 |
| 113 | + #define Z_SERIAL_RX_PIN P1_16 |
| 114 | + |
| 115 | + #define E0_SERIAL_TX_PIN P4_28 |
| 116 | + #define E0_SERIAL_RX_PIN P4_28 |
| 117 | + |
| 118 | + #define E1_SERIAL_TX_PIN P2_12 |
| 119 | + #define E1_SERIAL_RX_PIN P2_12 |
| 120 | + |
| 121 | +#endif |
| 122 | + |
| 123 | +// |
| 124 | +// Temperature Sensors |
| 125 | +// |
| 126 | +#define TEMP_0_PIN P0_26_A3 // (T4) |
| 127 | +#define TEMP_1_PIN P0_25_A2 // (T3) |
| 128 | +#define TEMP_BED_PIN P0_23_A0 // (T1) |
| 129 | + |
| 130 | +// |
| 131 | +// Heaters / Fans |
| 132 | +// |
| 133 | +#define HEATER_BED_PIN P3_26 |
| 134 | +#define HEATER_0_PIN P3_25 |
| 135 | +#define HEATER_1_PIN P1_20 |
| 136 | + |
| 137 | +#define FAN0_PIN P1_18 |
| 138 | +#define FAN1_PIN P1_23 |
| 139 | +#define FAN2_PIN P1_21 |
| 140 | +#define FAN3_PIN P0_24 |
| 141 | +#define FAN4_PIN P1_24 |
| 142 | + |
| 143 | +// |
| 144 | +// Filament sensor |
| 145 | +// |
| 146 | +#define FIL_RUNOUT_PIN P1_27 |
| 147 | +#define FIL_RUNOUT2_PIN P0_27 |
| 148 | + |
| 149 | +// |
| 150 | +// SD Connection |
| 151 | +// |
| 152 | +#ifndef SDCARD_CONNECTION |
| 153 | + #define SDCARD_CONNECTION ONBOARD |
| 154 | +#endif |
| 155 | + |
| 156 | +#if SD_CONNECTION_IS(ONBOARD) |
| 157 | + #define SD_SS_PIN P0_06 |
| 158 | + #define SD_SCK_PIN P0_07 |
| 159 | + #define SD_MISO_PIN P0_08 |
| 160 | + #define SD_MOSI_PIN P0_09 |
| 161 | + #define SD_DETECT_PIN P0_05 |
| 162 | +#elif SD_CONNECTION_IS(LCD) |
| 163 | + #define SD_SCK_PIN P0_15 |
| 164 | + #define SD_MISO_PIN P0_17 |
| 165 | + #define SD_MOSI_PIN P0_18 |
| 166 | + #define SD_SS_PIN P0_16 |
| 167 | + #define SD_DETECT_PIN P2_06 |
| 168 | +#endif |
| 169 | + |
| 170 | +/** |
| 171 | + * ----- ----- |
| 172 | + * NC | 1 2 | GND 5V | 1 2 | GND |
| 173 | + * RESET | 3 4 | P2_06 (SD_DETECT) (LCD_D7) P1_31 | 3 4 | P1_30 (LCD_D6) |
| 174 | + * (MOSI) P0_18 | 5 6 P0_01 (BTN_EN2) (LCD_D5) P2_08 | 5 6 P1_19 (LCD_D4) |
| 175 | + *(SD_SS) P0_16 | 7 8 | P0_00 (BTN_EN1) (LCD_RS) P2_10 | 7 8 | P0_22 (LCD_EN) |
| 176 | + * (SCK) P0_15 | 9 10| P0_17 (MISO) (BTN_ENC) P0_28 | 9 10| P2_07 (BEEPER) |
| 177 | + * ----- ----- |
| 178 | + * EXP2 EXP1 |
| 179 | + */ |
| 180 | + |
| 181 | +// |
| 182 | +// LCDs and Controllers |
| 183 | +// |
| 184 | +#if IS_TFTGLCD_PANEL |
| 185 | + |
| 186 | + #if ENABLED(TFTGLCD_PANEL_SPI) |
| 187 | + #define TFTGLCD_CS P0_00 |
| 188 | + #endif |
| 189 | + |
| 190 | + #define SD_DETECT_PIN P2_06 |
| 191 | + |
| 192 | +#elif HAS_WIRED_LCD |
| 193 | + |
| 194 | + #define BEEPER_PIN P2_07 |
| 195 | + #define BTN_ENC P0_28 |
| 196 | + |
| 197 | + #if ENABLED(CR10_STOCKDISPLAY) |
| 198 | + |
| 199 | + #define LCD_PINS_RS P1_30 |
| 200 | + |
| 201 | + #define BTN_EN1 P0_22 |
| 202 | + #define BTN_EN2 P1_19 |
| 203 | + |
| 204 | + #define LCD_PINS_EN P1_31 |
| 205 | + #define LCD_PINS_D4 P2_08 |
| 206 | + |
| 207 | + #else |
| 208 | + |
| 209 | + #define BTN_EN1 P0_00 |
| 210 | + #define BTN_EN2 P0_01 |
| 211 | + |
| 212 | + #define LCD_SDSS P0_16 |
| 213 | + |
| 214 | + #if ENABLED(MKS_12864OLED_SSD1306) |
| 215 | + |
| 216 | + #define LCD_PINS_DC P2_08 |
| 217 | + #define DOGLCD_CS P2_10 |
| 218 | + #define DOGLCD_A0 LCD_PINS_DC |
| 219 | + #define DOGLCD_SCK P1_19 |
| 220 | + #define DOGLCD_MOSI P0_22 |
| 221 | + |
| 222 | + #define LCD_PINS_RS P1_30 |
| 223 | + #define LCD_PINS_D7 P1_31 |
| 224 | + #define KILL_PIN -1 // NC |
| 225 | + |
| 226 | + #else // !MKS_12864OLED_SSD1306 |
| 227 | + |
| 228 | + #define LCD_PINS_RS P2_10 |
| 229 | + |
| 230 | + #define LCD_PINS_EN P0_22 |
| 231 | + #define LCD_PINS_D4 P1_19 |
| 232 | + |
| 233 | + #if ENABLED(FYSETC_MINI_12864) |
| 234 | + |
| 235 | + #define DOGLCD_CS P0_22 |
| 236 | + #define DOGLCD_A0 P2_10 |
| 237 | + #define DOGLCD_SCK P0_15 |
| 238 | + #define DOGLCD_MOSI P0_18 |
| 239 | + |
| 240 | + #define LCD_BACKLIGHT_PIN -1 |
| 241 | + |
| 242 | + #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems |
| 243 | + // results in LCD soft SPI mode 3, SD soft SPI mode 0 |
| 244 | + |
| 245 | + #define LCD_RESET_PIN P1_19 // Must be high or open for LCD to operate normally. |
| 246 | + |
| 247 | + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) |
| 248 | + #ifndef RGB_LED_R_PIN |
| 249 | + #define RGB_LED_R_PIN P2_08 |
| 250 | + #endif |
| 251 | + #ifndef RGB_LED_G_PIN |
| 252 | + #define RGB_LED_G_PIN P1_30 |
| 253 | + #endif |
| 254 | + #ifndef RGB_LED_B_PIN |
| 255 | + #define RGB_LED_B_PIN P1_31 |
| 256 | + #endif |
| 257 | + #elif ENABLED(FYSETC_MINI_12864_2_1) |
| 258 | + #define NEOPIXEL_PIN P2_08 |
| 259 | + #endif |
| 260 | + |
| 261 | + #else // !FYSETC_MINI_12864 |
| 262 | + |
| 263 | + #if ENABLED(MKS_MINI_12864) |
| 264 | + #define DOGLCD_CS P2_08 |
| 265 | + #define DOGLCD_A0 P1_30 |
| 266 | + #endif |
| 267 | + |
| 268 | + #if ENABLED(ULTIPANEL) |
| 269 | + #define LCD_PINS_D5 P2_08 |
| 270 | + #define LCD_PINS_D6 P1_30 |
| 271 | + #define LCD_PINS_D7 P1_31 |
| 272 | + #endif |
| 273 | + |
| 274 | + #endif // !FYSETC_MINI_12864 |
| 275 | + |
| 276 | + #endif // !MKS_12864OLED_SSD1306 |
| 277 | + |
| 278 | + #endif // !CR10_STOCKDISPLAY |
| 279 | + |
| 280 | +#endif // HAS_WIRED_LCD |
0 commit comments