Predefine auto fan pins in some pins files

This commit is contained in:
Scott Lahteine 2016-10-22 18:25:59 -05:00
parent d439fb95f7
commit 95275eb9b3
5 changed files with 38 additions and 4 deletions

View file

@ -282,6 +282,22 @@
// Marlin needs to account for pins that equal -1
#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!
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
#define _E1_PINS

View file

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

View file

@ -38,6 +38,14 @@
#define RAMPS_D10_PIN 9
#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"
//

View file

@ -69,6 +69,11 @@
//#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
//

View file

@ -69,6 +69,11 @@
#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
//