Pārlūkot izejas kodu

Defines for electronics boards

Added boards.h which contains defines for all the board numbers, plus
some shorthand macros for less typing.
Scott Lahteine 9 gadus atpakaļ
vecāks
revīzija
f83d0f2a68

+ 5
- 46
Marlin/Configuration.h Parādīt failu

@@ -1,6 +1,8 @@
1 1
 #ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4
+#include "boards.h"
5
+
4 6
 // This configuration file contains the basic settings.
5 7
 // Advanced settings can be found in Configuration_adv.h
6 8
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
@@ -37,53 +39,10 @@
37 39
 //#define BTENABLED              // Enable BT interface on AT90USB devices
38 40
 
39 41
 
40
-//// The following define selects which electronics board you have. Please choose the one that matches your setup
41
-// 10 = Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
42
-// 11 = Gen7 v1.1, v1.2 = 11
43
-// 12 = Gen7 v1.3
44
-// 13 = Gen7 v1.4
45
-// 2  = Cheaptronic v1.0
46
-// 20 = Sethi 3D_1
47
-// 3  = MEGA/RAMPS up to 1.2 = 3
48
-// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
49
-// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
50
-// 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
51
-// 36 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
52
-// 4  = Duemilanove w/ ATMega328P pin assignment
53
-// 5  = Gen6
54
-// 51 = Gen6 deluxe
55
-// 6  = Sanguinololu < 1.2
56
-// 62 = Sanguinololu 1.2 and above
57
-// 63 = Melzi
58
-// 64 = STB V1.1
59
-// 65 = Azteeg X1
60
-// 66 = Melzi with ATmega1284 (MaKr3d version)
61
-// 67 = Azteeg X3
62
-// 68 = Azteeg X3 Pro
63
-// 7  = Ultimaker
64
-// 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
65
-// 72 = Ultimainboard 2.x (Uses TEMP_SENSOR 20)
66
-// 77 = 3Drag Controller
67
-// 8  = Teensylu
68
-// 80 = Rumba
69
-// 81 = Printrboard (AT90USB1286)
70
-// 82 = Brainwave (AT90USB646)
71
-// 83 = SAV Mk-I (AT90USB1286)
72
-// 84 = Teensy++2.0 (AT90USB1286) // CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
73
-// 9  = Gen3+
74
-// 22 = Gen3 Monolithic Electronics
75
-// 70 = Megatronics
76
-// 701= Megatronics v2.0
77
-// 702= Minitronics v1.0
78
-// 90 = Alpha OMCA board
79
-// 91 = Final OMCA board
80
-// 301= Rambo
81
-// 21 = Elefu Ra Board (v3)
82
-// 88 = 5DPrint D8 Driver Board
83
-// 999 = Leapfrog
84
-
42
+// The following define selects which electronics board you have.
43
+// Please choose the name from boards.h that matches your setup
85 44
 #ifndef MOTHERBOARD
86
-#define MOTHERBOARD 7
45
+  #define MOTHERBOARD BOARD_ULTIMAKER
87 46
 #endif
88 47
 
89 48
 // Define this to set a custom name for your generic Mendel,

+ 55
- 0
Marlin/boards.h Parādīt failu

@@ -0,0 +1,55 @@
1
+#ifndef BOARDS_H
2
+#define BOARDS_H
3
+
4
+#define BOARD_UNKNOWN -1
5
+
6
+#define BOARD_GEN7_CUSTOM       10   // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
7
+#define BOARD_GEN7_12           11   // Gen7 v1.1, v1.2
8
+#define BOARD_GEN7_13           12   // Gen7 v1.3
9
+#define BOARD_GEN7_14           13   // Gen7 v1.4
10
+#define BOARD_CHEAPTRONIC       2    // Cheaptronic v1.0
11
+#define BOARD_SETHI             20   // Sethi 3D_1
12
+#define BOARD_RAMPS_OLD         3    // MEGA/RAMPS up to 1.2
13
+#define BOARD_RAMPS_13_EFB      33   // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
14
+#define BOARD_RAMPS_13_EEB      34   // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
15
+#define BOARD_RAMPS_13_EFF      35   // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
16
+#define BOARD_RAMPS_13_EEF      36   // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
17
+#define BOARD_DUEMILANOVE_328P  4    // Duemilanove w/ ATMega328P pin assignment
18
+#define BOARD_GEN6              5    // Gen6
19
+#define BOARD_GEN6_DELUXE       51   // Gen6 deluxe
20
+#define BOARD_SANGUINOLOLU_11   6    // Sanguinololu < 1.2
21
+#define BOARD_SANGUINOLOLU_12   62   // Sanguinololu 1.2 and above
22
+#define BOARD_MELZI             63   // Melzi
23
+#define BOARD_STB_11            64   // STB V1.1
24
+#define BOARD_AZTEEG_X1         65   // Azteeg X1
25
+#define BOARD_MELZI_1284        66   // Melzi with ATmega1284 (MaKr3d version)
26
+#define BOARD_AZTEEG_X3         67   // Azteeg X3
27
+#define BOARD_AZTEEG_X3_PRO     68   // Azteeg X3 Pro
28
+#define BOARD_ULTIMAKER         7    // Ultimaker
29
+#define BOARD_ULTIMAKER_OLD     71   // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
30
+#define BOARD_ULTIMAIN_2        72   // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
31
+#define BOARD_3DRAG             77   // 3Drag Controller
32
+#define BOARD_TEENSYLU          8    // Teensylu
33
+#define BOARD_RUMBA             80   // Rumba
34
+#define BOARD_PRINTRBOARD       81   // Printrboard (AT90USB1286)
35
+#define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
36
+#define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
37
+#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
38
+#define BOARD_GEN3_PLUS         9    // Gen3+
39
+#define BOARD_GEN3_MONOLITHIC   22   // Gen3 Monolithic Electronics
40
+#define BOARD_MEGATRONICS       70   // Megatronics
41
+#define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
42
+#define BOARD_MEGATRONICS_1     702  // Minitronics v1.0
43
+#define BOARD_OMCA_A            90   // Alpha OMCA board
44
+#define BOARD_OMCA              91   // Final OMCA board
45
+#define BOARD_RAMBO             301  // Rambo
46
+#define BOARD_ELEFU_3           21   // Elefu Ra Board (v3)
47
+#define BOARD_5DPRINT           88   // 5DPrint D8 Driver Board
48
+#define BOARD_LEAPFROG          999  // Leapfrog
49
+
50
+#define BOARD_99                99   // This is in pins.h but...?
51
+
52
+#define MB(board) (MOTHERBOARD==BOARD_##board)
53
+#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
54
+
55
+#endif //__BOARDS_H

