Make the extruder stepper optional.
Think of DC extruders, milling Mendels, ...
This commit is contained in:
parent
475ca7d54a
commit
d2bf65822e
6
mendel.c
6
mendel.c
|
|
@ -102,8 +102,10 @@ void io_init(void) {
|
|||
WRITE(Z_ENABLE_PIN, 1); SET_OUTPUT(Z_ENABLE_PIN);
|
||||
#endif
|
||||
|
||||
WRITE(E_STEP_PIN, 0); SET_OUTPUT(E_STEP_PIN);
|
||||
WRITE(E_DIR_PIN, 0); SET_OUTPUT(E_DIR_PIN);
|
||||
#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
|
||||
|
|
|
|||
16
pinio.h
16
pinio.h
|
|
@ -131,12 +131,18 @@ Z Stepper
|
|||
Extruder
|
||||
*/
|
||||
|
||||
#define _e_step(st) WRITE(E_STEP_PIN, st)
|
||||
#define e_step() _e_step(1);
|
||||
#ifndef E_INVERT_DIR
|
||||
#define e_direction(dir) WRITE(E_DIR_PIN, dir)
|
||||
#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
|
||||
#define e_direction(dir) WRITE(E_DIR_PIN, dir)
|
||||
#else
|
||||
#define e_direction(dir) WRITE(E_DIR_PIN, dir^1)
|
||||
#endif
|
||||
#else
|
||||
#define e_direction(dir) WRITE(E_DIR_PIN, dir^1)
|
||||
#define _e_step(st) do { } while (0)
|
||||
#define e_step() do { } while (0)
|
||||
#define e_direction(dir) do { } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue