浏览代码

Use MB() for Megatronics 3.1

Scott Lahteine 7 年前
父节点
当前提交
c40cb52342
共有 2 个文件被更改,包括 6 次插入13 次删除
  1. 1
    4
      Marlin/src/pins/pins.h
  2. 5
    9
      Marlin/src/pins/pins_MEGATRONICS_3.h

+ 1
- 4
Marlin/src/pins/pins.h 查看文件

@@ -151,10 +151,7 @@
151 151
   #include "pins_MEGATRONICS.h"       // ATmega2560
152 152
 #elif MB(MEGATRONICS_2)
153 153
   #include "pins_MEGATRONICS_2.h"     // ATmega2560
154
-#elif MB(MEGATRONICS_3)
155
-  #include "pins_MEGATRONICS_3.h"     // ATmega2560
156
-#elif MB(MEGATRONICS_31)
157
-  #define MEGATRONICS_31
154
+#elif MB(MEGATRONICS_3) || MB(MEGATRONICS_31)
158 155
   #include "pins_MEGATRONICS_3.h"     // ATmega2560
159 156
 #elif MB(RAMBO)
160 157
   #include "pins_RAMBO.h"             // ATmega2560

+ 5
- 9
Marlin/src/pins/pins_MEGATRONICS_3.h 查看文件

@@ -21,19 +21,17 @@
21 21
  */
22 22
 
23 23
 /**
24
- * MegaTronics v3.0 pin assignments
24
+ * MegaTronics v3.0 / v3.1 pin assignments
25 25
  */
26 26
 
27 27
 #ifndef __AVR_ATmega2560__
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
-#define MEGATRONICS_31
32
-
33
-#if ENABLED(MEGATRONICS_31)
34
-  #define BOARD_NAME       "Megatronics v3.1"
31
+#if MB(MEGATRONICS_31)
32
+  #define BOARD_NAME "Megatronics v3.1"
35 33
 #else
36
-  #define BOARD_NAME       "Megatronics v3.0"
34
+  #define BOARD_NAME "Megatronics v3.0"
37 35
 #endif
38 36
 
39 37
 //
@@ -161,10 +159,8 @@
161 159
   #define SHIFT_OUT        34
162 160
   #define SHIFT_EN         44
163 161
 
164
-  #if ENABLED(MEGATRONICS_31)
162
+  #if MB(MEGATRONICS_31)
165 163
     #define SD_DETECT_PIN  56
166
-  #else
167
-    #define SD_DETECT_PIN  -1
168 164
   #endif
169 165
 
170 166
 #endif

正在加载...
取消
保存