Browse Source

Fix Z4 stepper indirection macros (#17107)

Vert 4 years ago
parent
commit
8bbcbc528c
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/src/module/stepper/indirection.h

+ 4
- 4
Marlin/src/module/stepper/indirection.h View File

185
   #ifndef Z4_ENABLE_INIT
185
   #ifndef Z4_ENABLE_INIT
186
     #define Z4_ENABLE_INIT() SET_OUTPUT(Z4_ENABLE_PIN)
186
     #define Z4_ENABLE_INIT() SET_OUTPUT(Z4_ENABLE_PIN)
187
     #define Z4_ENABLE_WRITE(STATE) WRITE(Z4_ENABLE_PIN,STATE)
187
     #define Z4_ENABLE_WRITE(STATE) WRITE(Z4_ENABLE_PIN,STATE)
188
-    #define Z4_ENABLE_READ() READ(Z4_ENABLE_PIN)
188
+    #define Z4_ENABLE_READ() bool(READ(Z4_ENABLE_PIN))
189
   #endif
189
   #endif
190
   #ifndef Z4_DIR_INIT
190
   #ifndef Z4_DIR_INIT
191
     #define Z4_DIR_INIT() SET_OUTPUT(Z4_DIR_PIN)
191
     #define Z4_DIR_INIT() SET_OUTPUT(Z4_DIR_PIN)
192
     #define Z4_DIR_WRITE(STATE) WRITE(Z4_DIR_PIN,STATE)
192
     #define Z4_DIR_WRITE(STATE) WRITE(Z4_DIR_PIN,STATE)
193
-    #define Z4_DIR_READ() READ(Z4_DIR_PIN)
193
+    #define Z4_DIR_READ() bool(READ(Z4_DIR_PIN))
194
   #endif
194
   #endif
195
-  #define Z4_STEP_INIT SET_OUTPUT(Z4_STEP_PIN)
195
+  #define Z4_STEP_INIT() SET_OUTPUT(Z4_STEP_PIN)
196
   #ifndef Z4_STEP_WRITE
196
   #ifndef Z4_STEP_WRITE
197
     #define Z4_STEP_WRITE(STATE) WRITE(Z4_STEP_PIN,STATE)
197
     #define Z4_STEP_WRITE(STATE) WRITE(Z4_STEP_PIN,STATE)
198
   #endif
198
   #endif
199
-  #define Z4_STEP_READ READ(Z4_STEP_PIN)
199
+  #define Z4_STEP_READ() bool(READ(Z4_STEP_PIN))
200
 #else
200
 #else
201
   #define Z4_DIR_WRITE(STATE) NOOP
201
   #define Z4_DIR_WRITE(STATE) NOOP
202
 #endif
202
 #endif

Loading…
Cancel
Save