+ 1
- 1
Marlin/digipot_mcp4451.cpp Parādīt failu

@@ -6,7 +6,7 @@
6 6
 #include "Wire.h"
7 7
 
8 8
 // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
9
-#if MOTHERBOARD == 88
9
+#if MB(5DPRINT)
10 10
 #define DIGIPOT_I2C_FACTOR 117.96
11 11
 #define DIGIPOT_I2C_MAX_CURRENT 1.736
12 12
 #else

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h Parādīt failu

@@ -100,7 +100,7 @@
100 100
 // 88 = 5DPrint D8 Driver Board
101 101
 
102 102
 #ifndef MOTHERBOARD
103
-#define MOTHERBOARD 33
103
+  #define MOTHERBOARD BOARD_RAMPS_13_EFB
104 104
 #endif
105 105
 
106 106
 // Define this to set a custom name for your generic Mendel,

+ 3
- 46
Marlin/example_configurations/delta/Configuration.h Parādīt failu

@@ -29,53 +29,10 @@
29 29
 // This enables the serial port associated to the Bluetooth interface
30 30
 //#define BTENABLED              // Enable BT interface on AT90USB devices
31 31
 
32
-
33
-//// The following define selects which electronics board you have. Please choose the one that matches your setup
34
-// 10 = Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
35
-// 11 = Gen7 v1.1, v1.2 = 11
36
-// 12 = Gen7 v1.3
37
-// 13 = Gen7 v1.4
38
-// 2  = Cheaptronic v1.0
39
-// 20 = Sethi 3D_1
40
-// 3  = MEGA/RAMPS up to 1.2 = 3
41
-// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
42
-// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
43
-// 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
44
-// 36 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
45
-// 4  = Duemilanove w/ ATMega328P pin assignment
46
-// 5  = Gen6
47
-// 51 = Gen6 deluxe
48
-// 6  = Sanguinololu < 1.2
49
-// 62 = Sanguinololu 1.2 and above
50
-// 63 = Melzi
51
-// 64 = STB V1.1
52
-// 65 = Azteeg X1
53
-// 66 = Melzi with ATmega1284 (MaKr3d version)
54
-// 67 = Azteeg X3
55
-// 68 = Azteeg X3 Pro
56
-// 7  = Ultimaker
57
-// 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
58
-// 72 = Ultimainboard 2.x (Uses TEMP_SENSOR 20)
59
-// 77 = 3Drag Controller
60
-// 8  = Teensylu
61
-// 80 = Rumba
62
-// 81 = Printrboard (AT90USB1286)
63
-// 82 = Brainwave (AT90USB646)
64
-// 83 = SAV Mk-I (AT90USB1286)
65
-// 84 = Teensy++2.0 (AT90USB1286) // CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
66
-// 9  = Gen3+
67
-// 70 = Megatronics
68
-// 701= Megatronics v2.0
69
-// 702= Minitronics v1.0
70
-// 90 = Alpha OMCA board
71
-// 91 = Final OMCA board
72
-// 301= Rambo
73
-// 21 = Elefu Ra Board (v3)
74
-// 88 = 5DPrint D8 Driver Board
75
-// 999 = Leapfrog
76
-
32
+// The following define selects which electronics board you have.
33
+// Please choose the name from boards.h that matches your setup
77 34
 #ifndef MOTHERBOARD
78
-#define MOTHERBOARD 33
35
+  #define MOTHERBOARD BOARD_RAMPS_13_EFB
79 36
 #endif
80 37
 
81 38
 // Define this to set a custom name for your generic Mendel,

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h Parādīt failu

@@ -73,7 +73,7 @@
73 73
 // 88 = 5DPrint D8 Driver Board
74 74
 
75 75
 #ifndef MOTHERBOARD
76
-#define MOTHERBOARD 88
76
+  #define MOTHERBOARD BOARD_5DPRINT
77 77
 #endif
78 78
 
79 79
 // Define this to set a custom name for your generic Mendel,

+ 4
- 4
Marlin/language.h Parādīt failu

@@ -31,16 +31,16 @@
31 31
 
32 32
 #define PROTOCOL_VERSION "1.0"
33 33
 
34
-#if MOTHERBOARD == 7 || MOTHERBOARD == 71 || MOTHERBOARD == 72
34
+#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
35 35
 	#define MACHINE_NAME "Ultimaker"
36 36
 	#define FIRMWARE_URL "http://firmware.ultimaker.com"
37
-#elif MOTHERBOARD == 80
37
+#elif MB(RUMBA)
38 38
 	#define MACHINE_NAME "Rumba"
39 39
 	#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
40
-#elif MOTHERBOARD == 77
40
+#elif MB(3DRAG)
41 41
 	#define MACHINE_NAME "3Drag"
42 42
 	#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
43
-#elif MOTHERBOARD == 88
43
+#elif MB(5DPRINT)
44 44
 	#define MACHINE_NAME "Makibox"
45 45
 	#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
46 46
 #else

+ 126
- 127
Marlin/pins.h Parādīt failu

@@ -1,7 +1,9 @@
1 1
 #ifndef PINS_H
2 2
 #define PINS_H
3 3
 
