Browse Source

[2.0.x] Board specific init macro (#11170)

TheLongAndOnly 7 years ago
parent
commit
cedc158106
2 changed files with 36 additions and 22 deletions
  1. 4
    0
      Marlin/src/Marlin.cpp
  2. 32
    22
      Marlin/src/pins/pins_RADDS.h

+ 4
- 0
Marlin/src/Marlin.cpp View File

@@ -719,6 +719,10 @@ void setup() {
719 719
     tmc2208_serial_begin();
720 720
   #endif
721 721
 
722
+  #ifdef BOARD_INIT
723
+    BOARD_INIT();
724
+  #endif
725
+
722 726
   // Check startup - does nothing if bootloader sets MCUSR to 0
723 727
   byte mcu = HAL_get_reset_source();
724 728
   if (mcu &  1) SERIAL_ECHOLNPGM(MSG_POWERUP);

+ 32
- 22
Marlin/src/pins/pins_RADDS.h View File

@@ -100,29 +100,39 @@
100 100
   #define E2_CS_PIN        35
101 101
 #endif
102 102
 
103
-// For Extension Board V2
103
+//
104
+// Extension Board V2
104 105
 // http://doku.radds.org/dokumentation/extension-board
105
-//#define E3_STEP_PIN        35
106
-//#define E3_DIR_PIN         33
107
-//#define E3_ENABLE_PIN      37
108
-//#ifndef E3_CS_PIN
109
-//  #define E3_CS_PIN         6
110
-//#endif
111
-
112
-//#define Z2_STEP_PIN        29
113
-//#define Z2_DIR_PIN         27
114
-//#define Z2_ENABLE_PIN      31
115
-//#ifndef Z2_CS_PIN
116
-//  #define Z2_CS_PIN        39
117
-//#endif
118
-
119
-// Microstepping pins - Mapping not from fastio.h (?)
120
-//#define E3_MS1_PIN         67
121
-//#define E3_MS2_PIN         68
122
-//#define E3_MS3_PIN         69
123
-//#define Z2_MS1_PIN         67   // shared with E3_MS1_PIN
124
-//#define Z2_MS2_PIN         68   // shared with E3_MS2_PIN
125
-//#define Z2_MS3_PIN         69   // shared with E3_MS3_PIN
106
+//
107
+//#define RADDS_EXTENSION
108
+#if ENABLED(RADDS_EXTENSION)
109
+  #define E3_STEP_PIN        35
110
+  #define E3_DIR_PIN         33
111
+  #define E3_ENABLE_PIN      37
112
+  #ifndef E3_CS_PIN
113
+    #define E3_CS_PIN         6
114
+  #endif
115
+
116
+  #define E3_MS1_PIN         67
117
+  #define E3_MS2_PIN         68
118
+  #define E3_MS3_PIN         69
119
+
120
+  #define Z2_STEP_PIN        29
121
+  #define Z2_DIR_PIN         27
122
+  #define Z2_ENABLE_PIN      31
123
+  #ifndef Z2_CS_PIN
124
+    #define Z2_CS_PIN        39
125
+  #endif
126
+
127
+  #define Z2_MS1_PIN         67   // shared with E3_MS1_PIN
128
+  #define Z2_MS2_PIN         68   // shared with E3_MS2_PIN
129
+  #define Z2_MS3_PIN         69   // shared with E3_MS3_PIN
130
+
131
+  #define RADDS_EXT_VDD1_PIN 25
132
+  #define RADDS_EXT_VDD2_PIN 66
133
+
134
+  #define BOARD_INIT() OUT_WRITE(RADDS_EXT_VDD1_PIN, HIGH); OUT_WRITE(RADDS_EXT_VDD2_PIN, HIGH)
135
+#endif
126 136
 
127 137
 //
128 138
 // Temperature Sensors

Loading…
Cancel
Save