2015-01-26 03:40:00 +01:00
|
|
|
/**
|
|
|
|
* pins.h
|
|
|
|
*/
|
2015-01-26 03:50:09 +01:00
|
|
|
|
2011-12-12 19:34:37 +01:00
|
|
|
#ifndef PINS_H
|
|
|
|
#define PINS_H
|
|
|
|
|
2015-01-26 03:40:00 +01:00
|
|
|
// Preset optional pins
|
2012-08-30 09:16:57 +02:00
|
|
|
#define X_MS1_PIN -1
|
|
|
|
#define X_MS2_PIN -1
|
|
|
|
#define Y_MS1_PIN -1
|
|
|
|
#define Y_MS2_PIN -1
|
|
|
|
#define Z_MS1_PIN -1
|
|
|
|
#define Z_MS2_PIN -1
|
|
|
|
#define E0_MS1_PIN -1
|
|
|
|
#define E0_MS2_PIN -1
|
|
|
|
#define E1_MS1_PIN -1
|
|
|
|
#define E1_MS2_PIN -1
|
2015-01-26 04:43:43 +01:00
|
|
|
#define HEATER_3_PIN -1
|
|
|
|
#define TEMP_3_PIN -1
|
2011-12-12 19:34:37 +01:00
|
|
|
|
2014-12-18 21:02:36 +01:00
|
|
|
#if MB(GEN7_CUSTOM)
|
2015-01-26 03:40:00 +01: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"
|
|
|
|
#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 08:17:00 +02:00
|
|
|
#elif MB(RAMPS_13_EFB)
|
2015-06-16 01:56:16 +02:00
|
|
|
#include "pins_RAMPS_13_EFB.h"
|
2015-06-15 08:17:00 +02:00
|
|
|
#elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
|
2015-01-26 03:40:00 +01:00
|
|
|
#include "pins_RAMPS_13.h"
|
2015-10-31 02:05:09 +01:00
|
|
|
#elif MB(RAMPS_14_EFB)
|
2016-02-29 08:10:15 +01:00
|
|
|
#include "pins_RAMPS_14_EFB.h"
|
2015-10-31 02:05:09 +01:00
|
|
|
#elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF)
|
2016-02-29 08:10:15 +01:00
|
|
|
#include "pins_RAMPS_14.h"
|
2015-01-26 03:40:00 +01: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 23:00:43 +02:00
|
|
|
#elif MB(MELZI_MAKR3D)
|
|
|
|
#include "pins_MELZI_MAKR3D.h"
|
2015-01-26 03:40:00 +01: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"
|
|
|
|
#elif MB(TEENSYLU)
|
|
|
|
#include "pins_TEENSYLU.h"
|
|
|
|
#elif MB(RUMBA)
|
|
|
|
#include "pins_RUMBA.h"
|
|
|
|
#elif MB(PRINTRBOARD)
|
|
|
|
#include "pins_PRINTRBOARD.h"
|
|
|
|
#elif MB(BRAINWAVE)
|
|
|
|
#include "pins_BRAINWAVE.h"
|
2015-04-10 07:11:50 +02:00
|
|
|
#elif MB(BRAINWAVE_PRO)
|
|
|
|
#include "pins_BRAINWAVE_PRO.h"
|
2015-01-26 03:40:00 +01: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 05:18:00 +02:00
|
|
|
#elif MB(MINITRONICS)
|
|
|
|
#include "pins_MINITRONICS.h"
|
2015-01-28 00:54:46 +01:00
|
|
|
#elif MB(MEGATRONICS_2)
|
|
|
|
#include "pins_MEGATRONICS_2.h"
|
|
|
|
#elif MB(MEGATRONICS_3)
|
|
|
|
#include "pins_MEGATRONICS_3.h"
|
2015-01-26 03:40:00 +01: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 16:04:29 +02:00
|
|
|
#elif MB(MINIRAMBO)
|
|
|
|
#include "pins_MINIRAMBO.h"
|
2015-01-26 03:40:00 +01: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 02:26:22 +01:00
|
|
|
#elif MB(BAM_DICE)
|
2016-02-29 08:10:15 +01:00
|
|
|
#include "pins_RAMPS_14.h"
|
2015-02-20 02:26:22 +01:00
|
|
|
#elif MB(BAM_DICE_DUE)
|
|
|
|
#include "pins_BAM_DICE_DUE.h"
|
2015-03-01 10:16:55 +01:00
|
|
|
#elif MB(FELIX2)
|
|
|
|
#include "pins_FELIX2.h"
|
2015-06-15 17:01:25 +02:00
|
|
|
#elif MB(MKS_BASE)
|
|
|
|
#include "pins_MKS_BASE.h"
|
2015-07-09 00:30:33 +02:00
|
|
|
#elif MB(RIGIDBOARD)
|
|
|
|
#include "pins_RIGIDBOARD.h"
|
2015-07-22 11:35:02 +02:00
|
|
|
#elif MB(MEGACONTROLLER)
|
|
|
|
#include "pins_MEGACONTROLLER.h"
|
2016-02-27 20:17:07 +01:00
|
|
|
#elif MB(BQ_ZUM_MEGA_3D)
|
|
|
|
#include "pins_BQ_ZUM_MEGA_3D.h"
|
2015-01-26 03:40:00 +01:00
|
|
|
#elif MB(99)
|
|
|
|
#include "pins_99.h"
|
2016-03-01 23:13:44 +01:00
|
|
|
#elif MB(AJ4P)
|
|
|
|
#include "pins_AJ4P.h"
|
2011-12-12 19:34:37 +01:00
|
|
|
#else
|
2015-01-26 03:40:00 +01:00
|
|
|
#error Unknown MOTHERBOARD value set in Configuration.h
|
2011-12-12 19:34:37 +01:00
|
|
|
#endif
|
|
|
|
|
2015-01-26 04:43:43 +01: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!
|
|
|
|
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN, analogInputToDigitalPin(TEMP_0_PIN),
|
2015-01-28 00:19:03 +01:00
|
|
|
#define _E1_PINS
|
|
|
|
#define _E2_PINS
|
|
|
|
#define _E3_PINS
|
|
|
|
|
2012-02-29 15:49:02 +01:00
|
|
|
#if EXTRUDERS > 1
|
2015-03-28 04:29:05 +01:00
|
|
|
#undef _E1_PINS
|
2015-01-26 04:43:43 +01:00
|
|
|
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN, analogInputToDigitalPin(TEMP_1_PIN),
|
2015-01-26 14:17:08 +01:00
|
|
|
#if EXTRUDERS > 2
|
2015-03-28 04:29:05 +01:00
|
|
|
#undef _E2_PINS
|
2015-01-26 14:17:08 +01:00
|
|
|
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN, analogInputToDigitalPin(TEMP_2_PIN),
|
|
|
|
#if EXTRUDERS > 3
|
2015-03-28 04:29:05 +01:00
|
|
|
#undef _E3_PINS
|
2015-01-26 14:17:08 +01:00
|
|
|
#define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, analogInputToDigitalPin(TEMP_3_PIN),
|
|
|
|
#endif
|
|
|
|
#endif
|
2015-08-28 03:16:46 +02:00
|
|
|
#elif ENABLED(Y_DUAL_STEPPER_DRIVERS) || ENABLED(Z_DUAL_STEPPER_DRIVERS)
|
|
|
|
#undef _E1_PINS
|
|
|
|
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN,
|
2011-12-12 19:34:37 +01:00
|
|
|
#endif
|
2012-02-29 15:49:02 +01:00
|
|
|
|
2012-12-16 21:08:55 +01: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
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_MAX_ENDSTOPS)
|
2015-03-27 08:32:58 +01:00
|
|
|
#undef X_MAX_PIN
|
|
|
|
#undef Y_MAX_PIN
|
|
|
|
#undef Z_MAX_PIN
|
2015-01-26 03:40:00 +01:00
|
|
|
#define X_MAX_PIN -1
|
|
|
|
#define Y_MAX_PIN -1
|
|
|
|
#define Z_MAX_PIN -1
|
2012-03-12 20:32:14 +01:00
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_MIN_ENDSTOPS)
|
2015-03-27 08:32:58 +01:00
|
|
|
#undef X_MIN_PIN
|
|
|
|
#undef Y_MIN_PIN
|
|
|
|
#undef Z_MIN_PIN
|
2015-01-26 03:40:00 +01:00
|
|
|
#define X_MIN_PIN -1
|
|
|
|
#define Y_MIN_PIN -1
|
|
|
|
#define Z_MIN_PIN -1
|
2013-06-18 19:20:26 +02:00
|
|
|
#endif
|
|
|
|
|
2015-08-10 10:35:39 +02: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 10:31:51 +01:00
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_XMAX_ENDSTOP)
|
2015-03-24 18:06:44 +01:00
|
|
|
#undef X_MAX_PIN
|
|
|
|
#define X_MAX_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_XMIN_ENDSTOP)
|
2015-10-03 08:08:58 +02:00
|
|
|
#undef X_MIN_PIN
|
2015-03-24 18:06:44 +01:00
|
|
|
#define X_MIN_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_YMAX_ENDSTOP)
|
2016-03-23 12:48:06 +01:00
|
|
|
#undef Y_MAX_PIN
|
2015-03-24 18:06:44 +01:00
|
|
|
#define Y_MAX_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_YMIN_ENDSTOP)
|
2015-03-24 18:06:44 +01:00
|
|
|
#undef Y_MIN_PIN
|
|
|
|
#define Y_MIN_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_ZMAX_ENDSTOP)
|
2015-03-24 18:06:44 +01:00
|
|
|
#undef Z_MAX_PIN
|
|
|
|
#define Z_MAX_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2015-07-31 07:11:19 +02:00
|
|
|
#if ENABLED(DISABLE_ZMIN_ENDSTOP)
|
2015-10-03 08:08:58 +02:00
|
|
|
#undef Z_MIN_PIN
|
2015-03-24 18:06:44 +01:00
|
|
|
#define Z_MIN_PIN -1
|
|
|
|
#endif
|
|
|
|
|
2016-02-10 05:04:07 +01:00
|
|
|
//
|
|
|
|
// Dual Y and Dual Z support
|
|
|
|
// These options are mutually-exclusive
|
|
|
|
//
|
|
|
|
|
|
|
|
#define __EPIN(p,q) E##p##_##q##_PIN
|
|
|
|
#define _EPIN(p,q) __EPIN(p,q)
|
|
|
|
|
|
|
|
// The Y2 axis, if any, should be the next open extruder port
|
2015-08-28 03:08:09 +02:00
|
|
|
#ifndef Y2_STEP_PIN
|
2016-02-10 05:04:07 +01:00
|
|
|
#define Y2_STEP_PIN _EPIN(EXTRUDERS, STEP)
|
|
|
|
#define Y2_DIR_PIN _EPIN(EXTRUDERS, DIR)
|
|
|
|
#define Y2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
|
2015-08-28 03:08:09 +02:00
|
|
|
#endif
|
|
|
|
|
2016-02-10 05:04:07 +01:00
|
|
|
// The Z2 axis, if any, should be the next open extruder port
|
2015-08-28 03:08:09 +02:00
|
|
|
#ifndef Z2_STEP_PIN
|
2016-02-10 05:04:07 +01:00
|
|
|
#define Z2_STEP_PIN _EPIN(EXTRUDERS, STEP)
|
|
|
|
#define Z2_DIR_PIN _EPIN(EXTRUDERS, DIR)
|
|
|
|
#define Z2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
|
2015-08-28 03:08:09 +02:00
|
|
|
#endif
|
|
|
|
|
2015-04-04 12:35:16 +02:00
|
|
|
#define SENSITIVE_PINS { 0, 1, \
|
2015-10-03 08:08:58 +02: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, \
|
|
|
|
PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, \
|
|
|
|
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
|
|
|
|
analogInputToDigitalPin(TEMP_BED_PIN) \
|
|
|
|
}
|
2015-01-26 04:43:43 +01:00
|
|
|
|
2016-03-01 02:24:57 +01:00
|
|
|
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
|
2015-03-14 12:28:22 +01:00
|
|
|
|
2014-12-18 21:02:36 +01:00
|
|
|
#endif //__PINS_H
|
2015-03-01 10:16:55 +01:00
|
|
|
|