40 #ifdef FORCE_INITIALIZATION_ALARM
55 #ifdef HOMING_INIT_LOCK
64 uint8_t prior_state = sys.
state;
66 sys.
state = prior_state;
volatile uint8_t sys_probe_state
Probing state value. Used to coordinate the probing cycle with stepper ISR.
void protocol_main_loop()
Starts Grbl main loop. It handles all incoming characters from the serial port and executes...
void report_init_message()
Welcome message.
#define DEFAULT_FEED_OVERRIDE
void plan_sync_position()
Reset the planner position vectors. Called by the system abort/initialization routine.
void limits_init()
Initialize the limits module.
#define DEFAULT_RAPID_OVERRIDE
100%. Don't change this value.
void spindle_init()
Initializes spindle pins and hardware PWM, if enabled.
uint8_t spindle_speed_ovr
Spindle speed value in percent.
void gc_sync_position()
Sets g-code parser position in mm. Input in steps. Called by the system abort and hard...
Define global system variables.
void stepper_init()
Initialize and start the stepper motor subsystem.
void serial_reset_read_buffer()
Reset and empty data in read buffer. Used by e-stop and reset.
volatile uint8_t sys_rt_exec_alarm
Global realtime executor bitflag variable for setting various alarms.
uint8_t state
Tracks the current system state of Grbl.
#define DEFAULT_SPINDLE_SPEED_OVERRIDE
100%. Don't change this value.
void plan_reset()
Initialize and reset the motion plan subsystem.
uint8_t f_override
Feed rate override value in percent.
#define BITFLAG_HOMING_ENABLE
volatile uint8_t sys_rt_exec_motion_override
Global realtime executor bitflag variable for motion-based overrides.
void coolant_init()
Initializes coolant control pins.
void gc_init()
Initialize the parser.
uint8_t flags
Contains default boolean settings.
void probe_init()
Probe pin initialization routine.
#define STATE_ALARM
In alarm state. Locks out all g-code processes. Allows settings access.
system_t sys
Declare system global variable structure.
int32_t sys_position[N_AXIS]
NOTE: These position variables may need to be declared as volatiles, if problems arise.
volatile uint8_t sys_rt_exec_state
Global realtime executor bitflag variable for state management. See EXEC bitmasks.
memset(pl_data, 0, sizeof(plan_line_data_t))
Zero pl_data struct.
void settings_init()
Initialize the config subsystem.
uint8_t r_override
Rapids override value in percent.
void sleep_init()
Initialization routine for sleep timer.
int32_t sys_probe_position[N_AXIS]
Last probe position in machine coordinates and steps.
void system_init()
Initialize the serial protocol.
volatile uint8_t sys_rt_exec_accessory_override
Global realtime executor bitflag variable for spindle/coolant overrides.
void st_reset()
Reset and clear stepper subsystem variables.
#define STATE_IDLE
Define system state bit map. The state variable primarily tracks the individual functions.
#define bit_istrue(x, mask)