Fixed atomic access to flags in sys.execute.
This seems to fix the bug that caused Grbl to hang during some operations, especially jogging.
This commit is contained in:
@ -44,9 +44,9 @@
|
||||
|
||||
// Bit field and masking macros
|
||||
#define bit(n) (1 << n)
|
||||
#define bit_true(x,mask) (x |= mask)
|
||||
#define bit_false(x,mask) (x &= ~mask)
|
||||
#define bit_toggle(x,mask) (x ^= mask)
|
||||
#define bit_true(x,mask) {uint8_t sreg = SREG; cli(); (x) |= (mask); SREG = sreg; }
|
||||
#define bit_false(x,mask) {uint8_t sreg = SREG; cli(); (x) &= ~(mask); SREG = sreg; }
|
||||
#define bit_toggle(x,mask) {uint8_t sreg = SREG; cli(); (x) ^= (mask); SREG = sreg; }
|
||||
#define bit_istrue(x,mask) ((x & mask) != 0)
|
||||
#define bit_isfalse(x,mask) ((x & mask) == 0)
|
||||
|
||||
|
Reference in New Issue
Block a user