Переглянути джерело

🎨 Reorganize BTT_E3_RRF_IDEX_BOARD

Scott Lahteine 3 роки тому
джерело
коміт
b99411b62b
1 змінених файлів з 69 додано та 51 видалено
  1. 69
    51
      Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h

+ 69
- 51
Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h Переглянути файл

@@ -29,58 +29,9 @@
29 29
   #define BOARD_INFO_NAME "BTT E3 RRF"
30 30
 #endif
31 31
 
32
-#define FPC2_PIN                            PB11
33
-#define FPC3_PIN                            PB10
34
-#define FPC4_PIN                            PE12
35
-#define FPC5_PIN                            PE13
36
-#define FPC6_PIN                            PE14
37
-#define FPC7_PIN                            PE15
38
-#define FPC8_PIN                            PA3
39
-#define FPC9_PIN                            PA2
40
-#define FPC10_PIN                           PA8
41
-#define FPC11_PIN                           PC15
42
-#define FPC12_PIN                           PC14
43
-#define FPC13_PIN                           PC13
44
-#define FPC14_PIN                           PE6
45
-#define FPC15_PIN                           PE5
46
-#define FPC16_PIN                           PE4
47
-#define FPC17_PIN                           PE3
48
-
32
+// Add-on board for IDEX conversion
49 33
 //#define BTT_E3_RRF_IDEX_BOARD
50 34
 
51
-#ifdef BTT_E3_RRF_IDEX_BOARD
52
-
53
-  #define X2_ENABLE_PIN                FPC13_PIN  // X2EN
54
-  #define X2_STEP_PIN                  FPC11_PIN  // X2STP
55
-  #define X2_DIR_PIN                   FPC10_PIN  // X2DIR
56
-  #define X2_SERIAL_TX_PIN             FPC12_PIN  // X2UART
57
-  #define X2_SERIAL_RX_PIN             FPC12_PIN  // X2UART
58
-  #if X_HOME_TO_MIN
59
-    #define X_MAX_PIN                   FPC2_PIN  // X2-STOP
60
-  #else
61
-    #define X_MIN_PIN                   FPC2_PIN  // X2-STOP
62
-  #endif
63
-
64
-  #define E1_ENABLE_PIN                 FPC7_PIN  // E1EN
65
-  #define E1_STEP_PIN                   FPC5_PIN  // E1STP
66
-  #define E1_DIR_PIN                    FPC4_PIN  // E1DIR
67
-  #define E1_SERIAL_TX_PIN              FPC6_PIN  // E1UART
68
-  #define E1_SERIAL_RX_PIN              FPC6_PIN  // E1UART
69
-
70
-  #ifndef FIL1_RUNOUT2_PIN
71
-    #define FIL_RUNOUT2_PIN             FPC3_PIN  // E1-STOP
72
-  #endif
73
-
74
-  #define HEATER_1_PIN                 FPC16_PIN  // "HE1"
75
-
76
-  #define PT100_PIN                     FPC8_PIN  // Analog Input "PT100"(INA826)
77
-  #define TEMP_1_PIN                    FPC9_PIN  // Analog Input "TH1"
78
-
79
-  #define FAN1_PIN                     FPC15_PIN  // "FAN0" in IDEX board
80
-  #define FAN2_PIN                     FPC14_PIN  // "FAN1" in IDEX board
81
-
82
-#endif
83
-
84 35
 // Onboard I2C EEPROM
85 36
 #define I2C_EEPROM
86 37
 #define MARLIN_EEPROM_SIZE 0x1000                 // 4KB
@@ -97,6 +48,14 @@
97 48
 #define Y_STOP_PIN                          PC1   // Y-STOP
98 49
 #define Z_STOP_PIN                          PC2   // Z-STOP
99 50
 
51
+#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
52
+  #if X2_USE_ENDSTOP == _XMAX_
53
+    #define X_MAX_PIN                   FPC2_PIN  // X2-STOP
54
+  #elif X2_USE_ENDSTOP == _XMIN_
55
+    #define X_MIN_PIN                   FPC2_PIN  // X2-STOP
56
+  #endif
57
+#endif
58
+
100 59
 //
101 60
 // Z Probe must be this pin
102 61
 //
@@ -109,6 +68,10 @@
109 68
   #define FIL_RUNOUT_PIN                    PC3   // E0-STOP
110 69
 #endif
111 70
 
71
+#if !defined(FIL1_RUNOUT2_PIN) && ENABLED(BTT_E3_RRF_IDEX_BOARD)
72
+  #define FIL_RUNOUT2_PIN               FPC3_PIN  // E1-STOP
73
+#endif
74
+
112 75
 //