4
-#if MOTHERBOARD != 88
4
+#include "boards.h"
5
+
6
+#if !MB(5DPRINT)
5 7
 #define X_MS1_PIN -1
6 8
 #define X_MS2_PIN -1
7 9
 #define Y_MS1_PIN -1
@@ -20,7 +22,7 @@
20 22
 * https://bitbucket.org/makible/5dprint-d8-controller-board
21 23
 ****************************************************************************************/
22 24
 
23
-#if MOTHERBOARD == 88
25
+#if MB(5DPRINT)
24 26
 
25 27
 #define KNOWN_BOARD 1
26 28
 #define AT90USB 1286  // Disable MarlinSerial etc.
@@ -92,13 +94,13 @@
92 94
 #define E0_MS1_PIN 5
93 95
 #define E0_MS2_PIN 4
94 96
 
95
-#endif /* 88 */
97
+#endif // 5DPRINT
96 98
 
97 99
 /****************************************************************************************
98 100
 * Leapfrog Driver board
99 101
 * 
100 102
 ****************************************************************************************/
101
-#if MOTHERBOARD == 999  // Leapfrog board
103
+#if MB(LEAPFROG)  // Leapfrog board
102 104
 #define KNOWN_BOARD 1
103 105
 
104 106
 #ifndef __AVR_ATmega1280__
@@ -162,14 +164,14 @@
162 164
 /*  Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31)  */
163 165
 
164 166
 
165
-#endif
167
+#endif // LEAPFROG
166 168
 
167 169
 /****************************************************************************************
168 170
 *
169 171
 *
170 172
 ****************************************************************************************/
171 173
 
172
-#if MOTHERBOARD == 99
174
+#if MB(99)
173 175
 #define KNOWN_BOARD 1
174 176
 
175 177
 #define X_STEP_PIN          2
@@ -207,14 +209,14 @@
207 209
 #define HEATER_BED_PIN      4
208 210
 #define TEMP_BED_PIN       10
209 211
 
210
-#endif /* 99 */
212
+#endif // 99
211 213
 
212 214
 /****************************************************************************************
213 215
 * Sethi 3D_1 pin assignment - www.sethi3d.com.br
214 216
 *
215 217
 ****************************************************************************************/
216 218
 
217
-#if MOTHERBOARD == 20
219
+#if MB(SETHI)
218 220
 #define KNOWN_BOARD
219 221
 
220 222
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
@@ -285,7 +287,7 @@
285 287
 #define TX_ENABLE_PIN 12
286 288
 #define RX_ENABLE_PIN 13
287 289
 
288
-#endif
290
+#endif // SETHI
289 291
 
290 292
 /****************************************************************************************
291 293
 * Gen7 v1.1, v1.2, v1.3 pin assignment
@@ -293,12 +295,12 @@
293 295
 ****************************************************************************************/
294 296
 
295 297
 
296
-#if MOTHERBOARD == 12
297
-#define MOTHERBOARD 11
298
+#if MB(GEN7_13)
299
+#define MOTHERBOARD BOARD_GEN7_12
298 300
 #define GEN7_VERSION 13 // v1.3
299 301
 #endif
300 302
 
301
-#if MOTHERBOARD == 11
303
+#if MB(GEN7_12)
302 304
 #define KNOWN_BOARD
303 305
 
304 306
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
@@ -376,11 +378,11 @@
376 378
 *
377 379
 ****************************************************************************************/
378 380
 
379
-#if MOTHERBOARD == 13
381
+#if MB(GEN7_14)
380 382
 #define GEN7_VERSION 14 // v1.4
381 383
 #endif
382 384
 
383
-#if MOTHERBOARD == 13
385
+#if MB(GEN7_14)
384 386
 #define KNOWN_BOARD
385 387
 
386 388
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
@@ -442,22 +444,19 @@
442 444
 #define TX_ENABLE_PIN 12
443 445
 #define RX_ENABLE_PIN 13
444 446
 
445
-#endif
447
+#endif // GEN7
446 448
 
447
-/*******************************************************************************
448
-*********
449
+/******************************************************************************
449 450
 * Gen7 Alfons3  pin assignment
450 451
 *
451
-********************************************************************************
452
-********/
452
+******************************************************************************/
453 453
 /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
454 454
 
455
-#if MOTHERBOARD == 10
455
+#if MB(GEN7_CUSTOM)
456 456
 #define KNOWN_BOARD
457 457
 
458 458
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
459 459
     #error Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
460
-
461 460
 #endif
462 461
 
463 462
 //x axis pins
@@ -525,13 +524,13 @@
525 524
     #define BTN_EN2 10
526 525
     #define BTN_ENC 12  //the click
527 526
 
528
-#endif
527
+#endif // GEN7_CUSTOM
529 528
 
530 529
 /****************************************************************************************
531 530
 * Arduino Mega pin assignment
532 531
 *
533 532
 ****************************************************************************************/
534
-#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 36 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
533
+#if IS_RAMPS || MB(3DRAG) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO)
535 534
 #define KNOWN_BOARD 1
536 535
 
537 536
 //////////////////FIX THIS//////////////
@@ -547,11 +546,11 @@
547 546
 // #define RAMPS_V_1_0
548 547
 
549 548
 
550
-#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 36 ||  MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
549
+#if (IS_RAMPS && !MB(RAMPS_OLD)) || MB(3DRAG) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO)
551 550
 
552 551
   #define LARGE_FLASH true
553 552
 
554
-  #if MOTHERBOARD == 77
553
+  #if MB(3DRAG)
555 554
     #define X_STEP_PIN         54
556 555
     #define X_DIR_PIN          55
557 556
     #define X_ENABLE_PIN       38
@@ -628,16 +627,16 @@
628 627
     #define E1_DIR_PIN         34
629 628
     #define E1_ENABLE_PIN      30
630 629
 
631
-#if MOTHERBOARD == 34  //FMM added for Filament Extruder
630
+#if MB(RAMPS_13_EEB)  //FMM added for Filament Extruder
632 631
 #ifdef FILAMENT_SENSOR
