Skip to content

Commit 9c80a89

Browse files
committed
🎨 Reorganize BTT_E3_RRF_IDEX_BOARD
1 parent 00834ef commit 9c80a89

File tree

1 file changed

+69
-51
lines changed

1 file changed

+69
-51
lines changed

Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -29,58 +29,9 @@
2929
#define BOARD_INFO_NAME "BTT E3 RRF"
3030
#endif
3131

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
4933
//#define BTT_E3_RRF_IDEX_BOARD
5034

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-
8435
// Onboard I2C EEPROM
8536
#define I2C_EEPROM
8637
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
@@ -97,6 +48,14 @@
9748
#define Y_STOP_PIN PC1 // Y-STOP
9849
#define Z_STOP_PIN PC2 // Z-STOP
9950

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+
10059
//
10160
// Z Probe must be this pin
10261
//
@@ -109,6 +68,10 @@
10968
#define FIL_RUNOUT_PIN PC3 // E0-STOP
11069
#endif
11170

71+
#if !defined(FIL1_RUNOUT2_PIN) && ENABLED(BTT_E3_RRF_IDEX_BOARD)
72+
#define FIL_RUNOUT2_PIN FPC3_PIN // E1-STOP
73+
#endif
74+
11275
//
11376
// Power-loss Detection
11477
//
@@ -135,6 +98,16 @@
13598
#define E0_STEP_PIN PD12
13699
#define E0_DIR_PIN PD13
137100

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+
138111
/**
139112
* TMC2208/TMC2209 stepper drivers
140113
*/
@@ -154,6 +127,14 @@
154127
#define E0_SERIAL_TX_PIN PD11
155128
#define E0_SERIAL_RX_PIN PD11
156129

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+
157138
// Reduce baud rate to improve software serial reliability
158139
#define TMC_BAUD_RATE 19200
159140
#endif
@@ -164,19 +145,37 @@
164145
#define TEMP_BED_PIN PA1 // Analog Input "TB"
165146
#define TEMP_0_PIN PA0 // Analog Input "TH0"
166147

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+
167153
//
168154
// Heaters / Fans
169155
//
170156
#define HEATER_BED_PIN PB4 // "HB"
171157
#define HEATER_0_PIN PB3 // "HE0"
172158

159+
#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
160+
#define HEATER_1_PIN FPC16_PIN // "HE1"
161+
#endif
162+
173163
#define FAN_PIN PB5 // "FAN0"
174-
//#define FAN1_PIN PB6 // "FAN1"
175164

176165
#ifndef CONTROLLER_FAN_PIN
177166
#define CONTROLLER_FAN_PIN PB6 // "FAN1"
178167
#endif
179168

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+
//
180179
#ifndef NEOPIXEL_PIN
181180
#define NEOPIXEL_PIN PB7 // LED driving pin
182181
#endif
@@ -373,3 +372,22 @@
373372
#define ESP_WIFI_MODULE_RESET_PIN PA4
374373
#define ESP_WIFI_MODULE_ENABLE_PIN PA5
375374
#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

0 commit comments

Comments
 (0)