Skip to content

Commit 85b3d68

Browse files
committed
Added driver support for additional probes, updated to use universal aux I/O.
1 parent af660cf commit 85b3d68

18 files changed

+336
-349
lines changed

main/boards/bdring_v3.5_map.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,22 @@
6464
#undef COOLANT_ENABLE
6565
#define COOLANT_ENABLE 0 // No coolant outputs
6666

67-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
68-
#define RESET_PIN GPIO_NUM_34
69-
#define FEED_HOLD_PIN GPIO_NUM_36
70-
#define CYCLE_START_PIN GPIO_NUM_39
71-
7267
#define AUXINPUT0_PIN GPIO_NUM_35
7368
#define AUXINPUT1_PIN GPIO_NUM_32
69+
#define AUXINPUT2_PIN GPIO_NUM_34 // Reset/EStop
70+
#define AUXINPUT3_PIN GPIO_NUM_36 // Feed hold
71+
#define AUXINPUT4_PIN GPIO_NUM_39 // Cycle start
72+
73+
// Define user-control controls (cycle start, reset, feed hold) input pins.
74+
#if CONTROL_ENABLE & CONTROL_HALT
75+
#define RESET_PIN AUXINPUT2_PIN
76+
#endif
77+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
78+
#define FEED_HOLD_PIN AUXINPUT3_PIN
79+
#endif
80+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
81+
#define CYCLE_START_PIN AUXINPUT4_PIN
82+
#endif
7483

7584
#if PROBE_ENABLE
7685
#define PROBE_PIN AUXINPUT1_PIN

main/boards/bdring_v4_map.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,22 @@
7979
#endif
8080
#endif
8181

82-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
83-
#define RESET_PIN GPIO_NUM_34
84-
#define FEED_HOLD_PIN GPIO_NUM_36
85-
#define CYCLE_START_PIN GPIO_NUM_39
86-
8782
#define AUXINPUT0_PIN GPIO_NUM_35
8883
#define AUXINPUT1_PIN GPIO_NUM_32
84+
#define AUXINPUT2_PIN GPIO_NUM_34 // Reset/EStop
85+
#define AUXINPUT3_PIN GPIO_NUM_36 // Feed hold
86+
#define AUXINPUT4_PIN GPIO_NUM_39 // Cycle start
87+
88+
// Define user-control controls (cycle start, reset, feed hold) input pins.
89+
#if CONTROL_ENABLE & CONTROL_HALT
90+
#define RESET_PIN AUXINPUT2_PIN
91+
#endif
92+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
93+
#define FEED_HOLD_PIN AUXINPUT3_PIN
94+
#endif
95+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
96+
#define CYCLE_START_PIN AUXINPUT4_PIN
97+
#endif
8998

9099
#if PROBE_ENABLE
91100
#define PROBE_PIN AUXINPUT1_PIN

main/boards/btt_rodent_map.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@
2525
#error "Axis configuration is not supported!"
2626
#endif
2727

28-
#if N_ABC_MOTORS == 0
29-
#error "Axis configuration is not supported! The A motor must be enabled for proper Trinamic communication"
28+
// Force four motors in order to keep the TMC driver SPI chain intact
29+
#if N_ABC_MOTORS == 0 && N_GANGED == 0
30+
#undef N_ABC_MOTORS
31+
#undef N_GANGED
32+
#undef Y_GANGED
33+
#define N_ABC_MOTORS 1
34+
#define N_GANGED 1
35+
#define Y_GANGED 1
3036
#endif
3137

32-
3338
#if KEYPAD_ENABLE == 1
3439
#error No free pins for I2C keypad!
3540
#endif
@@ -69,15 +74,13 @@
6974
#define Z_ENABLE_PIN I2SO(8)
7075
#define Z_LIMIT_PIN GPIO_NUM_33
7176

72-
7377
// Define ganged axis or A axis step pulse and step direction output pins.
7478
#define M3_AVAILABLE
7579
#define M3_STEP_PIN I2SO(13)
7680
#define M3_DIRECTION_PIN I2SO(12)
7781
#define M3_ENABLE_PIN I2SO(15)
7882
#define M3_LIMIT_PIN GPIO_NUM_32
7983

80-
8184
#define AUXOUTPUT0_PIN GPIO_NUM_25 // Spindle enable
8285
#define AUXOUTPUT1_PIN GPIO_NUM_13 // Spindle PWM
8386
#define AUXOUTPUT2_PIN GPIO_NUM_15 // Spindle direction

