Allow FAN_PIN override, pins cleanup (#10957)

This commit is contained in:
Scott Lahteine 2018-06-07 16:39:11 -05:00 committed by GitHub
parent 70d39ac185
commit 582845fd72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 292 additions and 221 deletions

View File

@ -132,7 +132,9 @@
#define HEATER_0_PIN 15 // C5
#define HEATER_BED_PIN 14 // C4
#define FAN_PIN 16 // C6 PWM3A
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 PWM3A
#endif
//
// Misc. Functions

View File

@ -133,7 +133,10 @@
//
#define HEATER_0_PIN 13 // (extruder)
#define HEATER_BED_PIN 12 // (bed)
#define FAN_PIN 4
#ifndef FAN_PIN
#define FAN_PIN 4
#endif
//
// Misc. Functions

View File

@ -24,22 +24,29 @@
* AZTEEG_X3_PRO (Arduino Mega) pin assignments
*/
#ifndef __AVR_ATmega2560__
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
#endif
#if HOTENDS > 5 || E_STEPPERS > 5
#error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue."
#endif
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT)
#define CASE_LIGHT_PIN 44 // Define before RAMPS pins include
#endif
#define BOARD_NAME "Azteeg X3 Pro"
#include "pins_RAMPS.h"
#ifndef __AVR_ATmega2560__
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
//
// RAMPS pins overrides
//
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT)
#define CASE_LIGHT_PIN 44
#endif
#ifndef FAN_PIN
#define FAN_PIN 6
#endif
#include "pins_RAMPS.h"
// DIGIPOT slave addresses
#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT 0x2C (0x58 <- 0x2C << 1)
#define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT 0x2E (0x5C <- 0x2E << 1)
@ -116,9 +123,6 @@
#define HEATER_6_PIN 6
#define HEATER_7_PIN 11
#undef FAN_PIN
#define FAN_PIN 6 // Part Cooling System
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
#endif

View File

@ -115,7 +115,9 @@
#define HEATER_0_PIN 32 // A4 Extruder
#define HEATER_BED_PIN 18 // E6 Bed
#define FAN_PIN 31 // A3 Fan
#ifndef FAN_PIN
#define FAN_PIN 31 // A3 Fan
#endif
//
// Misc. Functions

View File

@ -125,7 +125,9 @@
//
#define HEATER_0_PIN 27 // B7
#define HEATER_BED_PIN 26 // B6 Bed
#define FAN_PIN 16 // C6 Fan, PWM3A
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 Fan, PWM3A
#endif
//
// Misc. Functions

View File

@ -31,6 +31,7 @@
#endif
#define BOARD_NAME "Cheaptronic v2.0"
//
// Limit Switches
//
@ -84,6 +85,28 @@
#define HEATER_1_PIN 7
#define HEATER_2_PIN 8
#define HEATER_BED_PIN 9
#ifndef FAN_PIN
#define FAN_PIN 3
#endif
#define FAN2_PIN 58 // additional fan or light control output
//
// Other board specific pins
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 37 // board input labeled as F-DET
#endif
#define Z_MIN_PROBE_PIN 36 // additional external board input labeled as E-SENS (should be used for Z-probe)
#define LED_PIN 13
#define SPINDLE_ENABLE_PIN 4 // additional PWM pin 1 at JP1 connector - should be used for laser control too
#define EXT_2 5 // additional PWM pin 2 at JP1 connector
#define EXT_3 2 // additional PWM pin 3 at JP1 connector
#define PS_ON_PIN 45
#define KILL_PIN 46
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 11 // shared with TEMP_3 analog input
#endif
//
// LCD
@ -105,23 +128,3 @@
#define BTN_EN1 11
#define BTN_EN2 12
#define BTN_ENC 43
//
// Other board specific pins
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 37 // board input labeled as F-DET
#endif
#define Z_MIN_PROBE_PIN 36 // additional external board input labeled as E-SENS (should be used for Z-probe)
#define LED_PIN 13
#define SPINDLE_ENABLE_PIN 4 // additional PWM pin 1 at JP1 connector - should be used for laser control too
#define EXT_2 5 // additional PWM pin 2 at JP1 connector
#define EXT_3 2 // additional PWM pin 3 at JP1 connector
#define FAN_PIN 3
#define FAN2_PIN 58 // additional fan or light control output
#define PS_ON_PIN 45
#define KILL_PIN 46
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 11 // shared with TEMP_3 analog input
#endif

