Committer:
Sergunb
Date:
Mon Sep 04 12:04:13 2017 +0000
Revision:
0:8f0d870509fe
Initial commit

Who changed what in which revision?

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