main/boards/cnc_boosterpack_map.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,20 @@
103103
#endif
104104
#define AUXINPUT1_PIN GPIO_NUM_34
105105
#define AUXINPUT2_PIN GPIO_NUM_13
106+
#define AUXINPUT3_PIN GPIO_NUM_35 // Reset/EStop
107+
#define AUXINPUT4_PIN GPIO_NUM_39 // Feed hold
108+
#define AUXINPUT5_PIN GPIO_NUM_36 // Cycle start
106109

107-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
108-
#define RESET_PIN GPIO_NUM_35
109-
#define FEED_HOLD_PIN GPIO_NUM_39
110-
#define CYCLE_START_PIN GPIO_NUM_36
110+
// Define user-control controls (cycle start, reset, feed hold) input pins.
111+
#if CONTROL_ENABLE & CONTROL_HALT
112+
#define RESET_PIN AUXINPUT3_PIN
113+
#endif
114+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
115+
#define FEED_HOLD_PIN AUXINPUT4_PIN
116+
#endif
117+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
118+
#define CYCLE_START_PIN AUXINPUT5_PIN
119+
#endif
111120

112121
// Define probe switch input pin.
113122
#if PROBE_ENABLE

main/boards/cnc_boosterpack_s3_map.h

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,27 +84,39 @@
8484
#define SPINDLE_ENABLE_PIN IOEXPAND
8585
#endif
8686

87-
#define AUXINPUT1_PIN GPIO_NUM_34
88-
8987
// Define flood and mist coolant enable output pins.
9088
#define COOLANT_FLOOD_PIN IOEXPAND
9189
#define COOLANT_MIST_PIN IOEXPAND
9290

93-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
94-
#define RESET_PIN GPIO_NUM_35
95-
#define FEED_HOLD_PIN GPIO_NUM_39
96-
#define CYCLE_START_PIN GPIO_NUM_36
97-
#if SAFETY_DOOR_ENABLE
98-
#define SAFETY_DOOR_PIN AUXINPUT1_PIN
91+
#define AUXINPUT0_PIN GPIO_NUM_33
92+
#define AUXINPUT1_PIN GPIO_NUM_34
93+
#define AUXINPUT2_PIN GPIO_NUM_13 // Probe
94+
#define AUXINPUT3_PIN GPIO_NUM_35 // Reset/EStop
95+
#define AUXINPUT4_PIN GPIO_NUM_39 // Feed hold
96+
#define AUXINPUT5_PIN GPIO_NUM_36 // Cycle start
97+
98+
// Define user-control controls (cycle start, reset, feed hold) input pins.
99+
#if CONTROL_ENABLE & CONTROL_HALT
100+
#define RESET_PIN AUXINPUT3_PIN
101+
#endif
102+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
103+
#define FEED_HOLD_PIN AUXINPUT4_PIN
104+
#endif
105+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
106+
#define CYCLE_START_PIN AUXINPUT5_PIN
99107
#endif
100108

101109
// Define probe switch input pin.
102-
#define PROBE_PIN GPIO_NUM_13
110+
#if PROBE_ENABLE
111+
#define PROBE_PIN AUXINPUT2_PIN
112+
#endif
113+
114+
#if SAFETY_DOOR_ENABLE
115+
#define SAFETY_DOOR_PIN AUXINPUT1_PIN
116+
#endif
103117

104118
#if I2C_STROBE_ENABLE
105-
#define I2C_STROBE_PIN GPIO_NUM_33
106-
#else
107-
#define AUXINPUT0_PIN GPIO_NUM_33
119+
#define I2C_STROBE_PIN AUXINPUT0_PIN
108120
#endif
109121

110122
#ifdef ADD_SERIAL1

main/boards/espduino-32_wemos_d1_r32_uno_map.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,21 @@
8989
#endif
9090
#endif
9191

92-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
93-
#define RESET_PIN GPIO_NUM_2
94-
#define FEED_HOLD_PIN GPIO_NUM_4
95-
#define CYCLE_START_PIN GPIO_NUM_35
96-
97-
#define AUXINPUT0_PIN GPIO_NUM_39
92+
#define AUXINPUT0_PIN GPIO_NUM_39 // Probe
93+
#define AUXINPUT1_PIN GPIO_NUM_2 // Reset/EStop
94+
#define AUXINPUT2_PIN GPIO_NUM_4 // Feed hold
95+
#define AUXINPUT3_PIN GPIO_NUM_35 // Cycle start
96+
97+
// Define user-control controls (cycle start, reset, feed hold) input pins.
98+
#if CONTROL_ENABLE & CONTROL_HALT
99+
#define RESET_PIN AUXINPUT1_PIN
100+
#endif
101+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
102+
#define FEED_HOLD_PIN AUXINPUT2_PIN
103+
#endif
104+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
105+
#define CYCLE_START_PIN AUXINPUT3_PIN
106+
#endif
98107