View File

@ -65,7 +65,9 @@
#define HEATER_3_PIN 46
#define HEATER_BED_PIN 2
//#define FAN_PIN 7 // common PWM pin for all tools
#ifndef FAN_PIN
//#define FAN_PIN 7 // common PWM pin for all tools
#endif
#define ORIG_E0_AUTO_FAN_PIN 7
#define ORIG_E1_AUTO_FAN_PIN 7

View File

@ -65,7 +65,9 @@
#define HEATER_3_PIN 3
#define HEATER_BED_PIN 24
#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools
#ifndef FAN_PIN
#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools
#endif
#define ORIG_E0_AUTO_FAN_PIN 7
#define ORIG_E1_AUTO_FAN_PIN 7

View File

@ -117,7 +117,9 @@
#define HEATER_0_PIN 3
#define HEATER_BED_PIN 4
#define FAN_PIN 8
#ifndef FAN_PIN
#define FAN_PIN 8
#endif
#define FAN1_PIN 6
//

View File

@ -134,7 +134,9 @@
#define HEATER_0_PIN 3
#define HEATER_BED_PIN 4
#define FAN_PIN 8
#ifndef FAN_PIN
#define FAN_PIN 8
#endif
#define FAN1_PIN 6
//

View File

@ -90,7 +90,9 @@
#define HEATER_2_PIN 17 // 12V PWM3
#define HEATER_BED_PIN 44 // DOUBLE 12V PWM
#define FAN_PIN 16 // 5V PWM
#ifndef FAN_PIN
#define FAN_PIN 16 // 5V PWM
#endif
//
// Misc. Functions

View File

@ -98,4 +98,3 @@
#define PS_ON_PIN 14 // Alex, does this work on the card?
// Alex extras from Gen3+

View File

@ -112,7 +112,7 @@
#define HEATER_0_PIN 4
#define HEATER_BED_PIN 3
#if GEN7_VERSION < 13 // Gen7 v1.3 removed the fan pin
#if !defined(FAN_PIN) && GEN7_VERSION < 13 // Gen7 v1.3 removed the fan pin
#define FAN_PIN 31
#endif

View File

@ -81,7 +81,9 @@
#define HEATER_0_PIN 2
#define HEATER_1_PIN 3
#define HEATER_BED_PIN 4
#define FAN_PIN 7
#ifndef FAN_PIN
#define FAN_PIN 7
#endif
//
// Misc. Functions

View File

@ -112,7 +112,9 @@
#define HEATER_1_PIN 34
#define HEATER_BED_PIN 28
#define FAN_PIN 39
#ifndef FAN_PIN
#define FAN_PIN 39
#endif
#define FAN1_PIN 35
#define FAN2_PIN 36

View File

@ -87,7 +87,9 @@
#define HEATER_1_PIN 8
#define HEATER_BED_PIN 10
#define FAN_PIN 7 // IO pin. Buffer needed
#ifndef FAN_PIN
#define FAN_PIN 7 // IO pin. Buffer needed
#endif
//
// Misc. Functions

View File

@ -101,7 +101,9 @@
#define HEATER_1_PIN 8
#define HEATER_BED_PIN 10
#define FAN_PIN 7
#ifndef FAN_PIN
#define FAN_PIN 7
#endif
#define FAN1_PIN 6
//

View File

@ -118,7 +118,9 @@
#define HEATER_2_PIN 8
#define HEATER_BED_PIN 10
#define FAN_PIN 6
#ifndef FAN_PIN
#define FAN_PIN 6
#endif
#define FAN1_PIN 7
//

View File

