mendel.c, pinio.c: Make Z axes optional.
This commit is contained in:
parent
03acd85272
commit
ea4fdcf26a
6
mendel.c
6
mendel.c
|
|
@ -80,8 +80,10 @@ void io_init(void) {
|
|||
WRITE(Y_ENABLE_PIN, 1); SET_OUTPUT(Y_ENABLE_PIN);
|
||||
#endif
|
||||
|
||||
WRITE(Z_STEP_PIN, 0); SET_OUTPUT(Z_STEP_PIN);
|
||||
WRITE(Z_DIR_PIN, 0); SET_OUTPUT(Z_DIR_PIN);
|
||||
#if defined Z_STEP_PIN && defined Z_DIR_PIN
|
||||
WRITE(Z_STEP_PIN, 0); SET_OUTPUT(Z_STEP_PIN);
|
||||
WRITE(Z_DIR_PIN, 0); SET_OUTPUT(Z_DIR_PIN);
|
||||
#endif
|
||||
#ifdef Z_MIN_PIN
|
||||
SET_INPUT(Z_MIN_PIN);
|
||||
#ifdef USE_INTERNAL_PULLUPS
|
||||
|
|
|
|||
6
pinio.h
6
pinio.h
|
|
@ -101,6 +101,7 @@ Y Stepper
|
|||
Z Stepper
|
||||
*/
|
||||
|
||||
#if defined Z_STEP_PIN && defined Z_DIR_PIN
|
||||
#define _z_step(st) WRITE(Z_STEP_PIN, st)
|
||||
#define z_step() _z_step(1);
|
||||
#ifndef Z_INVERT_DIR
|
||||
|
|
@ -108,6 +109,11 @@ Z Stepper
|
|||
#else
|
||||
#define z_direction(dir) WRITE(Z_DIR_PIN, dir^1)
|
||||
#endif
|
||||
#else
|
||||
#define _z_step(x)
|
||||
#define z_step()
|
||||
#define z_direction(x)
|
||||
#endif
|
||||
#ifdef Z_MIN_PIN
|
||||
#ifndef Z_INVERT_MIN
|
||||
#define z_min() (READ(Z_MIN_PIN)?1:0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue