2016-03-25 06:19:46 +00:00
|
|
|
/**
|
2016-03-24 18:01:20 +00:00
|
|
|
* Marlin 3D Printer Firmware
|
|
|
|
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
|
|
|
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
2015-01-26 02:40:00 +00:00
|
|
|
*/
|
2015-01-26 02:50:09 +00:00
|
|
|
|
2011-12-12 18:34:37 +00:00
|
|
|
#ifndef PINS_H
|
|
|
|
#define PINS_H
|
|
|
|
|
2014-12-18 20:02:36 +00:00
|
|
|
#if MB(GEN7_CUSTOM)
|
2015-01-26 02:40:00 +00:00
|
|
|
#include "pins_GEN7_CUSTOM.h"
|
|
|
|
#elif MB(GEN7_12)
|
|
|
|
#include "pins_GEN7_12.h"
|
|
|
|
#elif MB(GEN7_13)
|
|
|
|
#include "pins_GEN7_13.h"
|
|
|
|
#elif MB(GEN7_14)
|
|
|
|
#include "pins_GEN7_14.h"
|
2016-07-04 15:32:52 +00:00
|
|
|
#elif MB(CNCONTROLS_11)
|
|
|
|
#include "pins_CNCONTROLS_11.h"
|
2016-06-16 04:38:52 +00:00
|
|
|
#elif MB(CNCONTROLS_12)
|
|
|
|
#include "pins_CNCONTROLS_12.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(CHEAPTRONIC)
|
|
|
|
#include "pins_CHEAPTRONIC.h"
|
|
|
|
#elif MB(SETHI)
|
|
|
|
#include "pins_SETHI.h"
|
|
|
|
#elif MB(RAMPS_OLD)
|
|
|
|
#include "pins_RAMPS_OLD.h"
|
2015-06-15 06:17:00 +00:00
|
|
|
#elif MB(RAMPS_13_EFB)
|
2015-06-15 23:56:16 +00:00
|
|
|
#include "pins_RAMPS_13_EFB.h"
|
2015-06-15 06:17:00 +00:00
|
|
|
#elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
|
2015-01-26 02:40:00 +00:00
|
|
|
#include "pins_RAMPS_13.h"
|
2015-10-31 01:05:09 +00:00
|
|
|
#elif MB(RAMPS_14_EFB)
|
2016-02-29 07:10:15 +00:00
|
|
|
#include "pins_RAMPS_14_EFB.h"
|
2015-10-31 01:05:09 +00:00
|
|
|
#elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF)
|
2016-02-29 07:10:15 +00:00
|
|
|
#include "pins_RAMPS_14.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(GEN6)
|
|
|
|
#include "pins_GEN6.h"
|
|
|
|
#elif MB(GEN6_DELUXE)
|
|
|
|
#include "pins_GEN6_DELUXE.h"
|
|
|
|
#elif MB(SANGUINOLOLU_11)
|
|
|
|
#include "pins_SANGUINOLOLU_11.h"
|
|
|
|
#elif MB(SANGUINOLOLU_12)
|
|
|
|
#include "pins_SANGUINOLOLU_12.h"
|
|
|
|
#elif MB(MELZI)
|
|
|
|
#include "pins_MELZI.h"
|
|
|
|
#elif MB(STB_11)
|
|
|
|
#include "pins_STB_11.h"
|
|
|
|
#elif MB(AZTEEG_X1)
|
|
|
|
#include "pins_AZTEEG_X1.h"
|
2015-06-16 21:00:43 +00:00
|
|
|
#elif MB(MELZI_MAKR3D)
|
|
|
|
#include "pins_MELZI_MAKR3D.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(AZTEEG_X3)
|
|
|
|
#include "pins_AZTEEG_X3.h"
|
|
|
|
#elif MB(AZTEEG_X3_PRO)
|
|
|
|
#include "pins_AZTEEG_X3_PRO.h"
|
|
|
|
#elif MB(ULTIMAKER)
|
|
|
|
#include "pins_ULTIMAKER.h"
|
|
|
|
#elif MB(ULTIMAKER_OLD)
|
|
|
|
#include "pins_ULTIMAKER_OLD.h"
|
|
|
|
#elif MB(ULTIMAIN_2)
|
|
|
|
#include "pins_ULTIMAIN_2.h"
|
|
|
|
#elif MB(3DRAG)
|
|
|
|
#include "pins_3DRAG.h"
|
|
|
|
#elif MB(K8200)
|
|
|
|
#include "pins_K8200.h"
|
2016-07-02 13:32:21 +00:00
|
|
|
#elif MB(K8400)
|
|
|
|
#include "pins_K8400.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(TEENSYLU)
|
|
|
|
#include "pins_TEENSYLU.h"
|
|
|
|
#elif MB(RUMBA)
|
|
|
|
#include "pins_RUMBA.h"
|
|
|
|
#elif MB(PRINTRBOARD)
|
|
|
|
#include "pins_PRINTRBOARD.h"
|
2016-03-10 22:33:53 +00:00
|
|
|
#elif MB(PRINTRBOARD_REVF)
|
|
|
|
#include "pins_PRINTRBOARD_REVF.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(BRAINWAVE)
|
|
|
|
#include "pins_BRAINWAVE.h"
|
2015-04-10 05:11:50 +00:00
|
|
|
#elif MB(BRAINWAVE_PRO)
|
|
|
|
#include "pins_BRAINWAVE_PRO.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(SAV_MKI)
|
|
|
|
#include "pins_SAV_MKI.h"
|
|
|
|
#elif MB(TEENSY2)
|
|
|
|
#include "pins_TEENSY2.h"
|
|
|
|
#elif MB(GEN3_PLUS)
|
|
|
|
#include "pins_GEN3_PLUS.h"
|
|
|
|
#elif MB(GEN3_MONOLITHIC)
|
|
|
|
#include "pins_GEN3_MONOLITHIC.h"
|
|
|
|
#elif MB(MEGATRONICS)
|
|
|
|
#include "pins_MEGATRONICS.h"
|
2015-04-01 03:18:00 +00:00
|
|
|
#elif MB(MINITRONICS)
|
|
|
|
#include "pins_MINITRONICS.h"
|
2015-01-27 23:54:46 +00:00
|
|
|
#elif MB(MEGATRONICS_2)
|
|
|
|
#include "pins_MEGATRONICS_2.h"
|
|
|
|
#elif MB(MEGATRONICS_3)
|
|
|
|
#include "pins_MEGATRONICS_3.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(OMCA_A)
|
|
|
|
#include "pins_OMCA_A.h"
|
|
|
|
#elif MB(OMCA)
|
|
|
|
#include "pins_OMCA.h"
|
|
|
|
#elif MB(RAMBO)
|
|
|
|
#include "pins_RAMBO.h"
|
2015-06-02 14:04:29 +00:00
|
|
|
#elif MB(MINIRAMBO)
|
|
|
|
#include "pins_MINIRAMBO.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(ELEFU_3)
|
|
|
|
#include "pins_ELEFU_3.h"
|
|
|
|
#elif MB(5DPRINT)
|
|
|
|
#include "pins_5DPRINT.h"
|
|
|
|
#elif MB(LEAPFROG)
|
|
|
|
#include "pins_LEAPFROG.h"
|
2015-02-20 01:26:22 +00:00
|
|
|
#elif MB(BAM_DICE)
|
2016-02-29 07:10:15 +00:00
|
|
|
#include "pins_RAMPS_14.h"
|
2015-02-20 01:26:22 +00:00
|
|
|
#elif MB(BAM_DICE_DUE)
|
|
|
|
#include "pins_BAM_DICE_DUE.h"
|
2015-03-01 09:16:55 +00:00
|
|
|
#elif MB(FELIX2)
|
|
|
|
#include "pins_FELIX2.h"
|
2015-06-15 15:01:25 +00:00
|
|
|
#elif MB(MKS_BASE)
|
|
|
|
#include "pins_MKS_BASE.h"
|
2015-07-08 22:30:33 +00:00
|
|
|
#elif MB(RIGIDBOARD)
|
|
|
|
#include "pins_RIGIDBOARD.h"
|
2016-06-27 19:35:20 +00:00
|
|
|
#elif MB(RIGIDBOARD_V2)
|
|
|
|
#include "pins_RIGIDBOARD_V2.h"
|
2015-07-22 09:35:02 +00:00
|
|
|
#elif MB(MEGACONTROLLER)
|
|
|
|
#include "pins_MEGACONTROLLER.h"
|
2016-02-27 19:17:07 +00:00
|
|
|
#elif MB(BQ_ZUM_MEGA_3D)
|
|
|
|
#include "pins_BQ_ZUM_MEGA_3D.h"
|
2015-01-26 02:40:00 +00:00
|
|
|
#elif MB(99)
|
|
|
|
#include "pins_99.h"
|
2016-03-01 22:13:44 +00:00
|
|
|
#elif MB(AJ4P)
|
|
|
|
#include "pins_AJ4P.h"
|
2016-04-01 23:33:02 +00:00
|
|
|
#elif MB(MKS_13)
|
|
|
|
#include "pins_MKS_13.h"
|
2016-04-02 08:28:58 +00:00
|
|
|
#elif MB(SAINSMART_2IN1)
|
2016-04-01 23:33:02 +00:00
|
|
|
#include "pins_SAINSMART_2IN1.h"
|
2011-12-12 18:34:37 +00:00
|
|
|
#else
|
2016-05-13 12:10:23 +00:00
|
|
|
#error "Unknown MOTHERBOARD value set in Configuration.h"
|
2011-12-12 18:34:37 +00:00
|
|
|
#endif
|
|
|
|
|
2016-05-08 01:41:20 +00:00
|
|
|
// Define certain undefined pins
|
|
|
|
#ifndef X_MS1_PIN
|
|
|
|
#define X_MS1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef X_MS2_PIN
|
|
|
|
#define X_MS2_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef Y_MS1_PIN
|
|
|
|
#define Y_MS1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef Y_MS2_PIN
|
|
|
|
#define Y_MS2_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef Z_MS1_PIN
|
|
|
|
#define Z_MS1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef Z_MS2_PIN
|
|
|
|
#define Z_MS2_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef E0_MS1_PIN
|
|
|
|
#define E0_MS1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef E0_MS2_PIN
|
|
|
|
#define E0_MS2_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef E1_MS1_PIN
|
|
|
|
#define E1_MS1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef E1_MS2_PIN
|
|
|
|
#define E1_MS2_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FAN_PIN
|
|
|
|
#define FAN_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef FAN1_PIN
|
|
|
|
#define FAN1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef FAN2_PIN
|
|
|
|
#define FAN2_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HEATER_0_PIN
|
|
|
|
#define HEATER_0_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef HEATER_1_PIN
|
|
|
|
#define HEATER_1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef HEATER_2_PIN
|
|
|
|
#define HEATER_2_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef HEATER_3_PIN
|
|
|
|
#define HEATER_3_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef HEATER_BED_PIN
|
|
|
|
#define HEATER_BED_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TEMP_0_PIN
|
|
|
|
#define TEMP_0_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef TEMP_1_PIN
|
|
|
|
#define TEMP_1_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef TEMP_2_PIN
|
|
|
|
#define TEMP_2_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef TEMP_3_PIN
|
|
|
|
#define TEMP_3_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef TEMP_BED_PIN
|
|
|
|
#define TEMP_BED_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SD_DETECT_PIN
|
|
|
|
#define SD_DETECT_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef SDPOWER
|
|
|
|
#define SDPOWER -1
|
|
|
|
#endif
|
|
|
|
#ifndef SDSS
|
|
|
|
#define SDSS -1
|
|
|
|
#endif
|
|
|
|
#ifndef LED_PIN
|
|
|
|
#define LED_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef PS_ON_PIN
|
|
|
|
#define PS_ON_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef KILL_PIN
|
|
|
|
#define KILL_PIN -1
|
|
|
|
#endif
|
|
|
|
#ifndef SUICIDE_PIN
|
|
|
|
#define SUICIDE_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Marlin needs to account for pins that equal -1
|
|
|
|
#define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : (p) + 0xA0)
|
|
|
|
|
2015-01-26 03:43:43 +00:00
|
|
|
// List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
|
2016-05-27 00:43:20 +00:00
|
|
|
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
|
2015-01-27 23:19:03 +00:00
|
|
|
#define _E1_PINS
|
|
|
|
#define _E2_PINS
|
|
|
|
#define _E3_PINS
|
|
|
|
|
2012-02-29 14:49:02 +00:00
|
|
|
#if EXTRUDERS > 1
|
2015-03-28 03:29:05 +00:00
|
|
|
#undef _E1_PINS
|
2016-05-27 00:43:20 +00:00
|
|
|
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN,
|
2015-01-26 13:17:08 +00:00
|
|
|
#if EXTRUDERS > 2
|
2015-03-28 03:29:05 +00:00
|
|
|
#undef _E2_PINS
|
2016-05-27 00:43:20 +00:00
|
|
|
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN,
|
2015-01-26 13:17:08 +00:00
|
|
|
#if EXTRUDERS > 3
|
2015-03-28 03:29:05 +00:00
|
|
|
#undef _E3_PINS
|
2016-05-27 00:43:20 +00:00
|
|
|
#define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN,
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define _H0_PINS HEATER_0_PIN, EXTRUDER_0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN),
|
|
|
|
#define _H1_PINS
|
|
|
|
#define _H2_PINS
|
|
|
|
#define _H3_PINS
|
|
|
|
|
|
|
|
#if HOTENDS > 1
|
|
|
|
#undef _H1_PINS
|
|
|
|
#define _H1_PINS HEATER_1_PIN, EXTRUDER_1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN),
|
|
|
|
#if HOTENDS > 2
|
|
|
|
#undef _H2_PINS
|
|
|
|
#define _H2_PINS HEATER_2_PIN, EXTRUDER_2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN),
|
|
|
|
#if HOTENDS > 3
|
|
|
|
#undef _H3_PINS
|
|
|
|
#define _H3_PINS HEATER_3_PIN, EXTRUDER_3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
|
2015-01-26 13:17:08 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2016-06-28 22:06:56 +00:00
|
|
|
#elif ENABLED(MIXING_EXTRUDER)
|
|
|
|
#undef _E1_PINS
|
|
|
|
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN,
|
|
|
|
#if MIXING_STEPPERS > 2
|
|
|
|
#undef _E2_PINS
|
|
|
|
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN,
|
|
|
|
#if MIXING_STEPPERS > 3
|
|
|
|
#undef _E3_PINS
|
|
|
|
#define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN,
|
|
|
|
#endif
|
|
|
|
#endif
|
2011-12-12 18:34:37 +00:00
|
|
|
#endif
|
2012-02-29 14:49:02 +00:00
|
|
|
|
2016-05-08 01:41:20 +00:00
|
|
|
#define BED_PINS HEATER_BED_PIN, marlinAnalogInputToDigitalPin(TEMP_BED_PIN),
|
|
|
|
|
|
|
|
//
|
|
|
|
// Assign endstop pins for boards with only 3 connectors
|
|
|
|
//
|
2012-12-16 20:08:55 +00:00
|
|
|
#ifdef X_STOP_PIN
|
|
|
|
#if X_HOME_DIR < 0
|
|
|
|
#define X_MIN_PIN X_STOP_PIN
|
|
|
|
#define X_MAX_PIN -1
|
|
|
|
#else
|
|
|
|
#define X_MIN_PIN -1
|
|
|
|
#define X_MAX_PIN X_STOP_PIN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef Y_STOP_PIN
|
|
|
|
#if Y_HOME_DIR < 0
|
|
|
|
#define Y_MIN_PIN Y_STOP_PIN
|
|
|
|
#define Y_MAX_PIN -1
|
|
|
|
#else
|
|
|
|
#define Y_MIN_PIN -1
|
|
|
|
#define Y_MAX_PIN Y_STOP_PIN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef Z_STOP_PIN
|
|
|
|
#if Z_HOME_DIR < 0
|
|
|
|
#define Z_MIN_PIN Z_STOP_PIN
|
|
|
|
#define Z_MAX_PIN -1
|
|
|
|
#else
|
|
|
|
#define Z_MIN_PIN -1
|
|
|
|
#define Z_MAX_PIN Z_STOP_PIN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2016-05-08 01:41:20 +00:00
|
|
|
//
|
|
|
|
// Disable unused endstop / probe pins
|
|
|
|
//
|
2015-08-10 08:35:39 +00:00
|
|
|
#if ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) || DISABLED(Z_MIN_PROBE_ENDSTOP) // Allow code to compile regardless of Z_MIN_PROBE_ENDSTOP setting.
|
|
|
|
#undef Z_MIN_PROBE_PIN
|
|
|
|
#define Z_MIN_PROBE_PIN -1
|
2015-03-28 09:31:51 +00:00
|
|
|
#endif
|
|
|
|
|
2016-03-02 10:00:34 +00:00
|
|
|
#if DISABLED(USE_XMAX_PLUG)
|
2015-03-24 17:06:44 +00:00
|
|
|
#undef X_MAX_PIN
|
|
|
|
#define X_MAX_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2016-03-02 10:00:34 +00:00
|
|
|
#if DISABLED(USE_YMAX_PLUG)
|
2016-03-23 11:48:06 +00:00
|
|
|
#undef Y_MAX_PIN
|
2015-03-24 17:06:44 +00:00
|
|
|
#define Y_MAX_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2016-03-02 10:00:34 +00:00
|
|
|
#if DISABLED(USE_ZMAX_PLUG)
|
2015-03-24 17:06:44 +00:00
|
|
|
#undef Z_MAX_PIN
|
|
|
|
#define Z_MAX_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2016-03-02 10:00:34 +00:00
|
|
|
#if DISABLED(USE_XMIN_PLUG)
|
|
|
|
#undef X_MIN_PIN
|
|
|
|
#define X_MIN_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if DISABLED(USE_YMIN_PLUG)
|
|
|
|
#undef Y_MIN_PIN
|
|
|
|
#define Y_MIN_PIN -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if DISABLED(USE_ZMIN_PLUG)
|
2015-10-03 06:08:58 +00:00
|
|
|
#undef Z_MIN_PIN
|
2015-03-24 17:06:44 +00:00
|
|
|
#define Z_MIN_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2016-02-10 04:04:07 +00:00
|
|
|
//
|
2016-05-17 21:56:49 +00:00
|
|
|
// Dual X-carriage, Dual Y, Dual Z support
|
2016-02-10 04:04:07 +00:00
|
|
|
//
|
|
|
|
|
2016-05-17 21:56:49 +00:00
|
|
|
#define _X2_PINS
|
|
|
|
#define _Y2_PINS
|
|
|
|
#define _Z2_PINS
|
|
|
|
|
2016-02-10 04:04:07 +00:00
|
|
|
#define __EPIN(p,q) E##p##_##q##_PIN
|
|
|
|
#define _EPIN(p,q) __EPIN(p,q)
|
|
|
|
|
2016-07-11 17:19:07 +00:00
|
|
|
// The X2 axis, if any, should be the next open extruder port
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
|
2016-05-17 21:56:49 +00:00
|
|
|
#ifndef X2_STEP_PIN
|
2016-06-28 22:06:56 +00:00
|
|
|
#define X2_STEP_PIN _EPIN(E_STEPPERS, STEP)
|
|
|
|
#define X2_DIR_PIN _EPIN(E_STEPPERS, DIR)
|
|
|
|
#define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
|
2016-05-17 21:56:49 +00:00
|
|
|
#endif
|
|
|
|
#undef _X2_PINS
|
|
|
|
#define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
|
2016-06-28 22:06:56 +00:00
|
|
|
#define Y2_E_INDEX INCREMENT(E_STEPPERS)
|
2016-05-17 21:56:49 +00:00
|
|
|
#else
|
2016-06-28 22:06:56 +00:00
|
|
|
#define Y2_E_INDEX E_STEPPERS
|
2016-05-17 21:56:49 +00:00
|
|
|
#endif
|
|
|
|
|
2016-02-10 04:04:07 +00:00
|
|
|
// The Y2 axis, if any, should be the next open extruder port
|
2016-07-11 17:19:07 +00:00
|
|
|
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
|
|
|
#ifndef Y2_STEP_PIN
|
|
|
|
#define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
|
|
|
|
#define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
|
|
|
|
#define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
|
|
|
|
#endif
|
2016-05-17 21:56:49 +00:00
|
|
|
#undef _Y2_PINS
|
|
|
|
#define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
|
2016-07-11 17:19:07 +00:00
|
|
|
#define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
|
|
|
|
#else
|
|
|
|
#define Z2_E_INDEX Y2_E_INDEX
|
2015-08-28 01:08:09 +00:00
|
|
|
#endif
|
|
|
|
|
2016-02-10 04:04:07 +00:00
|
|
|
// The Z2 axis, if any, should be the next open extruder port
|
2016-07-11 17:19:07 +00:00
|
|
|
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
|
|
|
|
#ifndef Z2_STEP_PIN
|
|
|
|
#define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
|
|
|
|
#define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
|
|
|
|
#define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
|
|
|
|
#endif
|
2016-05-17 21:56:49 +00:00
|
|
|
#undef _Z2_PINS
|
|
|
|
#define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,
|
2015-08-28 01:08:09 +00:00
|
|
|
#endif
|
|
|
|
|
2015-04-04 10:35:16 +00:00
|
|
|
#define SENSITIVE_PINS { 0, 1, \
|
2015-10-03 06:08:58 +00:00
|
|
|
X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
|
|
|
|
Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
|
|
|
|
Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
|
2016-05-08 01:41:20 +00:00
|
|
|
PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLERFAN_PIN, \
|
|
|
|
_E0_PINS _E1_PINS _E2_PINS _E3_PINS BED_PINS \
|
2016-05-27 00:43:20 +00:00
|
|
|
_H0_PINS _H1_PINS _H2_PINS _H3_PINS \
|
2016-05-17 21:56:49 +00:00
|
|
|
_X2_PINS _Y2_PINS _Z2_PINS \
|
2016-05-08 01:41:20 +00:00
|
|
|
X_MS1_PIN, X_MS2_PIN, Y_MS1_PIN, Y_MS2_PIN, Z_MS1_PIN, Z_MS2_PIN \
|
2015-10-03 06:08:58 +00:00
|
|
|
}
|
2015-01-26 03:43:43 +00:00
|
|
|
|
2016-07-27 10:40:44 +00:00
|
|
|
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
|
|
|
|
|
|
|
|
#ifndef SCK_PIN
|
|
|
|
#define SCK_PIN SCK
|
|
|
|
#endif
|
|
|
|
#ifndef MISO_PIN
|
|
|
|
#define MISO_PIN MISO
|
|
|
|
#endif
|
|
|
|
#ifndef MOSI_PIN
|
|
|
|
#define MOSI_PIN MOSI
|
|
|
|
#endif
|
|
|
|
#ifndef SS_PIN
|
|
|
|
#define SS_PIN SS
|
|
|
|
#endif
|
|
|
|
|
2014-12-18 20:02:36 +00:00
|
|
|
#endif //__PINS_H
|