633
-	  //define analog pin for the filament width sensor input
634
-	  //Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
632
+    //define analog pin for the filament width sensor input
633
+    //Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
635 634
       #define FILWIDTH_PIN        5
636 635
 #endif
637 636
 #endif
638 637
 
639 638
 
640
-    #if MOTHERBOARD == 68
639
+    #if MB(AZTEEG_X3_PRO)
641 640
       #define E2_STEP_PIN        23
642 641
       #define E2_DIR_PIN         25
643 642
       #define E2_ENABLE_PIN      40
@@ -656,17 +655,17 @@
656 655
     #define LED_PIN            13
657 656
   #endif
658 657
 
659
-  #if MOTHERBOARD == 33 || MOTHERBOARD == 35 || MOTHERBOARD == 67 || MOTHERBOARD == 68
658
+  #if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO)
660 659
     #define FAN_PIN            9 // (Sprinter config)
661 660
   #else
662 661
     #define FAN_PIN            4 // IO pin. Buffer needed
663 662
   #endif
664 663
 
665
-  #if MOTHERBOARD == 77 || MOTHERBOARD == 36
664
+  #if MB(3DRAG) || MB(RAMPS_13_EEF)
666 665
     #define FAN_PIN            8
667 666
   #endif
668 667
 
669
-  #if MOTHERBOARD == 35
668
+  #if MB(RAMPS_13_EFF)
670 669
     #define CONTROLLERFAN_PIN  -1 //Pin used for the fan to cool controller
671 670
   #endif
672 671
 
@@ -678,24 +677,24 @@
678 677
     #define KILL_PIN           -1
679 678
   #endif
680 679
 
681
-  #if MOTHERBOARD == 35
680
+  #if MB(RAMPS_13_EFF)
682 681
     #define HEATER_0_PIN       8
683 682
   #else
684 683
     #define HEATER_0_PIN       10   // EXTRUDER 1
685 684
   #endif
686 685
 
687
-  #if MOTHERBOARD == 33 || MOTHERBOARD == 67
686
+  #if MB(RAMPS_13_EFB) || MB(AZTEEG_X3)
688 687
     #define HEATER_1_PIN       -1
689 688
   #else
690 689
     #define HEATER_1_PIN       9    // EXTRUDER 2 (FAN On Sprinter)
691 690
   #endif
692 691
 
693 692
 
694
-  #if MOTHERBOARD == 77
693
+  #if MB(3DRAG)
695 694
     #define HEATER_0_PIN       10
696 695
     #define HEATER_1_PIN       12
697 696
     #define HEATER_2_PIN       6
698
-  #elif MOTHERBOARD == 68
697
+  #elif MB(AZTEEG_X3_PRO)
699 698
     #define HEATER_2_PIN       16
700 699
     #define HEATER_3_PIN       17
701 700
     #define HEATER_4_PIN       4
@@ -708,7 +707,7 @@
708 707
 
709 708
   #define TEMP_0_PIN         13   // ANALOG NUMBERING
710 709
   #define TEMP_1_PIN         15   // ANALOG NUMBERING
711
-  #if MOTHERBOARD == 68
710
+  #if MB(AZTEEG_X3_PRO)
712 711
     #define TEMP_2_PIN         12   // ANALOG NUMBERING
713 712
     #define TEMP_3_PIN         11   // ANALOG NUMBERING
714 713
     #define TEMP_4_PIN         10   // ANALOG NUMBERING
@@ -718,10 +717,10 @@
718 717
     #define TEMP_2_PIN         -1   // ANALOG NUMBERING
719 718
   #endif
720 719
 
721
-  #if MOTHERBOARD == 35 || MOTHERBOARD == 36
720
+  #if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
722 721
     #define HEATER_BED_PIN     -1    // NO BED
723 722
   #else
724
-    #if MOTHERBOARD == 77
723
+    #if MB(3DRAG)
725 724
       #define HEATER_BED_PIN     9    // BED
726 725
     #else
727 726
       #define HEATER_BED_PIN     8    // BED
@@ -746,12 +745,12 @@
746 745
     #endif
747 746
   #endif
748 747
 
749
-  #if MOTHERBOARD == 68
748
+  #if MB(AZTEEG_X3_PRO)
750 749
     #define BEEPER 33
751 750
   #endif
752 751
 
753 752
   #ifdef TEMP_STAT_LEDS
754
-    #if MOTHERBOARD == 67
753
+    #if MB(AZTEEG_X3)
755 754
       #define STAT_LED_RED       6
756 755
       #define STAT_LED_BLUE     11
757 756
     #endif
@@ -814,7 +813,7 @@
814 813
 
815 814
       #endif
816 815
 
817
-      #if MOTHERBOARD == 77
816
+      #if MB(3DRAG)
818 817
         #define BEEPER -1
819 818
 
820 819
         #define LCD_PINS_RS 27
@@ -832,10 +831,10 @@
832 831
     #endif
833 832
     #else //old style panel with shift register
834 833
       //arduino pin witch triggers an piezzo beeper
835
-      #define BEEPER 33		//No Beeper added
834
+      #define BEEPER 33   //No Beeper added
836 835
 
837 836
       //buttons are attached to a shift register
838
-	// Not wired this yet
837
+  // Not wired this yet
839 838
       //#define SHIFT_CLK 38
840 839
       //#define SHIFT_LD 42
841 840
       //#define SHIFT_OUT 40
@@ -850,7 +849,7 @@
850 849
     #endif
851 850
   #endif //ULTRA_LCD
852 851
 
853
-#else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
852
+#else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (BOARD_RAMPS_OLD)
854 853
 
855 854
 #define X_STEP_PIN         26
856 855
 #define X_DIR_PIN          28
@@ -896,7 +895,7 @@
896 895
 #define TEMP_2_PIN          -1
897 896
 #define TEMP_BED_PIN        1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
