浏览代码

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
   #include "pins_MEGATRONICS.h"       // ATmega2560
151
   #include "pins_MEGATRONICS.h"       // ATmega2560
152
 #elif MB(MEGATRONICS_2)
152
 #elif MB(MEGATRONICS_2)
153
   #include "pins_MEGATRONICS_2.h"     // ATmega2560
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
   #include "pins_MEGATRONICS_3.h"     // ATmega2560
155
   #include "pins_MEGATRONICS_3.h"     // ATmega2560
159
 #elif MB(RAMBO)
156
 #elif MB(RAMBO)
160
   #include "pins_RAMBO.h"             // ATmega2560
157
   #include "pins_RAMBO.h"             // ATmega2560

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

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
 #ifndef __AVR_ATmega2560__
27
 #ifndef __AVR_ATmega2560__
28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
 #endif
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
 #else
33
 #else
36
-  #define BOARD_NAME       "Megatronics v3.0"
34
+  #define BOARD_NAME "Megatronics v3.0"
37
 #endif
35
 #endif
38
 
36
 
39
 //
37
 //
161
   #define SHIFT_OUT        34
159
   #define SHIFT_OUT        34
162
   #define SHIFT_EN         44
160
   #define SHIFT_EN         44
163
 
161
 
164
-  #if ENABLED(MEGATRONICS_31)
162
+  #if MB(MEGATRONICS_31)
165
     #define SD_DETECT_PIN  56
163
     #define SD_DETECT_PIN  56
166
-  #else
167
-    #define SD_DETECT_PIN  -1
168
   #endif
164
   #endif
169
 
165
 
170
 #endif
166
 #endif

正在加载...
取消
保存