瀏覽代碼

Pins parity with 1.1.x

Scott Lahteine 7 年之前
父節點
當前提交
ae1a2ff16f
共有 3 個文件被更改,包括 91 次插入2 次删除
  1. 60
    0
      Marlin/src/pins/pins_MIGHTYBOARD_REVE.h
  2. 2
    2
      Marlin/src/pins/pins_RAMPS.h
  3. 29
    0
      Marlin/src/pins/pins_RAMPS_ENDER_4.h

+ 60
- 0
Marlin/src/pins/pins_MIGHTYBOARD_REVE.h 查看文件

@@ -270,3 +270,63 @@
270 270
 #define SPINDLE_LASER_ENABLE_PIN 66  // K4   Pin should have a pullup!
271 271
 #define SPINDLE_LASER_PWM_PIN     8  // H5   MUST BE HARDWARE PWM
272 272
 #define SPINDLE_DIR_PIN          67  // K5
273
+
274
+
275
+
276
+
277
+// Check if all pins are defined in mega/pins_arduino.h
278
+#include <Arduino.h>
279
+static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h"
280
+                                          "to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below");
281
+
282
+/* in [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h
283
+change:
284
+#define NUM_DIGITAL_PINS            70
285
+to:
286
+#define NUM_DIGITAL_PINS            80
287
+
288
+to digital_pin_to_port_PGM add at the end:
289
+const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
290
+....
291
+        PG      , // PG 4 ** 70 **
292
+        PG      , // PG 3 ** 71 **
293
+        PJ      , // PJ 2 ** 72 **
294
+        PJ      , // PJ 3 ** 73 **
295
+        PJ      , // PJ 7 ** 74 **
296
+        PJ      , // PJ 4 ** 75 **
297
+        PJ      , // PJ 5 ** 76 **
298
+        PJ      , // PJ 6 ** 77 **
299
+        PE      , // PE 2 ** 78 **
300
+        PE      , // PE 6 ** 79 **
301
+};
302
+
303
+to digital_pin_to_bit_mask_PGM  add at the end:
304
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
305
+....
306
+        _BV( 4 )        , // PG 4 ** 70 **
307
+        _BV( 3 )        , // PG 3 ** 71 **
308
+        _BV( 2 )        , // PJ 2 ** 72 **
309
+        _BV( 3 )        , // PJ 3 ** 73 **
310
+        _BV( 7 )        , // PJ 7 ** 74 **
311
+        _BV( 4 )        , // PJ 4 ** 75 **
312
+        _BV( 5 )        , // PJ 5 ** 76 **
313
+        _BV( 6 )        , // PJ 6 ** 77 **
314
+        _BV( 2 )        , // PE 2 ** 78 **
315
+        _BV( 6 )        , // PE 6 ** 79 **
316
+};
317
+
318
+to digital_pin_to_timer_PGM add at the end:
319
+const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
320
+....
321
+        NOT_ON_TIMER    , // PG 4 ** 70 **
322
+        NOT_ON_TIMER    , // PG 3 ** 71 **
323
+        NOT_ON_TIMER    , // PJ 2 ** 72 **
324
+        NOT_ON_TIMER    , // PJ 3 ** 73 **
325
+        NOT_ON_TIMER    , // PJ 7 ** 74 **
326
+        NOT_ON_TIMER    , // PJ 4 ** 75 **
327
+        NOT_ON_TIMER    , // PJ 5 ** 76 **
328
+        NOT_ON_TIMER    , // PJ 6 ** 77 **
329
+        NOT_ON_TIMER    , // PE 2 ** 78 **
330
+        NOT_ON_TIMER    , // PE 6 ** 79 **
331
+};
332
+*/

+ 2
- 2
Marlin/src/pins/pins_RAMPS.h 查看文件

@@ -292,8 +292,8 @@
292 292
   #define PS_ON_PIN        12
293 293
 #endif
294 294
 
295
-#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
296
-  #if !defined(NUM_SERVOS) || NUM_SERVOS <= 1 // try to use servo connector first
295
+#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
296
+  #if NUM_SERVOS <= 1 // try to use servo connector first
297 297
     #define CASE_LIGHT_PIN   6      // MUST BE HARDWARE PWM
298 298
   #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
299 299
       && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD)))  // try to use AUX 2

+ 29
- 0
Marlin/src/pins/pins_RAMPS_ENDER_4.h 查看文件

@@ -0,0 +1,29 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#if HOTENDS > 1 || E_STEPPERS > 1
24
+  #error "Ender-4 supports only 1 hotend / E-stepper. Comment out this line to continue."
25
+#endif
26
+
27
+#define BOARD_NAME "Ender-4"
28
+
29
+#include "pins_RAMPS.h"

Loading…
取消
儲存