Make use of PULLUP_ON() and PULLUP_OFF().
This should not change behaviour, but later enable proper operation on ARM.
This commit is contained in:
parent
facd1ee606
commit
083f8f9b22
12
mendel.c
12
mendel.c
|
|
@ -100,11 +100,11 @@ void io_init(void) {
|
|||
WRITE(X_DIR_PIN, 0); SET_OUTPUT(X_DIR_PIN);
|
||||
#ifdef X_MIN_PIN
|
||||
SET_INPUT(X_MIN_PIN);
|
||||
WRITE(X_MIN_PIN, 0); // pullup resistors off
|
||||
PULLUP_OFF(X_MIN_PIN);
|
||||
#endif
|
||||
#ifdef X_MAX_PIN
|
||||
SET_INPUT(X_MAX_PIN);
|
||||
WRITE(X_MAX_PIN, 0); // pullup resistors off
|
||||
PULLUP_OFF(X_MAX_PIN);
|
||||
#endif
|
||||
|
||||
// Y Stepper
|
||||
|
|
@ -112,11 +112,11 @@ void io_init(void) {
|
|||
WRITE(Y_DIR_PIN, 0); SET_OUTPUT(Y_DIR_PIN);
|
||||
#ifdef Y_MIN_PIN
|
||||
SET_INPUT(Y_MIN_PIN);
|
||||
WRITE(Y_MIN_PIN, 0); // pullup resistors off
|
||||
PULLUP_OFF(Y_MIN_PIN);
|
||||
#endif
|
||||
#ifdef Y_MAX_PIN
|
||||
SET_INPUT(Y_MAX_PIN);
|
||||
WRITE(Y_MAX_PIN, 0); // pullup resistors off
|
||||
PULLUP_OFF(Y_MAX_PIN);
|
||||
#endif
|
||||
|
||||
// Z Stepper
|
||||
|
|
@ -126,11 +126,11 @@ void io_init(void) {
|
|||
#endif
|
||||
#ifdef Z_MIN_PIN
|
||||
SET_INPUT(Z_MIN_PIN);
|
||||
WRITE(Z_MIN_PIN, 0); // pullup resistors off
|
||||
PULLUP_OFF(Z_MIN_PIN);
|
||||
#endif
|
||||
#ifdef Z_MAX_PIN
|
||||
SET_INPUT(Z_MAX_PIN);
|
||||
WRITE(Z_MAX_PIN, 0); // pullup resistors off
|
||||
PULLUP_OFF(Z_MAX_PIN);
|
||||
#endif
|
||||
|
||||
#if defined E_STEP_PIN && defined E_DIR_PIN
|
||||
|
|
|
|||
1
pinio.c
1
pinio.c
|
|
@ -34,6 +34,7 @@ void power_off() {
|
|||
|
||||
#ifdef PS_ON_PIN
|
||||
SET_INPUT(PS_ON_PIN);
|
||||
PULLUP_OFF(PS_ON_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef PS_MOSFET_PIN
|
||||
|
|
|
|||
24
pinio.h
24
pinio.h
|
|
@ -351,22 +351,22 @@ static void endstops_on(void) __attribute__ ((always_inline));
|
|||
inline void endstops_on(void) {
|
||||
#ifdef USE_INTERNAL_PULLUPS
|
||||
#ifdef X_MIN_PIN
|
||||
WRITE(X_MIN_PIN, 1);
|
||||
PULLUP_ON(X_MIN_PIN);
|
||||
#endif
|
||||
#ifdef X_MAX_PIN
|
||||
WRITE(X_MAX_PIN, 1);
|
||||
PULLUP_ON(X_MAX_PIN);
|
||||
#endif
|
||||
#ifdef Y_MIN_PIN
|
||||
WRITE(Y_MIN_PIN, 1);
|
||||
PULLUP_ON(Y_MIN_PIN);
|
||||
#endif
|
||||
#ifdef Y_MAX_PIN
|
||||
WRITE(Y_MAX_PIN, 1);
|
||||
PULLUP_ON(Y_MAX_PIN);
|
||||
#endif
|
||||
#ifdef Z_MIN_PIN
|
||||
WRITE(Z_MIN_PIN, 1);
|
||||
PULLUP_ON(Z_MIN_PIN);
|
||||
#endif
|
||||
#ifdef Z_MAX_PIN
|
||||
WRITE(Z_MAX_PIN, 1);
|
||||
PULLUP_ON(Z_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
@ -375,22 +375,22 @@ static void endstops_off(void) __attribute__ ((always_inline));
|
|||
inline void endstops_off(void) {
|
||||
#ifdef USE_INTERNAL_PULLUPS
|
||||
#ifdef X_MIN_PIN
|
||||
WRITE(X_MIN_PIN, 0);
|
||||
PULLUP_OFF(X_MIN_PIN);
|
||||
#endif
|
||||
#ifdef X_MAX_PIN
|
||||
WRITE(X_MAX_PIN, 0);
|
||||
PULLUP_OFF(X_MAX_PIN);
|
||||
#endif
|
||||
#ifdef Y_MIN_PIN
|
||||
WRITE(Y_MIN_PIN, 0);
|
||||
PULLUP_OFF(Y_MIN_PIN);
|
||||
#endif
|
||||
#ifdef Y_MAX_PIN
|
||||
WRITE(Y_MAX_PIN, 0);
|
||||
PULLUP_OFF(Y_MAX_PIN);
|
||||
#endif
|
||||
#ifdef Z_MIN_PIN
|
||||
WRITE(Z_MIN_PIN, 0);
|
||||
PULLUP_OFF(Z_MIN_PIN);
|
||||
#endif
|
||||
#ifdef Z_MAX_PIN
|
||||
WRITE(Z_MAX_PIN, 0);
|
||||
PULLUP_OFF(Z_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue