From 4f5a8c05d569d445c4d2158270a20a4a604a5cb6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 22 Aug 2016 09:58:48 -0500 Subject: [PATCH] Tweaks to endstops macros --- Marlin/endstops.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/endstops.cpp b/Marlin/endstops.cpp index ffc8c6963..4faf8a6b3 100644 --- a/Marlin/endstops.cpp +++ b/Marlin/endstops.cpp @@ -233,15 +233,15 @@ void Endstops::M119() { // Check endstops - Called from ISR! void Endstops::update() { + #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING #define _ENDSTOP_HIT(AXIS) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MIN)) - #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX // UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) - // COPY_BIT: copy the value of COPY_BIT to BIT in bits - #define COPY_BIT(bits, COPY_BIT, BIT) SET_BIT(bits, BIT, TEST(bits, COPY_BIT)) + // COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST + #define COPY_BIT(DST, SRC_BIT, DST_BIT) SET_BIT(DST, DST_BIT, TEST(DST, SRC_BIT)) #define _UPDATE_ENDSTOP(AXIS,MINMAX,CODE) do { \ UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \