Skip to content

Commit

Permalink
🎨 BTT SKR Pro pins auto-assign (#22411)
Browse files Browse the repository at this point in the history
Co-authored-by: MarkusThur <[email protected]>
  • Loading branch information
thinkyhead and MarkusThur authored Jul 21, 2021
1 parent 50ada44 commit eb3ad3e
Showing 1 changed file with 61 additions and 7 deletions.
68 changes: 61 additions & 7 deletions Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,27 +231,81 @@

//
// Temperature Sensors
// Use ADC pins without pullup for sensors that don't need a pullup.
//
#define TEMP_0_PIN PF4 // T1 <-> E0
#define TEMP_1_PIN PF5 // T2 <-> E1
#define TEMP_2_PIN PF6 // T3 <-> E2
#define TEMP_BED_PIN PF3 // T0 <-> Bed
#if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20
#define TEMP_0_PIN PF8
#else
#define TEMP_0_PIN PF4 // T1 <-> E0
#endif
#if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20
#define TEMP_1_PIN PF9
#else
#define TEMP_1_PIN PF5 // T2 <-> E1
#endif
#if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20
#define TEMP_2_PIN PF10
#else
#define TEMP_2_PIN PF6 // T3 <-> E2
#endif
#if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20
#define TEMP_BED_PIN PF7
#else
#define TEMP_BED_PIN PF3 // T0 <-> Bed
#endif

#ifdef TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN)
#if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20
#if HOTENDS == 2
#define TEMP_PROBE_PIN PF10
#elif HOTENDS < 2
#define TEMP_PROBE_PIN PF9
#endif
#else
#if HOTENDS == 2
#define TEMP_PROBE_PIN TEMP_2_PIN
#elif HOTENDS < 2
#define TEMP_PROBE_PIN TEMP_1_PIN
#endif
#endif
#endif

#if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN)
#if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20
#define TEMP_CHAMBER_PIN PF10
#else
#define TEMP_CHAMBER_PIN TEMP_2_PIN
#endif
#endif

//
// Heaters / Fans
// Heaters
//
#define HEATER_0_PIN PB1 // Heater0
#define HEATER_1_PIN PD14 // Heater1
#define HEATER_2_PIN PB0 // Heater1
#if TEMP_SENSOR_CHAMBER && HOTENDS < 3
#define HEATER_CHAMBER_PIN PB0 // Heater2
#else
#define HEATER_2_PIN PB0 // Heater2
#endif
#define HEATER_BED_PIN PD12 // Hotbed

//
// Fans
//
#define FAN_PIN PC8 // Fan0
#define FAN1_PIN PE5 // Fan1
#define FAN2_PIN PE6 // Fan2

#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN FAN1_PIN
#endif

#if ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2
#define CONTROLLER_FAN_PIN PE6 // Fan2
#else
#define FAN2_PIN PE6 // Fan2
#endif

//
// Misc. Functions
//
Expand Down

0 comments on commit eb3ad3e

Please sign in to comment.