113 76
 // Power-loss Detection
114 77
 //
@@ -135,6 +98,16 @@
135 98
 #define E0_STEP_PIN                         PD12
136 99
 #define E0_DIR_PIN                          PD13
137 100
 
101
+#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
102
+  #define E1_ENABLE_PIN                 FPC7_PIN  // E1EN
103
+  #define E1_STEP_PIN                   FPC5_PIN  // E1STP
104
+  #define E1_DIR_PIN                    FPC4_PIN  // E1DIR
105
+
106
+  #define X2_ENABLE_PIN                FPC13_PIN  // X2EN
107
+  #define X2_STEP_PIN                  FPC11_PIN  // X2STP
108
+  #define X2_DIR_PIN                   FPC10_PIN  // X2DIR
109
+#endif
110
+
138 111
 /**
139 112
  * TMC2208/TMC2209 stepper drivers
140 113
  */
@@ -154,6 +127,14 @@
154 127
   #define E0_SERIAL_TX_PIN                  PD11
155 128
   #define E0_SERIAL_RX_PIN                  PD11
156 129
 
130
+  #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
131
+    #define X2_SERIAL_TX_PIN           FPC12_PIN  // X2UART
132
+    #define X2_SERIAL_RX_PIN           FPC12_PIN  // X2UART
133
+
134
+    #define E1_SERIAL_TX_PIN            FPC6_PIN  // E1UART
135
+    #define E1_SERIAL_RX_PIN            FPC6_PIN  // E1UART
136
+  #endif
137
+
157 138
   // Reduce baud rate to improve software serial reliability
158 139
   #define TMC_BAUD_RATE 19200
159 140
 #endif
@@ -164,19 +145,37 @@
164 145
 #define TEMP_BED_PIN                        PA1   // Analog Input "TB"
165 146
 #define TEMP_0_PIN                          PA0   // Analog Input "TH0"
166 147
 
148
+#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
149
+  #define TEMP_1_PIN                    FPC9_PIN  // Analog Input "TH1"
150
+  #define PT100_PIN                     FPC8_PIN  // Analog Input "PT100" (INA826)
151
+#endif
152
+
167 153
 //
168 154
 // Heaters / Fans
169 155
 //
170 156
 #define HEATER_BED_PIN                      PB4   // "HB"
171 157
 #define HEATER_0_PIN                        PB3   // "HE0"
172 158
 
159
+#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
160
+  #define HEATER_1_PIN                 FPC16_PIN  // "HE1"
161
+#endif
162
+
173 163
 #define FAN_PIN                             PB5   // "FAN0"
174
-//#define FAN1_PIN                          PB6   // "FAN1"
175 164
 
176 165
 #ifndef CONTROLLER_FAN_PIN
177 166
   #define CONTROLLER_FAN_PIN                PB6   // "FAN1"
178 167
 #endif
179 168
 
169
+#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
170
+  #define FAN1_PIN                     FPC15_PIN  // "FAN0" in IDEX board
171
+  #define FAN2_PIN                     FPC14_PIN  // "FAN1" in IDEX board
172
+#else
173
+  //#define FAN1_PIN                        PB6   // "FAN1"
174
+#endif
175
+
176
+//
177
+// Misc. Functions
178
+//
180 179
 #ifndef NEOPIXEL_PIN
181 180
   #define NEOPIXEL_PIN                      PB7   // LED driving pin
182 181
 #endif
@@ -373,3 +372,22 @@
373 372
 #define ESP_WIFI_MODULE_RESET_PIN           PA4
374 373
 #define ESP_WIFI_MODULE_ENABLE_PIN          PA5
375 374
 #define ESP_WIFI_MODULE_GPIO0_PIN           PA6
375
+
376
+#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
377
+  #define FPC2_PIN                          PB11
378
+  #define FPC3_PIN                          PB10
379
+  #define FPC4_PIN                          PE12
380
+  #define FPC5_PIN                          PE13
381
+  #define FPC6_PIN                          PE14
382
+  #define FPC7_PIN                          PE15
383
+  #define FPC8_PIN                          PA3
384
+  #define FPC9_PIN                          PA2
385
+  #define FPC10_PIN                         PA8
386
+  #define FPC11_PIN                         PC15
387
+  #define FPC12_PIN                         PC14
388
+  #define FPC13_PIN                         PC13
389
+  #define FPC14_PIN                         PE6
390
+  #define FPC15_PIN                         PE5
391
+  #define FPC16_PIN                         PE4
392
+  #define FPC17_PIN                         PE3
393
+#endif

Завантаження…
Відмінити
Зберегти