898 897
 
899
-#endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
898
+#endif // RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG
900 899
 
901 900
 // SPI for Max6675 Thermocouple
902 901
 
@@ -910,13 +909,13 @@
910 909
   #define MAX6675_SS       49
911 910
 #endif
912 911
 
913
-#endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
912
+#endif // RAMPS_OLD || RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG
914 913
 
915 914
 /****************************************************************************************
916 915
 * Duemilanove w/ ATMega328P pin assignment
917 916
 *
918 917
 ****************************************************************************************/
919
-#if MOTHERBOARD == 4
918
+#if MB(DUEMILANOVE_328P)
920 919
 #define KNOWN_BOARD 1
921 920
 
922 921
 #ifndef __AVR_ATmega328P__
@@ -958,25 +957,25 @@
958 957
 #define HEATER_BED_PIN      -1
959 958
 #define TEMP_BED_PIN        -1
960 959
 
961
-#endif
960
+#endif // DUEMILANOVE_328P
962 961
 
963 962
 /****************************************************************************************
964 963
 * Elefu RA Board Pin Assignments
965 964
 *
966 965
 ****************************************************************************************/
967
-#if MOTHERBOARD == 21
968
-#define	KNOWN_BOARD 1
966
+#if MB(ELEFU_3)
967
+#define KNOWN_BOARD 1
969 968
 
970 969
 #ifndef __AVR_ATmega2560__
971 970
  #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
972 971
 #endif
973 972
 
974 973
 
975
-#define X_STEP_PIN		     49
976
-#define X_DIR_PIN			     13
977
-#define X_ENABLE_PIN		   48
978
-#define X_MIN_PIN			     35
979
-#define X_MAX_PIN			     -1 //34
974
+#define X_STEP_PIN         49
975
+#define X_DIR_PIN          13
976
+#define X_ENABLE_PIN       48
977
+#define X_MIN_PIN          35
978
+#define X_MAX_PIN          -1 //34
980 979
 
981 980
 #define Y_STEP_PIN         11
982 981
 #define Y_DIR_PIN          9
@@ -1008,18 +1007,18 @@
1008 1007
 #define FAN_PIN            16 //5V PWM
1009 1008
 
1010 1009
 #define PS_ON_PIN          10 //Set to -1 if using a manual switch on the PWRSW Connector
1011
-#define SLEEP_WAKE_PIN		 26 //This feature still needs work
1010
+#define SLEEP_WAKE_PIN     26 //This feature still needs work
1012 1011
 
1013
-#define HEATER_0_PIN       45	//12V PWM1
1014
-#define HEATER_1_PIN       46	//12V PWM2
1015
-#define HEATER_2_PIN       17	//12V PWM3
1016
-#define HEATER_BED_PIN     44	//DOUBLE 12V PWM
1017
-#define TEMP_0_PIN         3	//ANALOG NUMBERING
1018
-#define TEMP_1_PIN         2 	//ANALOG NUMBERING
1019
-#define TEMP_2_PIN         1 	//ANALOG NUMBERING
1020
-#define TEMP_BED_PIN       0	//ANALOG NUMBERING
1012
+#define HEATER_0_PIN       45 //12V PWM1
1013
+#define HEATER_1_PIN       46 //12V PWM2
1014
+#define HEATER_2_PIN       17 //12V PWM3
1015
+#define HEATER_BED_PIN     44 //DOUBLE 12V PWM
1016
+#define TEMP_0_PIN         3  //ANALOG NUMBERING
1017
+#define TEMP_1_PIN         2  //ANALOG NUMBERING
1018
+#define TEMP_2_PIN         1  //ANALOG NUMBERING
1019
+#define TEMP_BED_PIN       0  //ANALOG NUMBERING
1021 1020
 
1022
-#define BEEPER 		         36
1021
+#define BEEPER             36
1023 1022
 
1024 1023
 #define KILL_PIN           -1
1025 1024
 
@@ -1082,14 +1081,14 @@
1082 1081
 #endif //RA_LIGHTING
1083 1082
 
1084 1083
 
1085
-#endif /* Ra Board */
1084
+#endif // ELEFU_3
1086 1085
 
1087 1086
 
1088 1087
 /****************************************************************************************
1089 1088
 * Gen6 pin assignment
1090 1089
 *
1091 1090
 ****************************************************************************************/
1092
-#if MOTHERBOARD == 5 || MOTHERBOARD == 51
1091
+#if MB(GEN6) || MB(GEN6_DELUXE)
1093 1092
 #define KNOWN_BOARD 1
1094 1093
 
1095 1094
 #ifndef __AVR_ATmega644P__
@@ -1128,7 +1127,7 @@
1128 1127
     #define HEATER_0_PIN    14    //changed @ rkoeppl 20110410
1129 1128
     #define HEATER_1_PIN    -1
1130 1129
     #define HEATER_2_PIN    -1
1131
-    #if MOTHERBOARD == 5
1130
+    #if MB(GEN6)
1132 1131
     #define HEATER_BED_PIN  -1    //changed @ rkoeppl 20110410
1133 1132
     #define TEMP_BED_PIN    -1    //changed @ rkoeppl 20110410
1134 1133
     #else
@@ -1149,32 +1148,32 @@
1149 1148
     #define TX_ENABLE_PIN 12
1150 1149
     #define RX_ENABLE_PIN 13
1151 1150
 
1152
-
1153
-#endif
1151
+#endif // GEN6 || GEN6_DELUXE
1154 1152
 
1155 1153
 /****************************************************************************************
1156 1154
 * Sanguinololu pin assignment
1157 1155
 *
1158 1156
 ****************************************************************************************/
1159
-#if MOTHERBOARD == 64
1157
+#if MB(STB_11)
1160 1158
 #define STB
1161 1159
 #endif
1162
-#if MOTHERBOARD == 63 || MOTHERBOARD == 66
1160
+#if MB(MELZI) || MB(MELZI_1284)
1163 1161
 #define MELZI
