grblHAL core  20260824
ngc_flowctrl.h
Go to the documentation of this file.
1 /*
2  ngc_flowctrl.h - An embedded CNC Controller with rs274/ngc (g-code) support
3 
4  Program flow control, for filesystem macros
5 
6  Part of grblHAL
7 
8  Copyright (c) 2023-2026 Terje Io
9 
10  grblHAL is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  grblHAL is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
22 */
23 
24 #ifndef _NGC_FLOWCTRL_H_
25 #define _NGC_FLOWCTRL_H_
26 
27 typedef void (*on_endsub_ptr) (uint32_t o_label, bool success);
28 
29 void ngc_flowctrl_init (void);
31 bool ngc_flowctrl_on_endsub_callback (uint32_t o_label, on_endsub_ptr callback);
32 status_code_t ngc_flowctrl (uint32_t o_label, line_number_t line_number, char *line, uint_fast8_t *pos, bool *skip);
33 
34 #endif
status_code_t
Definition: errors.h:31
status_code_t ngc_flowctrl(uint32_t o_label, line_number_t line_number, char *line, uint_fast8_t *pos, bool *skip)
void(* on_endsub_ptr)(uint32_t o_label, bool success)
Definition: ngc_flowctrl.h:27
void ngc_flowctrl_unwind_stack(vfs_file_t *file)
bool ngc_flowctrl_on_endsub_callback(uint32_t o_label, on_endsub_ptr callback)
void ngc_flowctrl_init(void)
uint32_t line_number_t
Definition: nuts_bolts.h:246
Definition: vfs.h:95