gnea\grbl-Mega  1.0f
Source Code Documentation ( Internal Workings )
grbl.h
Go to the documentation of this file.
1 /*
2  grbl.h - main Grbl include file
3  Part of Grbl
4 
5  Copyright (c) 2015-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 grbl_h
22 #define grbl_h
23 #define GRBL_VERSION "1.1e"
25 #define GRBL_VERSION_BUILD "20170114"
26 #include <avr/io.h>
28 #include <avr/pgmspace.h>
29 #include <avr/interrupt.h>
30 #include <avr/wdt.h>
31 #include <util/delay.h>
32 #include <math.h>
33 #include <inttypes.h>
34 #include <string.h>
35 #include <stdlib.h>
36 #include <stdint.h>
37 #include <stdbool.h>
40 #include "config.h"
41 #include "nuts_bolts.h"
42 #include "settings.h"
43 #include "system.h"
44 #include "defaults.h"
45 #include "cpu_map.h"
46 #include "planner.h"
47 #include "coolant_control.h"
48 #include "eeprom.h"
49 #include "gcode.h"
50 #include "limits.h"
51 #include "motion_control.h"
52 #include "planner.h"
53 #include "print.h"
54 #include "probe.h"
55 #include "protocol.h"
56 #include "report.h"
57 #include "serial.h"
58 #include "spindle_control.h"
59 #include "stepper.h"
60 #include "jog.h"
61 #include "sleep.h"
63 // COMPILE-TIME ERROR CHECKING OF DEFINE VALUES:
64 
65 #ifndef HOMING_CYCLE_0
66  #error "Required HOMING_CYCLE_0 not defined."
67 #endif
68 
69 #if defined(PARKING_ENABLE)
70  #if defined(HOMING_FORCE_SET_ORIGIN)
71  #error "HOMING_FORCE_SET_ORIGIN is not supported with PARKING_ENABLE at this time."
72  #endif
73 #endif
74 
75 #if defined(SPINDLE_PWM_MIN_VALUE)
76  #if !(SPINDLE_PWM_MIN_VALUE > 0)
77  #error "SPINDLE_PWM_MIN_VALUE must be greater than zero."
78  #endif
79 #endif
80 
81 #if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
82  #error "WCO busy refresh is less than idle refresh."
83 #endif
84 #if (REPORT_OVR_REFRESH_BUSY_COUNT < REPORT_OVR_REFRESH_IDLE_COUNT)
85  #error "Override busy refresh is less than idle refresh."
86 #endif
87 #if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
88  #error "WCO refresh must be greater than one."
89 #endif
90 #if (REPORT_OVR_REFRESH_IDLE_COUNT < 1)
91  #error "Override refresh must be greater than zero."
92 #endif
93 // ---------------------------------------------------------------------------------------
94 
95 #endif