1164 1162
 #endif
1165
-#if MOTHERBOARD == 65
1163
+#if MB(AZTEEG_X1)
1166 1164
 #define AZTEEG_X1
1167 1165
 #endif
1168
-#if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66
1166
+#if MB(SANGUINOLOLU_12) || MB(MELZI) || MB(STB_11) || MB(AZTEEG_X1) || MB(MELZI_1284)
1169 1167
 #undef MOTHERBOARD
1170
-#define MOTHERBOARD 6
1168
+#define MOTHERBOARD BOARD_SANGUINOLOLU_11
1171 1169
 #define SANGUINOLOLU_V_1_2
1172 1170
 
1173 1171
 #if defined(__AVR_ATmega1284P__)
1174
-	#define LARGE_FLASH true
1172
+  #define LARGE_FLASH true
1175 1173
 #endif
1176 1174
 #endif
1177
-#if MOTHERBOARD == 6
1175
+
1176
+#if MB(SANGUINOLOLU_11)
1178 1177
 #define KNOWN_BOARD 1
1179 1178
 #ifndef __AVR_ATmega644P__
1180 1179
 #ifndef __AVR_ATmega1284P__
@@ -1211,7 +1210,7 @@
1211 1210
 
1212 1211
 #ifdef STB
1213 1212
  #define FAN_PIN            4
1214
-	//  Uncomment this if you have the first generation (V1.10) of STBs board
1213
+  //  Uncomment this if you have the first generation (V1.10) of STBs board
1215 1214
  #define LCD_PIN_BL         17 // LCD backlight LED
1216 1215
 #endif
1217 1216
 
@@ -1322,7 +1321,7 @@
1322 1321
      // Pins for DOGM SPI LCD Support
1323 1322
      #define DOGLCD_A0  30
1324 1323
      #define DOGLCD_CS  17
1325
-     #define LCD_PIN_BL	28	// backlight LED on PA3
1324
+     #define LCD_PIN_BL 28  // backlight LED on PA3
1326 1325
      // GLCD features
1327 1326
      #define LCD_CONTRAST 1
1328 1327
      // Uncomment screen orientation
@@ -1338,15 +1337,16 @@
1338 1337
      #define SDCARDDETECT -1
1339 1338
  #endif //Makrpanel
1340 1339
 
1341
-#endif
1340
+#endif // SANGUINOLOLU_11
1342 1341
 
1343 1342
 
1344
-#if MOTHERBOARD == 7
1345
-#define KNOWN_BOARD
1346 1343
 /*****************************************************************
1347 1344
 * Ultimaker pin assignment
1348 1345
 ******************************************************************/
1349 1346
 
1347
+#if MB(ULTIMAKER)
1348
+#define KNOWN_BOARD
1349
+
1350 1350
 #ifndef __AVR_ATmega1280__
1351 1351
  #ifndef __AVR_ATmega2560__
1352 1352
  #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
@@ -1442,9 +1442,9 @@
1442 1442
   #endif
1443 1443
 #endif //ULTRA_LCD
1444 1444
 
1445
-#endif
1445
+#endif // ULTIMAKER
1446 1446
 
1447
-#if MOTHERBOARD == 71
1447
+#if MB(ULTIMAKER_OLD)
1448 1448
 #define KNOWN_BOARD
1449 1449
 /*****************************************************************
1450 1450
 * Ultimaker pin assignment (Old electronics)
@@ -1511,9 +1511,9 @@
1511 1511
 #define LCD_PINS_D6 32
1512 1512
 #define LCD_PINS_D7 30
1513 1513
 
1514
-#endif
1514
+#endif // ULTIMAKER_OLD
1515 1515
 
1516
-#if MOTHERBOARD == 72
1516
+#if MB(ULTIMAIN_2)
1517 1517
 #define KNOWN_BOARD
1518 1518
 /*****************************************************************
1519 1519
 * Ultiboard v2.0 pin assignment
@@ -1596,13 +1596,13 @@
1596 1596
 
1597 1597
 #define SDCARDDETECT 39
1598 1598
 
1599
-#endif//MOTHERBOARD == 72
1599
+#endif // ULTIMAIN_2
1600 1600
 
1601 1601
 /****************************************************************************************
1602 1602
 * RUMBA pin assignment
1603 1603
 *
1604 1604
 ****************************************************************************************/
1605
-#if MOTHERBOARD == 80
1605
+#if MB(RUMBA)
1606 1606
 #define KNOWN_BOARD 1
1607 1607
 
1608 1608
 #ifndef __AVR_ATmega2560__
@@ -1712,7 +1712,7 @@
1712 1712
 #define BTN_EN2            12
1713 1713
 #define BTN_ENC            43
1714 1714
 
1715
-#endif //MOTHERBOARD==80
1715
+#endif // RUMBA
1716 1716
 
1717 1717
 
1718 1718
 /****************************************************************************************
@@ -1721,7 +1721,7 @@
1721 1721
   http://www.pjrc.com/teensy/teensyduino.html
1722 1722
 * See http://reprap.org/wiki/Printrboard for more info
1723 1723
 ****************************************************************************************/
1724
-#if MOTHERBOARD == 8 || MOTHERBOARD == 81
1724
+#if MB(TEENSYLU) || MB(PRINTRBOARD)
1725 1725
 #define KNOWN_BOARD 1
1726 1726
 #define AT90USB 1286  // Disable MarlinSerial etc.
1727 1727
 
@@ -1759,7 +1759,7 @@
1759 1759
 // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
1760 1760
 // for the fan and Teensyduino uses a different pin mapping.
1761 1761
 
1762
-#if MOTHERBOARD == 8  // Teensylu
1762
+#if MB(TEENSYLU)  // Teensylu
1763 1763
   #define X_STOP_PIN         13
1764 1764
   #define Y_STOP_PIN         14
1765 1765
   #define Z_STOP_PIN         15
