Ver código fonte

Tweaks to endstops macros

Scott Lahteine 8 anos atrás
pai
commit
4f5a8c05d5
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      Marlin/endstops.cpp

+ 3
- 3
Marlin/endstops.cpp Ver arquivo

@@ -233,15 +233,15 @@ void Endstops::M119() {
233 233
 // Check endstops - Called from ISR!
234 234
 void Endstops::update() {
235 235
 
236
+  #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
236 237
   #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
237 238
   #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
238 239
   #define _ENDSTOP_HIT(AXIS) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MIN))
239
-  #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
240 240
 
241 241
   // UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
242 242
   #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
243
-  // COPY_BIT: copy the value of COPY_BIT to BIT in bits
244
-  #define COPY_BIT(bits, COPY_BIT, BIT) SET_BIT(bits, BIT, TEST(bits, COPY_BIT))
243
+  // COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST
244
+  #define COPY_BIT(DST, SRC_BIT, DST_BIT) SET_BIT(DST, DST_BIT, TEST(DST, SRC_BIT))
245 245
 
246 246
   #define _UPDATE_ENDSTOP(AXIS,MINMAX,CODE) do { \
247 247
       UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \

Carregando…
Cancelar
Salvar