|
@@ -317,6 +317,7 @@ void Endstops::update() {
|
317
|
317
|
#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
|
318
|
318
|
#define _ENDSTOP_HIT(AXIS, MINMAX) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MINMAX))
|
319
|
319
|
|
|
320
|
+ #define SET_BIT(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
|
320
|
321
|
// UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
|
321
|
322
|
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
|
322
|
323
|
// COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST
|