Browse Source

🎨 BTT SKR Pro pins auto-assign (#22411)

Co-authored-by: MarkusThur <83773817+MarkusThur@users.noreply.github.com>
Scott Lahteine 3 years ago
parent
commit
eb3ad3e4fe
No account linked to committer's email address
1 changed files with 61 additions and 7 deletions
  1. 61
    7
      Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h

+ 61
- 7
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h View File

@@ -231,27 +231,81 @@
231 231
 
232 232
 //
233 233
 // Temperature Sensors
234
+// Use ADC pins without pullup for sensors that don't need a pullup.
234 235
 //
235
-#define TEMP_0_PIN                          PF4   // T1 <-> E0
236
-#define TEMP_1_PIN                          PF5   // T2 <-> E1
237
-#define TEMP_2_PIN                          PF6   // T3 <-> E2
238
-#define TEMP_BED_PIN                        PF3   // T0 <-> Bed
236
+#if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20
237
+  #define TEMP_0_PIN                        PF8
238
+#else
239
+  #define TEMP_0_PIN                        PF4   // T1 <-> E0
240
+#endif
241
+#if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20
242
+  #define TEMP_1_PIN                        PF9
243
+#else
244
+  #define TEMP_1_PIN                        PF5   // T2 <-> E1
245
+#endif
246
+#if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20
247
+  #define TEMP_2_PIN                        PF10
248
+#else
249
+  #define TEMP_2_PIN                        PF6   // T3 <-> E2
250
+#endif
251
+#if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20
252
+  #define TEMP_BED_PIN                      PF7
253
+#else
254
+  #define TEMP_BED_PIN                      PF3   // T0 <-> Bed
255
+#endif
256
+
257
+#ifdef TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN)
258
+  #if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20
259
+    #if HOTENDS == 2
260
+      #define TEMP_PROBE_PIN                PF10
261
+    #elif HOTENDS < 2
262
+      #define TEMP_PROBE_PIN                PF9
263
+    #endif
264
+  #else
265
+    #if HOTENDS == 2
266
+      #define TEMP_PROBE_PIN          TEMP_2_PIN
267
+    #elif HOTENDS < 2
268
+      #define TEMP_PROBE_PIN          TEMP_1_PIN
269
+    #endif
270
+  #endif
271
+#endif
272
+
273
+#if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN)
274
+  #if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20
275
+    #define TEMP_CHAMBER_PIN                PF10
276
+  #else
277
+    #define TEMP_CHAMBER_PIN          TEMP_2_PIN
278
+  #endif
279
+#endif
239 280
 
240 281
 //
241
-// Heaters / Fans
282
+// Heaters
242 283
 //
243 284
 #define HEATER_0_PIN                        PB1   // Heater0
244 285
 #define HEATER_1_PIN                        PD14  // Heater1
245
-#define HEATER_2_PIN                        PB0   // Heater1
286
+#if TEMP_SENSOR_CHAMBER && HOTENDS < 3
287
+  #define HEATER_CHAMBER_PIN                PB0   // Heater2
288
+#else
289
+  #define HEATER_2_PIN                      PB0   // Heater2
290
+#endif
246 291
 #define HEATER_BED_PIN                      PD12  // Hotbed
292
+
293
+//
294
+// Fans
295
+//
247 296
 #define FAN_PIN                             PC8   // Fan0
248 297
 #define FAN1_PIN                            PE5   // Fan1
249
-#define FAN2_PIN                            PE6   // Fan2
250 298
 
251 299
 #ifndef E0_AUTO_FAN_PIN
252 300
   #define E0_AUTO_FAN_PIN               FAN1_PIN
253 301
 #endif
254 302
 
303
+#if ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2
304
+  #define CONTROLLER_FAN_PIN                PE6   // Fan2
305
+#else
306
+  #define FAN2_PIN                          PE6   // Fan2
307
+#endif
308
+
255 309
 //
256 310
 // Misc. Functions
257 311
 //

Loading…
Cancel
Save