Sergey Pastor / grbl1
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers probe.h Source File

probe.h

00001 /*
00002   probe.h - code pertaining to probing methods
00003   Part of Grbl
00004 
00005   Copyright (c) 2014-2016 Sungeun K. Jeon for Gnea Research LLC
00006 
00007   Grbl is free software: you can redistribute it and/or modify
00008   it under the terms of the GNU General Public License as published by
00009   the Free Software Foundation, either version 3 of the License, or
00010   (at your option) any later version.
00011 
00012   Grbl is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015   GNU General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License
00018   along with Grbl.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #ifndef probe_h
00022 #define probe_h
00023 
00024 // Values that define the probing state machine.
00025 #define PROBE_OFF     0 // Probing disabled or not in use. (Must be zero.)
00026 #define PROBE_ACTIVE  1 // Actively watching the input pin.
00027 
00028 // Probe pin initialization routine.
00029 void probe_init();
00030 
00031 // Called by probe_init() and the mc_probe() routines. Sets up the probe pin invert mask to
00032 // appropriately set the pin logic according to setting for normal-high/normal-low operation
00033 // and the probing cycle modes for toward-workpiece/away-from-workpiece.
00034 void probe_configure_invert_mask(uint8_t is_probe_away);
00035 
00036 // Returns probe pin state. Triggered = true. Called by gcode parser and probe state monitor.
00037 uint8_t probe_get_state();
00038 
00039 // Monitors probe pin state and records the system position when detected. Called by the
00040 // stepper ISR per ISR tick.
00041 void probe_state_monitor();
00042 
00043 #endif