grblHAL core  20240318
coolant_control.h
Go to the documentation of this file.
1 /*
2  coolant_control.h - spindle control methods
3 
4  Part of grblHAL
5 
6  Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
7 
8  Grbl 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  Grbl 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 Grbl. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #ifndef _COOLANT_CONTROL_H_
23 #define _COOLANT_CONTROL_H_
24 
25 // if changed to > 8 bits planner_cond_t needs to be changed too
26 typedef union {
27  uint8_t value;
28  uint8_t mask;
29  struct {
30  uint8_t flood :1,
31  mist :1,
32  shower :1,
34  unused :4;
35  };
37 
38 // Sets the coolant pins according to state specified.
40 
41 // G-code parser entry-point for setting coolant states. Checks for and executes additional conditions.
42 bool coolant_sync(coolant_state_t mode);
43 
44 #endif
void coolant_set_state(coolant_state_t mode)
Definition: coolant_control.c:35
bool coolant_sync(coolant_state_t mode)
Definition: coolant_control.c:45
Definition: coolant_control.h:26
uint8_t trough_spindle
Through spindle coolant, currently unused.
Definition: coolant_control.h:33
uint8_t value
Bitmask value.
Definition: coolant_control.h:27
uint8_t mask
Synonym for bitmask value.
Definition: coolant_control.h:28
uint8_t shower
Shower coolant, currently unused.
Definition: coolant_control.h:32
uint8_t mist
Mist coolant, optional.
Definition: coolant_control.h:31
uint8_t flood
Flood coolant.
Definition: coolant_control.h:30
uint8_t unused
Definition: coolant_control.h:34