Files
grblHAL/coolant_control.h
T
Terje Io fb60b493b5 Added settings, updated settings version to 22. See changelog for details.
Merged defaults.h with config.h, deleted defaults.h and harmonized settings defines.
2023-01-25 21:11:21 +01:00

45 lines
1.6 KiB
C

/*
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