Make the extruder stepper optional.

Think of DC extruders, milling Mendels, ...
This commit is contained in:
Markus Hitter 2011-03-02 00:28:22 +01:00
parent 475ca7d54a
commit d2bf65822e
2 changed files with 15 additions and 7 deletions

View File

@ -102,8 +102,10 @@ void io_init(void) {
WRITE(Z_ENABLE_PIN, 1); SET_OUTPUT(Z_ENABLE_PIN);
#endif
#if defined E_STEP_PIN && defined E_DIR_PIN
WRITE(E_STEP_PIN, 0); SET_OUTPUT(E_STEP_PIN);
WRITE(E_DIR_PIN, 0); SET_OUTPUT(E_DIR_PIN);
#endif
#ifdef E_ENABLE_PIN
WRITE(E_ENABLE_PIN, 1); SET_OUTPUT(E_ENABLE_PIN);
#endif

View File

@ -131,6 +131,7 @@ Z Stepper
Extruder
*/
#if defined E_STEP_PIN && defined E_DIR_PIN
#define _e_step(st) WRITE(E_STEP_PIN, st)
#define e_step() _e_step(1);
#ifndef E_INVERT_DIR
@ -138,6 +139,11 @@ Extruder
#else
#define e_direction(dir) WRITE(E_DIR_PIN, dir^1)
#endif
#else
#define _e_step(st) do { } while (0)
#define e_step() do { } while (0)
#define e_direction(dir) do { } while (0)
#endif
/*
End Step - All Steppers