99108
#if PROBE_ENABLE
100109
#define PROBE_PIN AUXINPUT0_PIN

main/boards/fysetc_e4_map.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
#define UART1_RX_PIN GPIO_NUM_21
3838
#define UART1_TX_PIN GPIO_NUM_22
3939

40+
#if CONTROL_ENABLE & CONTROL_HALT
41+
#undef CONTROL_ENABLE
42+
#define CONTROL_ENABLE & CONTROL_HALT // Only input supported.
43+
#endif
44+
4045
#if TRINAMIC_ENABLE != 2209
4146
#undef TRINAMIC_ENABLE
4247
#undef TRINAMIC_UART_ENABLE
@@ -96,10 +101,12 @@
96101
#endif
97102

98103
#define AUXINPUT0_PIN GPIO_NUM_39 // Probe
104+
#define AUXINPUT1_PIN GPIO_NUM_36 // Reset/EStop
99105

100-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
101-
102-
#define RESET_PIN GPIO_NUM_36
106+
// Define user-control controls (cycle start, reset, feed hold) input pins.
107+
#if CONTROL_ENABLE & CONTROL_HALT
108+
#define RESET_PIN AUXINPUT1_PIN
109+
#endif
103110

104111
#if PROBE_ENABLE
105112
#define PROBE_PIN AUXINPUT0_PIN

main/boards/generic_map.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,22 @@
7474
#define COOLANT_MIST_PIN AUXOUTPUT4_PIN
7575
#endif
7676

77-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
78-
#define RESET_PIN GPIO_NUM_34
79-
#define FEED_HOLD_PIN GPIO_NUM_36
80-
#define CYCLE_START_PIN GPIO_NUM_39
81-
8277
#define AUXINPUT0_PIN GPIO_NUM_35
8378
#define AUXINPUT1_PIN GPIO_NUM_32
79+
#define AUXINPUT2_PIN GPIO_NUM_34 // Reset/EStop
80+
#define AUXINPUT3_PIN GPIO_NUM_36 // Feed hold
81+
#define AUXINPUT4_PIN GPIO_NUM_39 // Cycle start
82+
83+
// Define user-control controls (cycle start, reset, feed hold) input pins.
84+
#if CONTROL_ENABLE & CONTROL_HALT
85+
#define RESET_PIN AUXINPUT2_PIN
86+
#endif
87+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
88+
#define FEED_HOLD_PIN AUXINPUT3_PIN
89+
#endif
90+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
91+
#define CYCLE_START_PIN AUXINPUT4_PIN
92+
#endif
8493

8594
#if PROBE_ENABLE
8695
#define PROBE_PIN AUXINPUT1_PIN

main/boards/generic_s3_map.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,24 @@
8080
#define COOLANT_MIST_PIN AUXOUTPUT4_PIN
8181
#endif
8282

83-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
83+
#define AUXINPUT0_PIN GPIO_NUM_1
84+
#define AUXINPUT1_PIN GPIO_NUM_2
8485
#if !SDCARD_ENABLE
85-
#define RESET_PIN GPIO_NUM_38
86-
#define FEED_HOLD_PIN GPIO_NUM_37
86+
#define AUXINPUT2_PIN GPIO_NUM_38 // Reset/EStop
87+
#define AUXINPUT3_PIN GPIO_NUM_37 // Feed hold
8788
#endif
88-
#define CYCLE_START_PIN GPIO_NUM_36
89+
#define AUXINPUT4_PIN GPIO_NUM_36 // Cycle start
8990

90-
#define AUXINPUT0_PIN GPIO_NUM_1
91-
#define AUXINPUT1_PIN GPIO_NUM_2
91+
// Define user-control controls (cycle start, reset, feed hold) input pins.
92+
#if (CONTROL_ENABLE & CONTROL_HALT) && defined(AUXINPUT2_PIN)
93+
#define RESET_PIN AUXINPUT2_PIN
94+
#endif
95+
#if (CONTROL_ENABLE & CONTROL_FEED_HOLD) && defined(AUXINPUT3_PIN)
96+
#define FEED_HOLD_PIN AUXINPUT3_PIN
97+
#endif
98+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
99+
#define CYCLE_START_PIN AUXINPUT4_PIN
100+
#endif
92101

93102
#if RGB_LED_ENABLE
94103
#define LED_PIN GPIO_NUM_48 // for ESP32-S3-DevKit

