Isolate atomic bit flag for execution.
- Denoted bit_true_atomic only for sys.execute bit settings. All other bit_true type calls are for local variables only and don’t need atomic access. Still looking into other ways of setting these flags without requiring atomic access, but this is a patch for now.
This commit is contained in:
parent
a20d3e9855
commit
87c5703200
7 changed files with 28 additions and 26 deletions
6
serial.c
6
serial.c
|
|
@ -157,9 +157,9 @@ ISR(SERIAL_RX)
|
|||
// Pick off runtime command characters directly from the serial stream. These characters are
|
||||
// not passed into the buffer, but these set system state flag bits for runtime execution.
|
||||
switch (data) {
|
||||
case CMD_STATUS_REPORT: bit_true(sys.execute, EXEC_STATUS_REPORT); break; // Set as true
|
||||
case CMD_CYCLE_START: bit_true(sys.execute, EXEC_CYCLE_START); break; // Set as true
|
||||
case CMD_FEED_HOLD: bit_true(sys.execute, EXEC_FEED_HOLD); break; // Set as true
|
||||
case CMD_STATUS_REPORT: bit_true_atomic(sys.execute, EXEC_STATUS_REPORT); break; // Set as true
|
||||
case CMD_CYCLE_START: bit_true_atomic(sys.execute, EXEC_CYCLE_START); break; // Set as true
|
||||
case CMD_FEED_HOLD: bit_true_atomic(sys.execute, EXEC_FEED_HOLD); break; // Set as true
|
||||
case CMD_RESET: mc_reset(); break; // Call motion control reset routine.
|
||||
default: // Write character to buffer
|
||||
next_head = rx_buffer_head + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue