Browse Source

Merge pull request #1195 from thinkyhead/board_defines

Defines for electronics boards
Bo Herrmannsen 9 years ago
parent
commit
7458bfe297

+ 5
- 47
Marlin/Configuration.h View File

1
 #ifndef CONFIGURATION_H
1
 #ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
+#include "boards.h"
5
+
4
 // This configuration file contains the basic settings.
6
 // This configuration file contains the basic settings.
5
 // Advanced settings can be found in Configuration_adv.h
7
 // Advanced settings can be found in Configuration_adv.h
6
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
8
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
36
 // This enables the serial port associated to the Bluetooth interface
38
 // This enables the serial port associated to the Bluetooth interface
37
 //#define BTENABLED              // Enable BT interface on AT90USB devices
39
 //#define BTENABLED              // Enable BT interface on AT90USB devices
38
 
40
 
39
-
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
-
41
+// The following define selects which electronics board you have.
42
+// Please choose the name from boards.h that matches your setup
85
 #ifndef MOTHERBOARD
43
 #ifndef MOTHERBOARD
86
-#define MOTHERBOARD 7
44
+  #define MOTHERBOARD BOARD_ULTIMAKER
87
 #endif
45
 #endif
88
 
46
 
89
 // Define this to set a custom name for your generic Mendel,
47
 // Define this to set a custom name for your generic Mendel,

+ 55
- 0
Marlin/boards.h View File

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 View File

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

+ 5
- 45
Marlin/example_configurations/SCARA/Configuration.h View File

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

+ 5
- 46
Marlin/example_configurations/delta/Configuration.h View File

1
 #ifndef CONFIGURATION_H
1
 #ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
+#include "boards.h"
5
+
4
 // This configuration file contains the basic settings.
6
 // This configuration file contains the basic settings.
5
 // Advanced settings can be found in Configuration_adv.h
7
 // Advanced settings can be found in Configuration_adv.h
6
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
8
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
29
 // This enables the serial port associated to the Bluetooth interface
31
 // This enables the serial port associated to the Bluetooth interface
30
 //#define BTENABLED              // Enable BT interface on AT90USB devices
32
 //#define BTENABLED              // Enable BT interface on AT90USB devices
31
 
33
 
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
-
34
+// The following define selects which electronics board you have.
35
+// Please choose the name from boards.h that matches your setup
77
 #ifndef MOTHERBOARD
36
 #ifndef MOTHERBOARD
78
-#define MOTHERBOARD 33
37
+  #define MOTHERBOARD BOARD_RAMPS_13_EFB
79
 #endif
38
 #endif
80
 
39
 
81
 // Define this to set a custom name for your generic Mendel,
40
 // Define this to set a custom name for your generic Mendel,

+ 5
- 43
Marlin/example_configurations/makibox/Configuration.h View File

1
 #ifndef CONFIGURATION_H
1
 #ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
+#include "boards.h"
5
+
4
 // This configuration file contains the basic settings.
6
 // This configuration file contains the basic settings.
5
 // Advanced settings can be found in Configuration_adv.h
7
 // Advanced settings can be found in Configuration_adv.h
6
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
8
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
30
 // This enables the serial port associated to the Bluetooth interface
32
 // This enables the serial port associated to the Bluetooth interface
31
 //#define BTENABLED              // Enable BT interface on AT90USB devices
33
 //#define BTENABLED              // Enable BT interface on AT90USB devices
32
 
34
 
33
-
34
-//// The following define selects which electronics board you have. Please choose the one that matches your setup
35
-// 10 = Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
36
-// 11 = Gen7 v1.1, v1.2 = 11
37
-// 12 = Gen7 v1.3
38
-// 13 = Gen7 v1.4
39
-// 2  = Cheaptronic v1.0
40
-// 20 = Sethi 3D_1
41
-// 3  = MEGA/RAMPS up to 1.2 = 3
42
-// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
43
-// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
44
-// 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, 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
-// 9  = Gen3+
66
-// 70 = Megatronics
67
-// 701= Megatronics v2.0
68
-// 702= Minitronics v1.0
69
-// 90 = Alpha OMCA board
70
-// 91 = Final OMCA board
71
-// 301= Rambo
72
-// 21 = Elefu Ra Board (v3)
73
-// 88 = 5DPrint D8 Driver Board
74
-
35
+// The following define selects which electronics board you have.
36
+// Please choose the name from boards.h that matches your setup
75
 #ifndef MOTHERBOARD
37
 #ifndef MOTHERBOARD
76
-#define MOTHERBOARD 88
38
+  #define MOTHERBOARD BOARD_5DPRINT
77
 #endif
39
 #endif
78
 
40
 
79
 // Define this to set a custom name for your generic Mendel,
41
 // Define this to set a custom name for your generic Mendel,

+ 5
- 46
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

1
 #ifndef CONFIGURATION_H
1
 #ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
+#include "boards.h"
5
+
4
 // This configuration file contains the basic settings.
6
 // This configuration file contains the basic settings.
5
 // Advanced settings can be found in Configuration_adv.h
7
 // Advanced settings can be found in Configuration_adv.h
6
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
8
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
36
 // This enables the serial port associated to the Bluetooth interface
38
 // This enables the serial port associated to the Bluetooth interface
37
 //#define BTENABLED              // Enable BT interface on AT90USB devices
39
 //#define BTENABLED              // Enable BT interface on AT90USB devices
38
 
40
 
39
-
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
-// 70 = Megatronics
75
-// 701= Megatronics v2.0
76
-// 702= Minitronics v1.0
77
-// 90 = Alpha OMCA board
78
-// 91 = Final OMCA board
79
-// 301= Rambo
80
-// 21 = Elefu Ra Board (v3)
81
-// 88 = 5DPrint D8 Driver Board
82
-// 999 = Leapfrog
83
-
41
+// The following define selects which electronics board you have.
42
+// Please choose the name from boards.h that matches your setup
84
 #ifndef MOTHERBOARD
43
 #ifndef MOTHERBOARD
85
-#define MOTHERBOARD 91
44
+  #define MOTHERBOARD BOARD_OMCA
86
 #endif
45
 #endif
87
 
46
 
88
 // Define this to set a custom name for your generic Mendel,
47
 // Define this to set a custom name for your generic Mendel,

+ 4
- 4
Marlin/language.h View File

31
 
31
 
32
 #define PROTOCOL_VERSION "1.0"
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
 	#define MACHINE_NAME "Ultimaker"
35
 	#define MACHINE_NAME "Ultimaker"
36
 	#define FIRMWARE_URL "http://firmware.ultimaker.com"
36
 	#define FIRMWARE_URL "http://firmware.ultimaker.com"
37
-#elif MOTHERBOARD == 80
37
+#elif MB(RUMBA)
38
 	#define MACHINE_NAME "Rumba"
38
 	#define MACHINE_NAME "Rumba"
39
 	#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
39
 	#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
40
-#elif MOTHERBOARD == 77
40
+#elif MB(3DRAG)
41
 	#define MACHINE_NAME "3Drag"
41
 	#define MACHINE_NAME "3Drag"
42
 	#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
42
 	#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
43
-#elif MOTHERBOARD == 88
43
+#elif MB(5DPRINT)
44
 	#define MACHINE_NAME "Makibox"
44
 	#define MACHINE_NAME "Makibox"
45
 	#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
45
 	#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
46
 #else
46
 #else

+ 126
- 127
Marlin/pins.h View File

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

768
 
768
 
769
 void tp_init()
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
   //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
772
   //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
773
   MCUCR=(1<<JTD); 
773
   MCUCR=(1<<JTD); 
774
   MCUCR=(1<<JTD);
774
   MCUCR=(1<<JTD);

Loading…
Cancel
Save