/* Config.h - compile time configuration Part of Grbl-Advanced Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC Copyright (c) 2009-2011 Simen Svale Skogsrud Copyright (c) 2017 Patrick F. Grbl-Advanced 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-Advanced 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-Advanced. If not, see . */ // This file contains compile-time configurations for Grbl's internal system. For the most part, // users will not need to directly modify these, but they are here for specific needs, i.e. // performance tuning or adjusting to non-typical machines. // IMPORTANT: Any changes here requires a full re-compiling of the source code to propagate them. #ifndef CONFIG_H #define CONFIG_H #define GRBL_VERSION "1.1" #define GRBL_VERSION_BUILD __DATE__ // Define CPU pin map and default settings. // NOTE: OEMs can avoid the need to maintain/update the defaults.h and cpu_map.h files and use only // one configuration file by placing their specific defaults and pin map at the bottom of this file. // If doing so, simply comment out these two defines and see instructions below. #define DEFAULTS_GENERIC // Serial baud rate #define BAUD_RATE 115200 //#define BAUD_RATE 230400 // Uncomment to use external I2C EEPROM //#define USE_EXT_EEPROM // Uncomment to use 4th/5th axis //#define USE_MULTI_AXIS // Define realtime command special characters. These characters are 'picked-off' directly from the // serial read data stream and are not passed to the grbl line execution parser. Select characters // that do not and must not exist in the streamed g-code program. ASCII control characters may be // used, if they are available per user setup. Also, extended ASCII codes (>127), which are never in // g-code programs, maybe selected for interface programs. // NOTE: If changed, manually update help message in report.c. #define CMD_RESET 0x18 // ctrl-x. #define CMD_RESET_HARD 0x19 // ctrl-y. #define CMD_STATUS_REPORT '?' #define CMD_CYCLE_START '~' #define CMD_FEED_HOLD '!' #define CMD_STEPPER_DISABLE 0x17 // NOTE: All override realtime commands must be in the extended ASCII character set, starting // at character value 128 (0x80) and up to 255 (0xFF). If the normal set of realtime commands, // such as status reports, feed hold, reset, and cycle start, are moved to the extended set // space, serial.c's RX ISR will need to be modified to accomodate the change. // #define CMD_RESET 0x80 // #define CMD_STATUS_REPORT 0x81 // #define CMD_CYCLE_START 0x82 // #define CMD_FEED_HOLD 0x83 #define CMD_SAFETY_DOOR 0x84 #define CMD_JOG_CANCEL 0x85 #define CMD_DEBUG_REPORT 0x86 // Only when DEBUG enabled, sends debug report in '{}' braces. #define CMD_FEED_OVR_RESET 0x90 // Restores feed override value to 100%. #define CMD_FEED_OVR_COARSE_PLUS 0x91 #define CMD_FEED_OVR_COARSE_MINUS 0x92 #define CMD_FEED_OVR_FINE_PLUS 0x93 #define CMD_FEED_OVR_FINE_MINUS 0x94 #define CMD_RAPID_OVR_RESET 0x95 // Restores rapid override value to 100%. #define CMD_RAPID_OVR_MEDIUM 0x96 #define CMD_RAPID_OVR_LOW 0x97 //#define CMD_RAPID_OVR_EXTRA_LOW 0x98 // *NOT SUPPORTED* #define CMD_SPINDLE_OVR_RESET 0x99 // Restores spindle override value to 100%. #define CMD_SPINDLE_OVR_COARSE_PLUS 0x9A #define CMD_SPINDLE_OVR_COARSE_MINUS 0x9B #define CMD_SPINDLE_OVR_FINE_PLUS 0x9C #define CMD_SPINDLE_OVR_FINE_MINUS 0x9D #define CMD_SPINDLE_OVR_STOP 0x9E #define CMD_COOLANT_FLOOD_OVR_TOGGLE 0xA0 #define CMD_COOLANT_MIST_OVR_TOGGLE 0xA1 // If homing is enabled, homing init lock sets Grbl into an alarm state upon power up. This forces // the user to perform the homing cycle (or override the locks) before doing anything else. This is // mainly a safety feature to remind the user to home, since position is unknown to Grbl. #define HOMING_INIT_LOCK // Comment to disable // Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode // to quickly engage the limit switches, followed by a slower locate mode, and finished by a short // pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed // in order starting with suffix 0 and completes the homing routine for the specified-axes only. If // an axis is omitted from the defines, it will not home, nor will the system update its position. // Meaning that this allows for users with non-standard cartesian machines, such as a lathe (x then z, // with no y), to configure the homing cycle behavior to their needs. // NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same // cycle, but this requires some pin settings changes in cpu_map.h file. For example, the default homing // cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles. // By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins // may be reduced to one pin, if all axes are homed with seperate cycles, or vice versa, all three axes // on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits // will not be affected by pin sharing. // NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y. #define HOMING_CYCLE_0 (1<