@@ -1793,14 +1793,14 @@
1793 1793
   #define MOSI_PIN         10
1794 1794
 #endif
1795 1795
 
1796
-#endif  // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
1796
+#endif // TEENSYLU || PRINTRBOARD
1797 1797
 
1798 1798
 /****************************************************************************************
1799 1799
  * Brainwave 1.0 pin assignments (AT90USB646)
1800 1800
  * Requires hardware bundle for Arduino:
1801 1801
    https://github.com/unrepentantgeek/brainwave-arduino
1802 1802
  ****************************************************************************************/
1803
-#if MOTHERBOARD == 82
1803
+#if MB(BRAINWAVE)
1804 1804
 #define KNOWN_BOARD 1
1805 1805
 #define AT90USB 646  // Disable MarlinSerial etc.
1806 1806
 
@@ -1856,7 +1856,7 @@
1856 1856
   #define MOSI_PIN         10
1857 1857
 #endif
1858 1858
 
1859
-#endif  // MOTHERBOARD == 82 (Brainwave)
1859
+#endif // BRAINWAVE
1860 1860
 
1861 1861
 //
1862 1862
 // SAV Mk-I
@@ -1867,7 +1867,7 @@
1867 1867
   http://www.pjrc.com/teensy/teensyduino.html
1868 1868
    RepRap Clone Wars project board.
1869 1869
 ****************************************************************************************/
1870
-#if MOTHERBOARD == 83  // SAV Mk-I
1870
+#if MB(SAV_MKI)  // SAV Mk-I
1871 1871
 #define KNOWN_BOARD 1
1872 1872
 #define AT90USB 1286  // Disable MarlinSerial etc.
1873 1873
 
@@ -1941,7 +1941,7 @@
1941 1941
 #define SR_DATA_PIN         0
1942 1942
 #define SR_CLK_PIN          1
1943 1943
 
1944
-#endif  // MOTHERBOARD == 83
1944
+#endif // SAV_MKI
1945 1945
 
1946 1946
 /****************************************************************************************
1947 1947
 * Teensy++ 2.0 Breadboard pin assignments (AT90USB1286)
@@ -1951,7 +1951,7 @@
1951 1951
 * CLI build: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
1952 1952
 * 
1953 1953
 ****************************************************************************************/
1954
-#if MOTHERBOARD == 84
1954
+#if MB(TEENSY2)
1955 1955
 #define KNOWN_BOARD 1
1956 1956
 #define AT90USB 1286  // Disable MarlinSerial etc.
1957 1957
 
@@ -2036,7 +2036,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2036 2036
 #define TEMP_2_PIN         -1
2037 2037
 
2038 2038
 #define SDPOWER            -1
2039
-#define SDCARDDETECT       -1		
2039
+#define SDCARDDETECT       -1   
2040 2040
 #define SDSS               20 // 8
2041 2041
 #define LED_PIN             6
2042 2042
 #define PS_ON_PIN          27
@@ -2062,15 +2062,15 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2062 2062
 #define BTN_ENC            40
2063 2063
 #endif
2064 2064
 
2065
-#endif  // MOTHERBOARD == 84 (Teensy++2.0 Breadboard)
2065
+#endif // TEENSY2
2066 2066
 
2067 2067
 
2068 2068
 /****************************************************************************************
2069 2069
 * Gen3+ pin assignment
2070 2070
 *
2071 2071
 ****************************************************************************************/
2072
-#if MOTHERBOARD == 9
2073
-#define MOTHERBOARD 6   /*TODO: Figure out, Why is this done?*/
2072
+#if MB(GEN3_PLUS)
2073
+#define MOTHERBOARD BOARD_SANGUINOLOLU_11   /*TODO: Figure out, Why is this done?*/
2074 2074
 #define KNOWN_BOARD 1
2075 2075
 #ifndef __AVR_ATmega644P__
2076 2076
 #ifndef __AVR_ATmega1284P__
@@ -2116,13 +2116,13 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2116 2116
 #define SDSS               4
2117 2117
 #define HEATER_2_PIN       -1
2118 2118
 
2119
-#endif
2119
+#endif // GEN3_PLUS
2120 2120
 
2121 2121
 /****************************************************************************************
2122 2122
 * Gen3  Monolithic Electronics
2123 2123
 *
2124 2124
 ****************************************************************************************/
2125
-#if MOTHERBOARD == 22
2125
+#if MB(GEN3_MONOLITHIC)
2126 2126
 #define KNOWN_BOARD 1
2127 2127
 
2128 2128
 #ifndef __AVR_ATmega644P__
@@ -2170,12 +2170,12 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2170 2170
 #define TEMP_BED_PIN -1
2171 2171
 
2172 2172
 
2173
-#define SDSS		 -1
2173
+#define SDSS     -1
2174 2174
 #define SDPOWER          -1
2175 2175
 #define LED_PIN          -1
2176 2176
 
2177 2177
 //pin for controlling the PSU.
2178
-#define PS_ON_PIN       14	//Alex, Do this work on the card?
2178
+#define PS_ON_PIN       14  //Alex, Do this work on the card?
2179 2179
 
2180 2180
 //Alex extras from Gen3+
2181 2181
 #define KILL_PIN           -1
@@ -2183,7 +2183,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2183 2183
 #define TEMP_2_PIN         -1
2184 2184
 #define HEATER_2_PIN       -1
2185 2185
 
2186
-#endif
2186
+#endif // GEN3_MONOLITHIC
2187 2187
 
2188 2188
 /****************************************************************************************
2189 2189
 * Open Motion controller with enable based extruders
@@ -2214,7 +2214,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2214 2214
 *                        +--------+
2215 2215
 *
2216 2216
 ****************************************************************************************/
2217
-#if MOTHERBOARD == 90 //Alpha OMCA board
2217
+#if MB(OMCA_A) //Alpha OMCA board
2218 2218
 #define KNOWN_BOARD 1
2219 2219
 
