grblHAL core  20251111
core_handlers.h
Go to the documentation of this file.
1 /*
2  core_handlers.h - core event handler entry points and some reporting entry points
3 
4  Part of grblHAL
5 
6  Copyright (c) 2020-2025 Terje Io
7 
8  grblHAL is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  grblHAL is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
26 #pragma once
27 
28 #include "system.h"
29 #include "stream.h"
30 #include "alarms.h"
31 #include "errors.h"
32 #include "settings.h"
33 #include "report.h"
34 #include "planner.h"
35 #include "machine_limits.h"
36 #include "vfs.h"
37 
38 typedef enum {
46 
47 /* TODO: add to grbl pointers so that a different formatting (xml, json etc) of reports may be implemented by a plugin?
48 typedef struct {
49  void (*report_echo_line_received)(char *line);
50  void (*report_realtime_status)(stream_write_ptr stream_write);
51  void (*report_probe_parameters)(void);
52  void (*report_ngc_parameters)(void);
53  void (*report_gcode_modes)(void);
54  void (*report_startup_line)(uint8_t n, char *line);
55  void (*report_execute_startup_message)(char *line, status_code_t status_code);
56 } grbl_report_t;
57 */
58 
59 // Report entry points set by core at startup and reset.
60 
61 typedef void (*init_message_ptr)(stream_write_ptr write);
62 typedef void (*help_message_ptr)(void);
66 
67 typedef struct {
74 } report_t;
75 
76 // Core event handler and other entry points.
77 // Most of the event handlers defaults to NULL, a few is set up to call a dummy handler for simpler code.
78 
79 typedef bool (*enqueue_gcode_ptr)(char *data);
80 typedef bool (*protocol_enqueue_realtime_command_ptr)(char c);
81 typedef bool (*travel_limits_ptr)(float *target, axes_signals_t axes, bool is_cartesian, work_envelope_t *envelope);
82 typedef bool (*arc_limits_ptr)(coord_data_t *target, coord_data_t *position, point_2d_t center, float radius, plane_t plane, int32_t turns, work_envelope_t *envelope);
83 
84 typedef void (*apply_travel_limits_ptr)(float *target, float *position, work_envelope_t *envelope);
85 typedef bool (*home_machine_ptr)(axes_signals_t cycle, axes_signals_t auto_square);
86 
88 typedef void (*on_state_change_ptr)(sys_state_t state);
89 typedef void (*on_override_changed_ptr)(override_changed_t override);
90 typedef void (*on_spindle_programmed_ptr)(spindle_ptrs_t *spindle, spindle_state_t state, float rpm, spindle_rpm_mode_t mode);
91 typedef void (*on_spindle_at_speed_ptr)(spindle_ptrs_t *spindle, spindle_state_t state);
92 typedef void (*on_wco_changed_ptr)(void);
93 typedef void (*on_wco_saved_ptr)(coord_system_id_t id, coord_data_t *data);
94 typedef void (*on_program_completed_ptr)(program_flow_t program_flow, bool check_mode);
95 typedef void (*on_execute_realtime_ptr)(sys_state_t state);
96 typedef void (*on_unknown_accessory_override_ptr)(uint8_t cmd);
97 typedef void (*on_cycle_start_ptr)(void);
99 typedef bool (*on_unknown_realtime_cmd_ptr)(char c);
100 typedef void (*on_report_handlers_init_ptr)(void);
101 typedef void (*on_report_options_ptr)(bool newopt);
102 typedef void (*on_report_ngc_parameters_ptr)(void);
103 typedef void (*on_report_command_help_ptr)(void);
104 typedef const char *(*on_setting_get_description_ptr)(setting_id_t id);
105 typedef void (*on_global_settings_restore_ptr)(void);
107 typedef void (*on_unknown_feedback_message_ptr)(stream_write_ptr stream_write);
108 typedef void (*on_stream_changed_ptr)(stream_type_t type);
109 typedef void (*on_mpg_registered_ptr)(io_stream_t *stream, bool tx_capable);
110 typedef bool (*on_laser_ppi_enable_ptr)(uint_fast16_t ppi, uint_fast16_t pulse_length);
111 typedef void (*on_homing_rate_set_ptr)(axes_signals_t axes, float rate, homing_mode_t mode);
112 
113 // NOTE: cycle contains the axis flags of the executed homing cycle, success will be true when all the configured cycles are completed.
114 typedef void (*on_homing_completed_ptr)(axes_signals_t cycle, bool success);
115 
116 typedef bool (*on_probe_toolsetter_ptr)(tool_data_t *tool, coord_data_t *position, bool at_g59_3, bool on);
117 typedef bool (*on_probe_start_ptr)(axes_signals_t axes, float *target, plan_line_data_t *pl_data);
118 typedef void (*on_probe_completed_ptr)(void);
119 typedef void (*on_tool_selected_ptr)(tool_data_t *tool);
120 typedef void (*on_tool_changed_ptr)(tool_data_t *tool);
121 typedef void (*on_toolchange_ack_ptr)(void);
122 typedef void (*on_reset_ptr)(void);
123 typedef void (*on_jog_cancel_ptr)(sys_state_t state);
124 typedef bool (*on_spindle_select_ptr)(spindle_ptrs_t *spindle);
125 typedef void (*on_spindle_selected_ptr)(spindle_ptrs_t *spindle);
126 typedef char *(*on_process_gcode_comment_ptr)(char *msg);
127 typedef status_code_t (*on_gcode_message_ptr)(char *msg);
129 typedef const char *(*on_set_axis_setting_unit_ptr)(setting_id_t setting_id, uint_fast8_t axis_idx);
130 typedef status_code_t (*on_file_open_ptr)(const char *fname, vfs_file_t *handle, bool stream);
132 typedef status_code_t (*on_unknown_sys_command_ptr)(sys_state_t state, char *line); // return Status_Unhandled.
133 typedef status_code_t (*on_user_command_ptr)(char *line);
134 typedef sys_commands_t *(*on_get_commands_ptr)(void);
135 typedef status_code_t (*on_macro_execute_ptr)(macro_id_t macro); // macro implementations _must_ claim hal.stream.read to stream macros!
136 typedef void (*on_macro_return_ptr)(void);
137 typedef void (*on_file_demarcate_ptr)(bool start);
138 
139 typedef tool_data_t *(*get_tool_ptr)(tool_id_t tool_id);
140 typedef tool_data_t *(*get_tool_by_idx_ptr)(uint32_t idx);
141 typedef bool (*set_tool_data_ptr)(tool_data_t *tool_data);
143 typedef bool (*clear_tool_data_ptr)(void);
144 
145 typedef struct {
146  uint32_t n_tools;
152 } tool_table_t;
153 
154 /*****************
155  * User M-code *
156  *****************/
157 
158 typedef enum {
163 
169 
191 
201 typedef void (*user_mcode_execute_ptr)(sys_state_t state, parser_block_t *gc_block);
202 
210 typedef struct {
215 
217 
218 typedef struct {
219  // report entry points set by core at reset.
221  //
223  // grbl core events - may be subscribed to by drivers or by the core.
277  // core entry points - set up by core before driver_init() is called.
286 } grbl_t;
287 
288 extern grbl_t grbl;
289 
290 /*EOF*/
alarm_code_t
Definition: alarms.h:28
alarm_details_t *(* on_get_alarms_ptr)(void)
Definition: alarms.h:64
void(* on_parser_init_ptr)(parser_state_t *gc_state)
Definition: core_handlers.h:87
const char *(* on_set_axis_setting_unit_ptr)(setting_id_t setting_id, uint_fast8_t axis_idx)
Definition: core_handlers.h:129
bool(* arc_limits_ptr)(coord_data_t *target, coord_data_t *position, point_2d_t center, float radius, plane_t plane, int32_t turns, work_envelope_t *envelope)
Definition: core_handlers.h:82
grbl_t grbl
Definition: grbllib.c:90
void(* on_spindle_selected_ptr)(spindle_ptrs_t *spindle)
Definition: core_handlers.h:125
void(* on_homing_rate_set_ptr)(axes_signals_t axes, float rate, homing_mode_t mode)
Definition: core_handlers.h:111
void(* on_report_options_ptr)(bool newopt)
Definition: core_handlers.h:101
void(* on_unknown_feedback_message_ptr)(stream_write_ptr stream_write)
Definition: core_handlers.h:107
void(* on_jog_cancel_ptr)(sys_state_t state)
Definition: core_handlers.h:123
void(* on_realtime_report_ptr)(stream_write_ptr stream_write, report_tracking_flags_t report)
Definition: core_handlers.h:106
status_code_t(* on_gcode_message_ptr)(char *msg)
Definition: core_handlers.h:127
void(* on_probe_completed_ptr)(void)
Definition: core_handlers.h:118
void(* on_toolchange_ack_ptr)(void)
Definition: core_handlers.h:121
const char *(* on_setting_get_description_ptr)(setting_id_t id)
Definition: core_handlers.h:104
void(* on_state_change_ptr)(sys_state_t state)
Definition: core_handlers.h:88
void(* on_spindle_programmed_ptr)(spindle_ptrs_t *spindle, spindle_state_t state, float rpm, spindle_rpm_mode_t mode)
Definition: core_handlers.h:90
bool(* on_laser_ppi_enable_ptr)(uint_fast16_t ppi, uint_fast16_t pulse_length)
Definition: core_handlers.h:110
void(* on_control_signals_changed_ptr)(control_signals_t signals)
Definition: core_handlers.h:98
bool(* on_probe_toolsetter_ptr)(tool_data_t *tool, coord_data_t *position, bool at_g59_3, bool on)
Definition: core_handlers.h:116
void(* apply_travel_limits_ptr)(float *target, float *position, work_envelope_t *envelope)
Definition: core_handlers.h:84
void(* on_report_ngc_parameters_ptr)(void)
Definition: core_handlers.h:102
void(* on_wco_saved_ptr)(coord_system_id_t id, coord_data_t *data)
Definition: core_handlers.h:93
bool(* set_tool_data_ptr)(tool_data_t *tool_data)
Definition: core_handlers.h:141
void(* on_unknown_accessory_override_ptr)(uint8_t cmd)
Definition: core_handlers.h:96
void(* on_homing_completed_ptr)(axes_signals_t cycle, bool success)
Definition: core_handlers.h:114
void(* on_reset_ptr)(void)
Definition: core_handlers.h:122
status_code_t(* on_file_end_ptr)(vfs_file_t *handle, status_code_t status)
Definition: core_handlers.h:131
void(* on_tool_changed_ptr)(tool_data_t *tool)
Definition: core_handlers.h:120
void(* on_tool_selected_ptr)(tool_data_t *tool)
Definition: core_handlers.h:119
tool_data_t *(* get_tool_ptr)(tool_id_t tool_id)
Definition: core_handlers.h:139
bool(* travel_limits_ptr)(float *target, axes_signals_t axes, bool is_cartesian, work_envelope_t *envelope)
Definition: core_handlers.h:81
void(* on_wco_changed_ptr)(void)
Definition: core_handlers.h:92
void(* on_spindle_at_speed_ptr)(spindle_ptrs_t *spindle, spindle_state_t state)
Definition: core_handlers.h:91
void(* on_macro_return_ptr)(void)
Definition: core_handlers.h:136
void(* on_execute_realtime_ptr)(sys_state_t state)
Definition: core_handlers.h:95
pocket_id_t(* get_pocket_ptr)(tool_id_t tool_id)
Definition: core_handlers.h:142
bool(* on_unknown_realtime_cmd_ptr)(char c)
Definition: core_handlers.h:99
void(* on_mpg_registered_ptr)(io_stream_t *stream, bool tx_capable)
Definition: core_handlers.h:109
void(* on_report_handlers_init_ptr)(void)
Definition: core_handlers.h:100
void(* init_message_ptr)(stream_write_ptr write)
Definition: core_handlers.h:61
status_code_t(* user_mcode_validate_ptr)(parser_block_t *gc_block)
Pointer to function for validating parameters for a user defined M-code.
Definition: core_handlers.h:190
status_code_t(* on_user_command_ptr)(char *line)
Definition: core_handlers.h:133
void(* on_override_changed_ptr)(override_changed_t override)
Definition: core_handlers.h:89
void(* help_message_ptr)(void)
Definition: core_handlers.h:62
bool(* protocol_enqueue_realtime_command_ptr)(char c)
Definition: core_handlers.h:80
override_changed_t
Definition: core_handlers.h:38
@ OverrideChanged_FanState
Definition: core_handlers.h:44
@ OverrideChanged_CoolantState
Definition: core_handlers.h:43
@ OverrideChanged_FeedRate
Definition: core_handlers.h:39
@ OverrideChanged_SpindleRPM
Definition: core_handlers.h:41
@ OverrideChanged_SpindleState
Definition: core_handlers.h:42
@ OverrideChanged_RapidRate
Definition: core_handlers.h:40
bool(* clear_tool_data_ptr)(void)
Definition: core_handlers.h:143
status_code_t(* on_unknown_sys_command_ptr)(sys_state_t state, char *line)
Definition: core_handlers.h:132
tool_data_t *(* get_tool_by_idx_ptr)(uint32_t idx)
Definition: core_handlers.h:140
user_mcode_type_t
Definition: core_handlers.h:158
@ UserMCode_Unsupported
0 - M-code is not supported.
Definition: core_handlers.h:159
@ UserMCode_Normal
1 - M-code is supported.
Definition: core_handlers.h:160
@ UserMCode_NoValueWords
2 - M-code supports valueless parameter words.
Definition: core_handlers.h:161
void(* on_program_completed_ptr)(program_flow_t program_flow, bool check_mode)
Definition: core_handlers.h:94
status_code_t(* status_message_ptr)(status_code_t status_code)
Definition: core_handlers.h:63
alarm_code_t(* alarm_message_ptr)(alarm_code_t alarm_code)
Definition: core_handlers.h:65
sys_commands_t *(* on_get_commands_ptr)(void)
Definition: core_handlers.h:134
bool(* on_spindle_select_ptr)(spindle_ptrs_t *spindle)
Definition: core_handlers.h:124
status_code_t(* on_macro_execute_ptr)(macro_id_t macro)
Definition: core_handlers.h:135
void(* on_rt_reports_added_ptr)(report_tracking_flags_t report)
Definition: core_handlers.h:128
void(* on_stream_changed_ptr)(stream_type_t type)
Definition: core_handlers.h:108
bool(* on_probe_start_ptr)(axes_signals_t axes, float *target, plan_line_data_t *pl_data)
Definition: core_handlers.h:117
void(* on_global_settings_restore_ptr)(void)
Definition: core_handlers.h:105
void(* user_mcode_execute_ptr)(sys_state_t state, parser_block_t *gc_block)
Pointer to function for executing a user defined M-code.
Definition: core_handlers.h:201
void(* on_cycle_start_ptr)(void)
Definition: core_handlers.h:97
void(* on_report_command_help_ptr)(void)
Definition: core_handlers.h:103
void(* on_file_demarcate_ptr)(bool start)
Definition: core_handlers.h:137
settings_changed_ptr on_settings_changed_ptr
Definition: core_handlers.h:216
status_code_t(* on_file_open_ptr)(const char *fname, vfs_file_t *handle, bool stream)
Definition: core_handlers.h:130
bool(* home_machine_ptr)(axes_signals_t cycle, axes_signals_t auto_square)
Definition: core_handlers.h:85
user_mcode_type_t(* user_mcode_check_ptr)(user_mcode_t mcode)
Pointer to function for checking if user defined M-code is supported.
Definition: core_handlers.h:168
bool(* enqueue_gcode_ptr)(char *data)
Definition: core_handlers.h:79
char *(* on_process_gcode_comment_ptr)(char *msg)
Definition: core_handlers.h:126
message_code_t(* feedback_message_ptr)(message_code_t message_code)
Definition: core_handlers.h:64
error_details_t *(* on_get_errors_ptr)(void)
Definition: errors.h:138
status_code_t
Definition: errors.h:30
DCRAM parser_state_t gc_state
Definition: gcode.c:126
int32_t tool_id_t
Definition: gcode.h:34
user_mcode_t
Definition: gcode.h:232
program_flow_t
Definition: gcode.h:196
uint16_t macro_id_t
Definition: gcode.h:36
int16_t pocket_id_t
Definition: gcode.h:35
coord_system_id_t
Definition: gcode.h:162
homing_mode_t
Definition: machine_limits.h:30
message_code_t
Definition: messages.h:26
setting_details_t *(* on_get_settings_ptr)(void)
Definition: settings.h:1110
bool(* setting_output_ptr)(const setting_detail_t *setting, uint_fast16_t offset, void *data)
Definition: settings.h:1075
setting_id_t
Definition: settings.h:47
void(* settings_changed_ptr)(settings_t *settings, settings_changed_flags_t changed)
Pointer to callback function to be called when settings are loaded or changed.
Definition: settings.h:1083
spindle_rpm_mode_t
Definition: spindle_control.h:134
void(* stream_write_ptr)(const char *s)
Pointer to function for writing a null terminated string to the output stream.
Definition: stream.h:159
bool(* enqueue_realtime_command_ptr)(uint8_t c)
Pointer to function for extracting real-time commands from the input stream and enqueue them for proc...
Definition: stream.h:178
stream_type_t
Definition: stream.h:82
Definition: core_handlers.h:218
on_control_signals_changed_ptr on_control_signals_changed
Called from interrupt context. NOTE: this is only for cycle start and some of the optional signals.
Definition: core_handlers.h:249
enqueue_gcode_ptr enqueue_gcode
Definition: core_handlers.h:282
arc_limits_ptr check_arc_travel_limits
Definition: core_handlers.h:280
on_rt_reports_added_ptr on_rt_reports_added
Definition: core_handlers.h:239
home_machine_ptr home_machine
Definition: core_handlers.h:278
on_settings_changed_ptr on_settings_changed
Called on initial settings load and on setting changes.
Definition: core_handlers.h:240
on_file_open_ptr on_file_open
Called when a file is opened for streaming.
Definition: core_handlers.h:274
on_probe_completed_ptr on_probe_completed
Definition: core_handlers.h:260
on_reset_ptr on_reset
Called from interrupt context.
Definition: core_handlers.h:272
on_spindle_programmed_ptr on_spindle_programmed
Definition: core_handlers.h:228
on_execute_realtime_ptr on_execute_realtime
Definition: core_handlers.h:233
on_mpg_registered_ptr on_mpg_registered
Definition: core_handlers.h:255
enqueue_realtime_command_ptr enqueue_realtime_command
Definition: core_handlers.h:283
on_homing_completed_ptr on_homing_completed
Definition: core_handlers.h:257
on_unknown_accessory_override_ptr on_unknown_accessory_override
Definition: core_handlers.h:235
on_set_axis_setting_unit_ptr on_set_axis_setting_unit
Definition: core_handlers.h:261
on_unknown_sys_command_ptr on_unknown_sys_command
Return Status_Unhandled if not handled.
Definition: core_handlers.h:251
on_unknown_realtime_cmd_ptr on_unknown_realtime_cmd
Called from interrupt context.
Definition: core_handlers.h:250
on_gcode_message_ptr on_gcode_message
Called on output of message parsed from gcode. NOTE: string pointed to is freed after this call.
Definition: core_handlers.h:263
on_file_end_ptr on_file_end
Called when a file opened for streaming reaches the end.
Definition: core_handlers.h:275
report_t report
Definition: core_handlers.h:220
on_global_settings_restore_ptr on_global_settings_restore
Definition: core_handlers.h:241
on_wco_saved_ptr on_wco_saved
Definition: core_handlers.h:231
on_override_changed_ptr on_override_changed
Definition: core_handlers.h:226
on_parser_init_ptr on_parser_init
Definition: core_handlers.h:224
on_execute_realtime_ptr on_execute_delay
Definition: core_handlers.h:234
user_mcode_ptrs_t user_mcode
Optional handlers for user defined M-codes.
Definition: core_handlers.h:276
on_spindle_at_speed_ptr on_spindle_at_speed
Definition: core_handlers.h:229
apply_travel_limits_ptr apply_travel_limits
Definition: core_handlers.h:281
on_wco_changed_ptr on_wco_changed
Definition: core_handlers.h:230
on_unknown_feedback_message_ptr on_unknown_feedback_message
Definition: core_handlers.h:247
on_cycle_start_ptr on_cycle_start
Called from interrupt context. NOTE: this is for the cycle start signal.
Definition: core_handlers.h:248
on_homing_rate_set_ptr on_homing_rate_set
Definition: core_handlers.h:256
on_gcode_message_ptr on_gcode_comment
Called when a plain gcode comment has been parsed.
Definition: core_handlers.h:264
on_toolchange_ack_ptr on_toolchange_ack
Called from interrupt context.
Definition: core_handlers.h:267
on_tool_changed_ptr on_tool_changed
Called after executing M6 or M61.
Definition: core_handlers.h:266
on_realtime_report_ptr on_realtime_report
Definition: core_handlers.h:246
on_stream_changed_ptr on_stream_changed
Definition: core_handlers.h:254
on_tool_selected_ptr on_tool_selected
Called prior to executing M6 or after executing M61.
Definition: core_handlers.h:265
on_report_handlers_init_ptr on_report_handlers_init
Definition: core_handlers.h:227
on_report_command_help_ptr on_report_command_help
Deprecated, use system_register_commands() to register new commands.
Definition: core_handlers.h:238
tool_table_t tool_table
Definition: core_handlers.h:222
on_jog_cancel_ptr on_jog_cancel
Called from interrupt context.
Definition: core_handlers.h:268
on_report_options_ptr on_report_options
Definition: core_handlers.h:236
on_macro_return_ptr on_macro_return
NOTE: will be cleared on a hal.driver_reset call.
Definition: core_handlers.h:285
on_probe_start_ptr on_probe_start
Definition: core_handlers.h:259
on_probe_toolsetter_ptr on_probe_toolsetter
Definition: core_handlers.h:258
on_spindle_selected_ptr on_spindle_selected
Called when spindle is selected, do not change HAL pointers here!
Definition: core_handlers.h:271
on_get_commands_ptr on_get_commands
Deprecated, use system_register_commands() to register new commands.
Definition: core_handlers.h:252
on_get_errors_ptr on_get_errors
Definition: core_handlers.h:244
on_program_completed_ptr on_program_completed
Definition: core_handlers.h:232
on_macro_execute_ptr on_macro_execute
Definition: core_handlers.h:284
on_process_gcode_comment_ptr on_process_gcode_comment
Definition: core_handlers.h:262
on_setting_get_description_ptr on_setting_get_description
Definition: core_handlers.h:242
on_spindle_select_ptr on_spindle_select
Called before spindle is selected, hook in HAL overrides here.
Definition: core_handlers.h:270
travel_limits_ptr check_travel_limits
Definition: core_handlers.h:279
on_file_demarcate_ptr on_file_demarcate
Called when percent sign is parsed in the gcode stream.
Definition: core_handlers.h:273
on_laser_ppi_enable_ptr on_laser_ppi_enable
Definition: core_handlers.h:269
on_get_settings_ptr on_get_settings
Definition: core_handlers.h:245
on_report_ngc_parameters_ptr on_report_ngc_parameters
Definition: core_handlers.h:237
on_user_command_ptr on_user_command
Definition: core_handlers.h:253
on_state_change_ptr on_state_change
Definition: core_handlers.h:225
on_get_alarms_ptr on_get_alarms
Definition: core_handlers.h:243
Properties and handlers for stream I/O.
Definition: stream.h:290
Parser block structure.
Definition: gcode.h:645
Parser state.
Definition: gcode.h:600
Definition: planner.h:120
Definition: core_handlers.h:67
init_message_ptr init_message
Prints system welcome message.
Definition: core_handlers.h:68
feedback_message_ptr feedback_message
Prints miscellaneous feedback messages.
Definition: core_handlers.h:71
alarm_message_ptr alarm_message
Prints alarm message.
Definition: core_handlers.h:72
setting_output_ptr setting
Definition: core_handlers.h:73
status_message_ptr status_message
Prints system status messages.
Definition: core_handlers.h:70
help_message_ptr help_message
Prints system help message.
Definition: core_handlers.h:69
Handlers and data for spindle support.
Definition: spindle_control.h:305
Definition: system.h:366
Tool data.
Definition: gcode.h:586
Definition: core_handlers.h:145
uint32_t n_tools
Definition: core_handlers.h:146
clear_tool_data_ptr clear
Definition: core_handlers.h:151
get_pocket_ptr get_pocket
Definition: core_handlers.h:150
set_tool_data_ptr set_tool
Definition: core_handlers.h:149
get_tool_ptr get_tool
Definition: core_handlers.h:147
get_tool_by_idx_ptr get_tool_by_idx
Definition: core_handlers.h:148
Optional handlers for user defined M-codes.
Definition: core_handlers.h:210
user_mcode_execute_ptr execute
Handler for executing a user defined M-code.
Definition: core_handlers.h:213
user_mcode_validate_ptr validate
Handler for validating parameters for a user defined M-code.
Definition: core_handlers.h:212
user_mcode_check_ptr check
Handler for checking if a user defined M-code is supported.
Definition: core_handlers.h:211
Definition: vfs.h:81
Definition: system.h:286
uint_fast16_t sys_state_t
See sys_state.
Definition: system.h:147
Definition: nuts_bolts.h:123
Definition: nuts_bolts.h:250
Coordinate data.
Definition: nuts_bolts.h:140
Axis index to plane assignment.
Definition: gcode.h:372
Definition: nuts_bolts.h:208
Definition: system.h:213
Definition: spindle_control.h:59