Sfoglia il codice sorgente

Support MKS SGen board (#13694)

Laurent 6 anni fa
parent
commit
df75a606ff

+ 1
- 0
Marlin/src/core/boards.h Vedi File

@@ -194,6 +194,7 @@
194 194
 #define BOARD_BIQU_B300_V1_0      1760  // BIQU B300_V1.0 (Power outputs: Hotend0, Fan, Bed, SPI Driver)
195 195
 #define BOARD_BIGTREE_SKR_V1_3    1761  // BIGTREE SKR_V1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed)
196 196
 #define BOARD_AZTEEG_X5_MINI      1762  // Azteeg X5 Mini (Power outputs: Hotend0, Bed, Fan)
197
+#define BOARD_MKS_SGEN            1763  // MKS-SGen (Power outputs: Hotend0, Hotend1, Bed, Fan)
197 198
 
198 199
 //
199 200
 // SAM3X8E ARM Cortex M3

+ 2
- 0
Marlin/src/pins/pins.h Vedi File

@@ -316,6 +316,8 @@
316 316
   #include "pins_RAMPS_RE_ARM.h"        // LPC1768                                    env:LPC1768
317 317
 #elif MB(MKS_SBASE)
318 318
   #include "pins_MKS_SBASE.h"           // LPC1768                                    env:LPC1768
319
+#elif MB(MKS_SGEN)
320
+  #include "pins_MKS_SGEN.h"            // LPC1769                                    env:LPC1769
319 321
 #elif MB(AZSMZ_MINI)
320 322
   #include "pins_AZSMZ_MINI.h"          // LPC1768                                    env:LPC1768
321 323
 #elif MB(AZTEEG_X5_GT)

+ 7
- 3
Marlin/src/pins/pins_MKS_SBASE.h Vedi File

@@ -28,8 +28,12 @@
28 28
   #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
29 29
 #endif
30 30
 
31
-#define BOARD_NAME        "MKS SBASE"
32
-#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
31
+#ifndef BOARD_NAME
32
+  #define BOARD_NAME        "MKS SBASE"
33
+#endif
34
+#ifndef BOARD_WEBSITE_URL
35
+  #define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
36
+#endif
33 37
 
34 38
 #define LED_PIN            P1_18   // Used as a status indicator
35 39
 #define LED2_PIN           P1_19
@@ -281,7 +285,7 @@
281 285
  #endif
282 286
 #endif
283 287
 
284
-#if HAS_DRIVER(TMC2208)
288
+#if MB(MKS_SBASE) && HAS_DRIVER(TMC2208)
285 289
   // The shortage of pins becomes apparent.
286 290
   // Worst case you may have to give up the LCD
287 291
   // RX pins need to be interrupt capable

+ 60
- 0
Marlin/src/pins/pins_MKS_SGEN.h Vedi File

@@ -0,0 +1,60 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
+ *
6
+ * Based on Sprinter and grbl.
7
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
8
+ *
9
+ * This program is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+/**
25
+ * MKS SGen pin assignments
26
+ */
27
+
28
+#ifndef LPC1769
29
+  #error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
30
+#endif
31
+
32
+#define BOARD_NAME        "MKS SGEN"
33
+#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SGEN"
34
+
35
+#include "pins_MKS_SBASE.h"
36
+
37
+#undef E1_STEP_PIN
38
+#undef E1_DIR_PIN
39
+#undef E1_ENABLE_PIN
40
+
41
+//#undef BTN_EN1
42
+//#undef BTN_EN2
43
+//#define BTN_EN1        P1_23   // EXP2.5
44
+//#define BTN_EN2        P1_22   // EXP2.3
45
+
46
+#if HAS_DRIVER(TMC2208)
47
+  // The shortage of pins becomes apparent.
48
+  // In the worst case you may have to give up the LCD.
49
+  // RX pins must be interrupt-capable.
50
+  #define X_SERIAL_TX_PIN  P4_29   // J8-2
51
+  #define X_SERIAL_RX_PIN  P4_29   // J8-2
52
+
53
+  #define Y_SERIAL_TX_PIN  P2_08   // J8-3
54
+  #define Y_SERIAL_RX_PIN  P2_08   // J8-3
55
+
56
+  #define Z_SERIAL_TX_PIN  P2_11   // J8-4
57
+  #define Z_SERIAL_RX_PIN  P2_11   // J8-4
58
+  #define E0_SERIAL_TX_PIN P2_13   // J8-5
59
+  #define E0_SERIAL_RX_PIN P2_13   // J8-5
60
+#endif

Loading…
Annulla
Salva