2220 2220
 #ifndef __AVR_ATmega644__
@@ -2266,9 +2266,9 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2266 2266
 #define TEMP_BED_PIN       -1 // 1,2 or I2C
2267 2267
 /*  Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31)  */
2268 2268
 
2269
-#endif
2269
+#endif // OMCA_A
2270 2270
 
2271
-#if MOTHERBOARD == 91  // Final OMCA board -- REF http://sanguino.cc/hardware
2271
+#if MB(OMCA)  // Final OMCA board -- REF http://sanguino.cc/hardware
2272 2272
 #define KNOWN_BOARD 1
2273 2273
 
2274 2274
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
@@ -2332,14 +2332,13 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2332 2332
 #define I2C_SCL       16
2333 2333
 #define I2C_SDA       17
2334 2334
 
2335
-#endif
2335
+#endif // OMCA
2336 2336
 
2337
-#if MOTHERBOARD == 301
2338
-#define KNOWN_BOARD
2339 2337
 /*****************************************************************
2340 2338
 * Rambo Pin Assignments
2341 2339
 ******************************************************************/
2342
-
2340
+#if MB(RAMBO)
2341
+#define KNOWN_BOARD
2343 2342
 #ifndef __AVR_ATmega2560__
2344 2343
 #error Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
2345 2344
 #endif
@@ -2478,13 +2477,13 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2478 2477
   #define FILWIDTH_PIN        3
2479 2478
 #endif //FILAMENT_SENSOR
2480 2479
 
2481
-#endif
2480
+#endif // RAMBO
2482 2481
 
2483 2482
 /****************************************************************************************
2484 2483
 * MegaTronics
2485 2484
 *
2486 2485
 ****************************************************************************************/
2487
-#if MOTHERBOARD == 70
2486
+#if MB(MEGATRONICS)
2488 2487
 #define KNOWN_BOARD 1
2489 2488
 
2490 2489
 
@@ -2570,7 +2569,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2570 2569
     #define BLEN_B 1
2571 2570
     #define BLEN_A 0
2572 2571
 
2573
-    #define SDCARDDETECT -1		// Ramps does not use this port
2572
+    #define SDCARDDETECT -1   // Ramps does not use this port
2574 2573
 
2575 2574
       //encoder rotation values
2576 2575
     #define encrot0 0
@@ -2580,13 +2579,13 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2580 2579
 #endif
2581 2580
 #endif //ULTRA_LCD
2582 2581
 
2583
-#endif
2582
+#endif // MEGATRONICS
2584 2583
 
2585 2584
 /****************************************************************************************
2586 2585
 * MegaTronics v2.0
2587 2586
 *
2588 2587
 ****************************************************************************************/
2589
-#if MOTHERBOARD == 701
2588
+#if MB(MEGATRONICS_2)
2590 2589
  #define KNOWN_BOARD 1
2591 2590
 
2592 2591
 
@@ -2682,7 +2681,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2682 2681
  #define BLEN_B 1
2683 2682
  #define BLEN_A 0
2684 2683
 
2685
- #define SDCARDDETECT -1	// Megatronics does not use this port
2684
+ #define SDCARDDETECT -1  // Megatronics does not use this port
2686 2685
 
2687 2686
    //encoder rotation values
2688 2687
  #define encrot0 0
@@ -2690,14 +2689,14 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2690 2689
  #define encrot2 3
2691 2690
  #define encrot3 1
2692 2691
 
2693
-#endif
2692
+#endif // MEGATRONICS_2
2694 2693
 
2695 2694
 
2696 2695
 /****************************************************************************************
2697 2696
 * Minitronics v1.0
2698 2697
 *
2699 2698
 ****************************************************************************************/
2700
-#if MOTHERBOARD == 702
2699
+#if MB(MEGATRONICS_1)
2701 2700
  #define KNOWN_BOARD 1
2702 2701
 
2703 2702
 
@@ -2778,7 +2777,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2778 2777
  #define BLEN_B 1
2779 2778
  #define BLEN_A 0
2780 2779
 
2781
- #define SDCARDDETECT -1	// Megatronics does not use this port
2780
+ #define SDCARDDETECT -1  // Megatronics does not use this port
2782 2781
 
2783 2782
    //encoder rotation values
2784 2783
  #define encrot0 0
@@ -2786,13 +2785,13 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2786 2785
  #define encrot2 3
2787 2786
  #define encrot3 1
2788 2787
 
2789
-#endif
2788
+#endif // MEGATRONICS_1
2790 2789
 
2791 2790
 /****************************************************************************************
2792 2791
 * Cheaptronic v1.0
2793 2792
 *
2794 2793
 ****************************************************************************************/
2795
-#if MOTHERBOARD == 2
2794
+#if MB(CHEAPTRONIC)
2796 2795
  #define KNOWN_BOARD 1
2797 2796
 
2798 2797
  #ifndef __AVR_ATmega2560__
@@ -2887,7 +2886,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2887 2886
  #define encrot2 3
2888 2887
  #define encrot3 1
2889 2888
 
2890
-#endif
2889
+#endif // CHEAPTRONIC
2891 2890
 
2892 2891
 
2893 2892
 
@@ -2954,5 +2953,5 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2954 2953
                         HEATER_BED_PIN, FAN_PIN,                  \
2955 2954
                         _E0_PINS _E1_PINS _E2_PINS             \
2956 2955
                         analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
2957
-#endif
2958 2956
 
2957
+#endif //__PINS_H

+ 1
- 1
Marlin/temperature.cpp Parādīt failu

@@ -768,7 +768,7 @@ return(filament_width_nominal/temp*100);
768 768
 
769 769
 void tp_init()
770 770
 {
771
-#if (MOTHERBOARD == 80) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
771
+#if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
772 772
   //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
773 773
   MCUCR=(1<<JTD); 
774 774
   MCUCR=(1<<JTD);

Notiek ielāde…
Atcelt
Saglabāt