forked from grblHAL/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coolant_control.h
44 lines (34 loc) · 1.57 KB
/
coolant_control.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
coolant_control.h - spindle control methods
Part of grblHAL
Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _COOLANT_CONTROL_H_
#define _COOLANT_CONTROL_H_
// if changed to > 8 bits planner_cond_t needs to be changed too
typedef union {
uint8_t value; //!< Bitmask value
uint8_t mask; //!< Synonym for bitmask value
struct {
uint8_t flood :1, //!< Flood coolant.
mist :1, //!< Mist coolant, optional.
shower :1, //!< Shower coolant, currently unused.
trough_spindle :1, //!< Through spindle coolant, currently unused.
unused :4;
};
} coolant_state_t;
// Sets the coolant pins according to state specified.
void coolant_set_state(coolant_state_t mode);
// G-code parser entry-point for setting coolant states. Checks for and executes additional conditions.
bool coolant_sync(coolant_state_t mode);
#endif