grblHAL core  20240318
probe.h
Go to the documentation of this file.
1 /*
2  probe.h - An embedded CNC Controller with rs274/ngc (g-code) support
3 
4  Part of grblHAL
5 
6  Copyright (c) 2020-2024 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 
22 #ifndef _PROBE_H_
23 #define _PROBE_H_
24 
25 // Values that define the probing state machine.
26 
27 typedef enum {
31 
32 typedef union {
33  uint8_t value;
34  struct {
35  uint8_t triggered :1, //<! Set to true when probe is triggered.
36  connected :1, //<! Set to true when probe is connected. Always set to true if the driver does not have a probe connected input.
37  inverted :1, //<! For driver use
38  is_probing :1, //<! For driver use
39  irq_enabled :1, //<! For driver use
41  };
43 
44 #endif
probing_state_t
Definition: probe.h:27
@ Probing_Off
0
Definition: probe.h:28
@ Probing_Active
1
Definition: probe.h:29
Definition: probe.h:32
uint8_t unassigned
Definition: probe.h:40
uint8_t triggered
Definition: probe.h:35
uint8_t value
Definition: probe.h:33
uint8_t irq_enabled
Definition: probe.h:39
uint8_t connected
Definition: probe.h:36
uint8_t inverted
Definition: probe.h:37
uint8_t is_probing
Definition: probe.h:38