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);
|
WRITE(Y_ENABLE_PIN, 1); SET_OUTPUT(Y_ENABLE_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WRITE(Z_STEP_PIN, 0); SET_OUTPUT(Z_STEP_PIN);
|
#if defined Z_STEP_PIN && defined Z_DIR_PIN
|
||||||
WRITE(Z_DIR_PIN, 0); SET_OUTPUT(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
|
#ifdef Z_MIN_PIN
|
||||||
SET_INPUT(Z_MIN_PIN);
|
SET_INPUT(Z_MIN_PIN);
|
||||||
#ifdef USE_INTERNAL_PULLUPS
|
#ifdef USE_INTERNAL_PULLUPS
|
||||||
|
|
|
||||||
6
pinio.h
6
pinio.h
|
|
@ -101,6 +101,7 @@ Y Stepper
|
||||||
Z Stepper
|
Z Stepper
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined Z_STEP_PIN && defined Z_DIR_PIN
|
||||||
#define _z_step(st) WRITE(Z_STEP_PIN, st)
|
#define _z_step(st) WRITE(Z_STEP_PIN, st)
|
||||||
#define z_step() _z_step(1);
|
#define z_step() _z_step(1);
|
||||||
#ifndef Z_INVERT_DIR
|
#ifndef Z_INVERT_DIR
|
||||||
|
|
@ -108,6 +109,11 @@ Z Stepper
|
||||||
#else
|
#else
|
||||||
#define z_direction(dir) WRITE(Z_DIR_PIN, dir^1)
|
#define z_direction(dir) WRITE(Z_DIR_PIN, dir^1)
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define _z_step(x)
|
||||||
|
#define z_step()
|
||||||
|
#define z_direction(x)
|
||||||
|
#endif
|
||||||
#ifdef Z_MIN_PIN
|
#ifdef Z_MIN_PIN
|
||||||
#ifndef Z_INVERT_MIN
|
#ifndef Z_INVERT_MIN
|
||||||
#define z_min() (READ(Z_MIN_PIN)?1:0)
|
#define z_min() (READ(Z_MIN_PIN)?1:0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue