Skip to content

Commit

Permalink
Merge pull request #2988 from thinkyhead/z2_more_extruders
Browse files Browse the repository at this point in the history
Use next open E connector for Y2/Z2
  • Loading branch information
thinkyhead committed Feb 18, 2016
2 parents 8eaba02 + 68457ee commit 3e2473e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Marlin/Conditionals.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@
#define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
#define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
#define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
#define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
#define HAS_X_DIR (PIN_EXISTS(X_DIR))
#define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
#define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
Expand All @@ -472,6 +473,7 @@
#define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
#define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
#define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
#define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
#define HAS_X_STEP (PIN_EXISTS(X_STEP))
#define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
#define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
Expand All @@ -482,6 +484,7 @@
#define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
#define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
#define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
#define HAS_E4_STEP (PIN_EXISTS(E4_STEP))

/**
* Helper Macros for heaters and extruder fan
Expand Down
22 changes: 16 additions & 6 deletions Marlin/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,26 @@
#define Z_MIN_PIN -1
#endif

//
// 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
#ifndef Y2_STEP_PIN
#define Y2_STEP_PIN E1_STEP_PIN
#define Y2_DIR_PIN E1_DIR_PIN
#define Y2_ENABLE_PIN E1_ENABLE_PIN
#define Y2_STEP_PIN _EPIN(EXTRUDERS, STEP)
#define Y2_DIR_PIN _EPIN(EXTRUDERS, DIR)
#define Y2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
#endif

// The Z2 axis, if any, should be the next open extruder port
#ifndef Z2_STEP_PIN
#define Z2_STEP_PIN E1_STEP_PIN
#define Z2_DIR_PIN E1_DIR_PIN
#define Z2_ENABLE_PIN E1_ENABLE_PIN
#define Z2_STEP_PIN _EPIN(EXTRUDERS, STEP)
#define Z2_DIR_PIN _EPIN(EXTRUDERS, DIR)
#define Z2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
#endif

#define SENSITIVE_PINS { 0, 1, \
Expand Down

0 comments on commit 3e2473e

Please sign in to comment.