@ -172,23 +172,24 @@
#define HEATER_0_PIN MOSFET_A_PIN
#if ENABLED(IS_EFB) // Hotend, Fan, Bed
#define FAN_PIN MOSFET_B_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_EEF) // Hotend, Hotend, Fan
#define HEATER_1_PIN MOSFET_B_PIN
#define FAN_PIN MOSFET_C_PIN
#elif ENABLED(IS_EEB) // Hotend, Hotend, Bed
#define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#elif ENABLED(IS_EFF) // Hotend, Fan, Fan
#define FAN_PIN MOSFET_B_PIN
#define FAN1_PIN MOSFET_C_PIN
#elif ENABLED(IS_SF) // Spindle, Fan
#define FAN_PIN MOSFET_C_PIN
#endif
#ifndef FAN_PIN
#if ENABLED(IS_EFB) || ENABLED(IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN MOSFET_B_PIN
#elif ENABLED(IS_EEF) || ENABLED(IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN MOSFET_C_PIN
#else
#define FAN_PIN MOSFET_D_PIN
#endif
#endif
//
@ -272,8 +273,6 @@
#define SPINDLE_DIR_PIN 67 // K5
// Check if all pins are defined in mega/pins_arduino.h
#include <Arduino.h>
static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h"

View File

@ -106,7 +106,9 @@
#endif
#define HEATER_BED_PIN 4
#define FAN_PIN 8
#ifndef FAN_PIN
#define FAN_PIN 8
#endif
#define FAN1_PIN 6
//

View File

@ -87,7 +87,9 @@
#define HEATER_1_PIN 8 // EXTRUDER 2
#define HEATER_BED_PIN 3 // BED
#define FAN_PIN 9
#ifndef FAN_PIN
#define FAN_PIN 9
#endif
//
// Misc. Functions

View File

@ -33,7 +33,7 @@
#error "MKS GEN 1.3/1.4 supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_NAME "MKS GEN > v1.3"
#define BOARD_NAME "MKS GEN >= v1.3"
//
// Heaters / Fans

View File

@ -129,7 +129,9 @@
#define HEATER_0_PIN 3 // DONE PWM on RIGHT connector
#define HEATER_BED_PIN 4
#define FAN_PIN 14 // PWM on MIDDLE connector
#ifndef FAN_PIN
#define FAN_PIN 14 // PWM on MIDDLE connector
#endif
//
// Misc. Functions

View File

@ -125,7 +125,9 @@
//
#define HEATER_0_PIN 4
#define FAN_PIN 3
#ifndef FAN_PIN
#define FAN_PIN 3
#endif
//
// Misc. Functions

View File

@ -110,8 +110,9 @@
#define HEATER_2_PIN 45 // F7
#define HEATER_BED_PIN 14 // C4 PWM3C
#define FAN_PIN 16 // C6 PWM3A
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 PWM3A
#endif
//
// Misc. Functions

View File

@ -190,7 +190,9 @@
#endif
#endif
#define FAN_PIN 16 // C6 PWM3A
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 PWM3A
#endif
//
// LCD / Controller

View File

@ -127,7 +127,9 @@
#define HEATER_2_PIN 6
#define HEATER_BED_PIN 3
#define FAN_PIN 8
#ifndef FAN_PIN
#define FAN_PIN 8
#endif
#define FAN1_PIN 6
#define FAN2_PIN 2

View File

@ -238,21 +238,15 @@
#define HEATER_0_PIN RAMPS_D10_PIN
#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
#define FAN_PIN RAMPS_D9_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
#define HEATER_1_PIN RAMPS_D9_PIN
#define FAN_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
#define HEATER_1_PIN RAMPS_D9_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
#define FAN_PIN RAMPS_D9_PIN
#define FAN1_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_SF) // Spindle, Fan
#define FAN_PIN RAMPS_D8_PIN
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN RAMPS_D9_PIN
#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#define HEATER_BED_PIN RAMPS_D8_PIN
#if HOTENDS == 1
#define FAN1_PIN MOSFET_D_PIN
@ -262,7 +256,15 @@
#endif
#ifndef FAN_PIN
#if ENABLED(IS_RAMPS_EFB) || ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN RAMPS_D9_PIN
#elif ENABLED(IS_RAMPS_EEF) || ENABLED(IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
#define FAN_PIN 4 // IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN RAMPS_D9_PIN
#endif
#endif
//

