blob: 49b85f00091dbeefbc38aae65c4d98c757fc884a [file] [log] [blame]
Luigi Santivetti69972f92019-11-12 22:55:40 +00001/*
2 coolant_control.h - spindle control methods
3 Part of Grbl
4
5 Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
6
7 Grbl is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Grbl is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Grbl. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef coolant_control_h
22#define coolant_control_h
23
24#define COOLANT_NO_SYNC false
25#define COOLANT_FORCE_SYNC true
26
27#define COOLANT_STATE_DISABLE 0 // Must be zero
28#define COOLANT_STATE_FLOOD PL_COND_FLAG_COOLANT_FLOOD
29#define COOLANT_STATE_MIST PL_COND_FLAG_COOLANT_MIST
30
31
32// Initializes coolant control pins.
33void coolant_init();
34
35// Returns current coolant output state. Overrides may alter it from programmed state.
36uint8_t coolant_get_state();
37
38// Immediately disables coolant pins.
39void coolant_stop();
40
41// Sets the coolant pins according to state specified.
42void coolant_set_state(uint8_t mode);
43
44// G-code parser entry-point for setting coolant states. Checks for and executes additional conditions.
45void coolant_sync(uint8_t mode);
46
47#endif