main/boards/mks_dlc32_2_0_map.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,16 @@
114114
#define COOLANT_MIST_PIN I2SO(7) // Beeper
115115
#endif
116116

117-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
118-
117+
#define AUXINPUT0_PIN GPIO_NUM_33 // EXP_1,8 (LCD_RS)
118+
#define AUXINPUT1_PIN GPIO_NUM_22
119119
#if !I2C_ENABLE
120-
//#define FEED_HOLD_PIN GPIO_NUM_0 // J2,3 (I2C_SDA)
121-
#define CYCLE_START_PIN GPIO_NUM_4 // J2,4 (I2C_SCL)
120+
#define AUXINPUT2_PIN GPIO_NUM_4 // Cycle start // J2,4 (I2C_SCL)
122121
#endif
123122

124-
#define AUXINPUT0_PIN GPIO_NUM_33 // EXP_1,8 (LCD_RS)
125-
#define AUXINPUT1_PIN GPIO_NUM_22
123+
// Define user-control controls (cycle start, reset, feed hold) input pins.
124+
#if (CONTROL_ENABLE & CONTROL_CYCLE_START) && defined(AUXINPUT2_PIN)
125+
#define CYCLE_START_PIN AUXINPUT2_PIN
126+
#endif
126127

127128
// Define probe switch input pin.
128129
#if PROBE_ENABLE

main/boards/mks_dlc32_max_1_0_map.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@
106106

107107
#endif // SDCARD_ENABLE
108108

109-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
110-
//#define RESET_PIN GPIO_NUM_?
111-
//#define FEED_HOLD_PIN GPIO_NUM_?
112-
113-
#define CYCLE_START_PIN GPIO_NUM_36 // Flame
114-
115109
#define AUXINPUT0_PIN GPIO_NUM_38 // Door
116110
#define AUXINPUT1_PIN GPIO_NUM_37 // Probe
111+
#define AUXINPUT2_PIN GPIO_NUM_36 // Cycle start -> Flame
112+
113+
// Define user-control controls (cycle start, reset, feed hold) input pins.
114+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
115+
#define CYCLE_START_PIN AUXINPUT2_PIN
116+
#endif
117117

118118
#if RGB_LED_ENABLE
119119
#define LED_PIN GPIO_NUM_48 // for ESP32-S3-DevKit

main/boards/mks_tinybee_1_0_map.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,18 @@
112112
#endif
113113

114114
#define AUXINPUT0_PIN GPIO_NUM_39 // TB
115+
#define AUXINPUT2_PIN GPIO_NUM_36 // Feed hold
116+
#define AUXINPUT3_PIN GPIO_NUM_34 // Cycle start
115117

116-
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
117-
#define CYCLE_START_PIN GPIO_NUM_36 // TH1
118-
#define FEED_HOLD_PIN GPIO_NUM_34 // TH2
119-
//#define RESET_PIN (use board hardware)
118+
// Define user-control controls (cycle start, reset, feed hold) input pins.
119+
120+
// Reset/EStop is connected to MCU reset pin.
121+
#if CONTROL_ENABLE & CONTROL_FEED_HOLD
122+
#define FEED_HOLD_PIN AUXINPUT2_PIN
123+
#endif
124+
#if CONTROL_ENABLE & CONTROL_CYCLE_START
125+
#define CYCLE_START_PIN AUXINPUT3_PIN
126+
#endif
120127

121128
// Define probe switch input pin.
122129
#if PROBE_ENABLE && defined(AUXINPUT1_PIN)

main/boards/pibot_i2s_6_axis_map.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,24 +119,14 @@
119119
#endif
120120
#endif
121121

122+
#define AUXINPUT0_PIN GPIO_NUM_2
122123

123124
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
124125
#undef CONTROL_ENABLE
125126
#define CONTROL_ENABLE 0 // No control inputs
126127

127-
//#define RESET_PIN GPIO_NUM_34
128-
//#define FEED_HOLD_PIN GPIO_NUM_36
129-
//#define CYCLE_START_PIN GPIO_NUM_39
130-
131-
//#define AUXINPUT0_PIN GPIO_NUM_35
132-
//#define AUXINPUT1_PIN GPIO_NUM_32
133-
134128
#if PROBE_ENABLE
135-
#define PROBE_PIN GPIO_NUM_2
136-
#endif
137-
138-
#if SAFETY_DOOR_ENABLE
139-
#define SAFETY_DOOR_PIN AUXINPUT0_PIN
129+
#define PROBE_PIN AUXINPUT0_PIN
140130
#endif
141131

142132
#if I2C_ENABLE

0 commit comments

Comments
 (0)