View File

@ -88,11 +88,15 @@
#if ENABLED(RAMPS_V_1_0)
#define HEATER_0_PIN 12
#define HEATER_BED_PIN -1
#ifndef FAN_PIN
#define FAN_PIN 11
#endif
#else // RAMPS_V_1_1 or RAMPS_V_1_2
#define HEATER_0_PIN 10
#define HEATER_BED_PIN 8
#ifndef FAN_PIN
#define FAN_PIN 9
#endif
#endif
//

View File

@ -85,8 +85,9 @@
#undef HEATER_BED_PIN
#define HEATER_BED_PIN 10
#undef FAN_PIN
#define FAN_PIN 8 // Same as RAMPS_13_EEF
#ifndef FAN_PIN
#define FAN_PIN 8 // Same as RAMPS_13_EEF
#endif
//
// Misc. Functions

View File

@ -124,7 +124,9 @@
#define HEATER_3_PIN 8
#define HEATER_BED_PIN 9
#define FAN_PIN 7
#ifndef FAN_PIN
#define FAN_PIN 7
#endif
#define FAN1_PIN 8
//

View File

@ -100,7 +100,7 @@
#define Z_ENABLE_PIN 26
#define E0_ENABLE_PIN 14
#if ENABLED(LCD_I2C_PANELOLU2)
#if !defined(FAN_PIN) && ENABLED(LCD_I2C_PANELOLU2)
#define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif
@ -114,7 +114,7 @@
#endif
#if MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI)
#if !defined(FAN_PIN) && (MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI))
#define FAN_PIN 4 // Works for Panelolu2 too
#endif

View File

@ -114,7 +114,9 @@
#define HEATER_0_PIN 15 // C5 PWM3B - Extruder
#define HEATER_BED_PIN 14 // C4 PWM3C - Bed
#define FAN_PIN 16 // C6 PWM3A
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 PWM3A
#endif
//
// Misc. Functions

View File

@ -106,7 +106,9 @@
#define HEATER_1_PIN 7
#define HEATER_BED_PIN 3
#define FAN_PIN 8
#ifndef FAN_PIN
#define FAN_PIN 8
#endif
#define FAN1_PIN 6
#define FAN2_PIN 2

View File

@ -98,12 +98,13 @@
#define HEATER_0_PIN 4
#define HEATER_BED_PIN 3
#if GEN7_VERSION >= 13
#ifndef FAN_PIN
#if GEN7_VERSION >= 13
// Gen7 v1.3 removed the fan pin
#define FAN_PIN -1
#else
#else
#define FAN_PIN 31
#endif
#endif
//

View File

@ -56,7 +56,9 @@
#define FIL_RUNOUT_PIN 34 // X_MAX unless overridden
#endif
#define FAN_PIN 5
#ifndef FAN_PIN
#define FAN_PIN 5
#endif
#define HEATER_0_PIN 7

View File

@ -149,7 +149,9 @@
//
#define HEATER_0_PIN 15 // C5 PWM3B Extruder
#define HEATER_BED_PIN 14 // C4 PWM3C
#define FAN_PIN 16 // C6 PWM3A Fan
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 PWM3A Fan
#endif
//
// Misc. Functions

View File

@ -127,7 +127,9 @@
#define HEATER_0_PIN 15 // C5 PWM3B - Extruder
#define HEATER_BED_PIN 14 // C4 PWM3C
#define FAN_PIN 16 // C6 PWM3A
#ifndef FAN_PIN
#define FAN_PIN 16 // C6 PWM3A
#endif
//
// Misc. Functions

View File

@ -93,7 +93,9 @@
#define HEATER_1_PIN 3
#define HEATER_BED_PIN 4
#define FAN_PIN 7
#ifndef FAN_PIN
#define FAN_PIN 7
#endif
//
// Misc. Functions

View File

@ -99,7 +99,9 @@
#define HEATER_1_PIN 3
#define HEATER_BED_PIN 4
#define FAN_PIN 7
#ifndef FAN_PIN
#define FAN_PIN 7
#endif
//
// Misc. Functions