Predefine auto fan pins in some pins files

2.0.x
Scott Lahteine 8 years ago
parent d439fb95f7
commit 95275eb9b3

@ -282,6 +282,22 @@
// Marlin needs to account for pins that equal -1 // Marlin needs to account for pins that equal -1
#define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p)) #define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p))
//
// Assign auto fan pins if needed
//
#if !defined(E0_AUTO_FAN_PIN) && defined(ORIG_E0_AUTO_FAN_PIN)
#define E0_AUTO_FAN_PIN ORIG_E0_AUTO_FAN_PIN
#endif
#if !defined(E1_AUTO_FAN_PIN) && defined(ORIG_E1_AUTO_FAN_PIN)
#define E1_AUTO_FAN_PIN ORIG_E1_AUTO_FAN_PIN
#endif
#if !defined(E2_AUTO_FAN_PIN) && defined(ORIG_E2_AUTO_FAN_PIN)
#define E2_AUTO_FAN_PIN ORIG_E2_AUTO_FAN_PIN
#endif
#if !defined(E3_AUTO_FAN_PIN) && defined(ORIG_E3_AUTO_FAN_PIN)
#define E3_AUTO_FAN_PIN ORIG_E3_AUTO_FAN_PIN
#endif
// List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those! // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN, #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
#define _E1_PINS #define _E1_PINS

@ -106,10 +106,10 @@
#define CONTROLLERFAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable) #define CONTROLLERFAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
// Fans/Water Pump to cool the hotend cool side. // Fans/Water Pump to cool the hotend cool side.
#define E0_AUTO_FAN_PIN 5 #define ORIG_E0_AUTO_FAN_PIN 5
#define E1_AUTO_FAN_PIN 5 #define ORIG_E1_AUTO_FAN_PIN 5
#define E2_AUTO_FAN_PIN 5 #define ORIG_E2_AUTO_FAN_PIN 5
#define E3_AUTO_FAN_PIN 5 #define ORIG_E3_AUTO_FAN_PIN 5
// //
// LCD / Controller // LCD / Controller

@ -38,6 +38,14 @@
#define RAMPS_D10_PIN 9 #define RAMPS_D10_PIN 9
#define MOSFET_D_PIN 7 #define MOSFET_D_PIN 7
//
// Auto fans
//
#define ORIG_E0_AUTO_FAN_PIN 11
#define ORIG_E1_AUTO_FAN_PIN 6
#define ORIG_E2_AUTO_FAN_PIN 6
#define ORIG_E3_AUTO_FAN_PIN 6
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
// //

@ -69,6 +69,11 @@
//#define FAN_PIN 7 // common PWM pin for all tools //#define FAN_PIN 7 // common PWM pin for all tools
#define ORIG_E0_AUTO_FAN_PIN 7
#define ORIG_E1_AUTO_FAN_PIN 7
#define ORIG_E2_AUTO_FAN_PIN 7
#define ORIG_E3_AUTO_FAN_PIN 7
// //
// Misc. Functions // Misc. Functions
// //

@ -69,6 +69,11 @@
#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools #define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools
#define ORIG_E0_AUTO_FAN_PIN 7
#define ORIG_E1_AUTO_FAN_PIN 7
#define ORIG_E2_AUTO_FAN_PIN 7
#define ORIG_E3_AUTO_FAN_PIN 7
// //
// Misc. Functions // Misc. Functions
// //

Loading…
Cancel
Save