diff --git a/driver.json b/driver.json index b8ded2d..b92b8a6 100644 --- a/driver.json +++ b/driver.json @@ -90,6 +90,21 @@ "pwm_spindle_aux": 2 } }, + { + "name": "MKS DLC32 2.0", + "symbol": "BOARD_MKS_DLC32_V2P0", + "URL": "https://github.com/makerbase-mks/MKS-DLC32", + "MAP": "main/boards/mks_dlc32_2_0_map.h", + "caps": { + "axes": 3, + "digital_in": 1, + "digital_out": 4, + "safety_door": 0, + "pwm_spindle_aux": 2, + "sdcard": 1, + "i2c": 0 + } + }, { "name": "MKS Tinybee V1.0", "symbol": "BOARD_MKS_TINYBEE_V1", @@ -164,20 +179,6 @@ "trinamic_spi_chain": 1 } }, - { - "name": "MKS DLC32 2.0", - "symbol": "BOARD_MKS_DLC32_V2P0", - "URL": "https://github.com/makerbase-mks/MKS-DLC32", - "MAP": "main/boards/mks_dlc32_2_0_map.h", - "caps": { - "axes": 3, - "digital_in": 1, - "digital_out": 4, - "pwm_spindle_aux": 2, - "sdcard": 1, - "i2c": 1 - } - }, { "name": "Root CNC v2.x", "notes": "Not tested!", diff --git a/main/boards/BlackBoxX32_map.h b/main/boards/BlackBoxX32_map.h index f16d121..c280b65 100644 --- a/main/boards/BlackBoxX32_map.h +++ b/main/boards/BlackBoxX32_map.h @@ -28,6 +28,14 @@ #error "Axis configuration is not supported!" #endif +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + +#if TRINAMIC_ENABLE +#error BlackBox X32 does not use Trinamic drivers +#endif + #define BOARD_NAME "BlackBox X32" #define BOARD_URL "https://docs.openbuilds.com/doku.php?id=docs:blackbox-x32:start" #if N_AUTO_SQUARED || N_AXIS > 3 @@ -121,15 +129,3 @@ // #if SDCARD_ENABLE #define PIN_NUM_CS GPIO_NUM_5 // #endif - -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED -#error BlackBox X32 does not support Modbus -#endif - -#if KEYPAD_ENABLE -#error BlackBox X32 does not support Keypad -#endif - -#if TRINAMIC_ENABLE -#error BlackBox X32 does not use Trinamic drivers -#endif diff --git a/main/boards/bdring_i2s_6_axis_map.h b/main/boards/bdring_i2s_6_axis_map.h index 8e215bb..117fab5 100644 --- a/main/boards/bdring_i2s_6_axis_map.h +++ b/main/boards/bdring_i2s_6_axis_map.h @@ -23,6 +23,10 @@ #define BOARD_NAME "BDRING 6-axis I2S" +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define USE_I2S_OUT #define I2S_OUT_PIN_BASE 64 @@ -121,7 +125,7 @@ #define MOTOR_CS_PIN I2SO(3) #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_15 #define UART2_TX_PIN GPIO_NUM_14 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED @@ -134,6 +138,3 @@ #define PROBE_PIN GPIO_NUM_25 #endif -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif diff --git a/main/boards/bdring_i2s_6pack_ext_v2_map.h b/main/boards/bdring_i2s_6pack_ext_v2_map.h index 3713bec..0a0cae2 100644 --- a/main/boards/bdring_i2s_6pack_ext_v2_map.h +++ b/main/boards/bdring_i2s_6pack_ext_v2_map.h @@ -116,7 +116,7 @@ // N/A -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_15 #define UART2_TX_PIN GPIO_NUM_14 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED diff --git a/main/boards/bdring_v4_map.h b/main/boards/bdring_v4_map.h index 4126f57..3e536fe 100644 --- a/main/boards/bdring_v4_map.h +++ b/main/boards/bdring_v4_map.h @@ -25,6 +25,10 @@ #error "Axis configuration is not supported!" #endif +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define BOARD_NAME "BDRING v4" // timer definitions @@ -91,7 +95,7 @@ #define PIN_NUM_CS GPIO_NUM_5 #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_22 #define UART2_TX_PIN GPIO_NUM_21 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED @@ -99,6 +103,3 @@ #endif #endif -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif diff --git a/main/boards/cnc3040_map.h b/main/boards/cnc3040_map.h index 86179e4..5bb1558 100644 --- a/main/boards/cnc3040_map.h +++ b/main/boards/cnc3040_map.h @@ -25,6 +25,14 @@ #error "Axis configuration is not supported!" #endif +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + +#if SDCARD_ENABLE +#error SD card not supported! +#endif + #define BOARD_NAME "CNC3040 4-axis CNC" #define BOARD_URL "https://github.com/shaise/GrblCNC/tree/master/Hardware/GrblCnc3040" @@ -32,19 +40,9 @@ #define STEP_TIMER_GROUP TIMER_GROUP_0 #define STEP_TIMER_INDEX TIMER_0 -#if MODBUS_ENABLE -#error VFD Spindle not supported! -#endif - -#if KEYPAD_ENABLE == 2 -#define UART2_TX_PIN GPIO_NUM_17 -#define UART2_RX_PIN GPIO_NUM_16 -#elif KEYPAD_ENABLE == 1 -#error I2C Keypad not supported! -#endif - -#if SDCARD_ENABLE -#error SD card not supported! +#ifdef ADD_SERIAL2 +#define UART2_TX_PIN GPIO_NUM_17 +#define UART2_RX_PIN GPIO_NUM_16 #endif // Define step pulse output pins. diff --git a/main/boards/cnc_boosterpack_map.h b/main/boards/cnc_boosterpack_map.h index 6d6bfee..0d272ab 100644 --- a/main/boards/cnc_boosterpack_map.h +++ b/main/boards/cnc_boosterpack_map.h @@ -112,17 +112,16 @@ #define AUXINPUT0_PIN GPIO_NUM_33 #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_33 +#if MPG_MODE == 1 +#define MPG_ENABLE_PIN GPIO_NUM_25 +#else #define UART2_TX_PIN GPIO_NUM_25 -#if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED -#define MODBUS_DIRECTION_PIN GPIO_NUM_25 #endif +#if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED +#define MODBUS_DIRECTION_PIN GPIO_NUM_25 //?? #endif - -#if MPG_MODE == 1 -#define UART2_RX_PIN GPIO_NUM_33 -#define MPG_ENABLE_PIN GPIO_NUM_25 #endif // Define I2C port/pins diff --git a/main/boards/cnc_boosterpack_s3_map.h b/main/boards/cnc_boosterpack_s3_map.h index 6a0611d..c3d20cb 100644 --- a/main/boards/cnc_boosterpack_s3_map.h +++ b/main/boards/cnc_boosterpack_s3_map.h @@ -104,7 +104,7 @@ #define AUXINPUT0_PIN GPIO_NUM_33 #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_33 #define UART2_TX_PIN GPIO_NUM_25 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED diff --git a/main/boards/espduino-32_wemos_d1_r32_uno_map.h b/main/boards/espduino-32_wemos_d1_r32_uno_map.h index aa501c2..d52f5b9 100644 --- a/main/boards/espduino-32_wemos_d1_r32_uno_map.h +++ b/main/boards/espduino-32_wemos_d1_r32_uno_map.h @@ -90,7 +90,7 @@ #define PROBE_PIN GPIO_NUM_39 #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_33 #define UART2_TX_PIN GPIO_NUM_32 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED diff --git a/main/boards/fysetc_e4_map.h b/main/boards/fysetc_e4_map.h index 3336f87..f6f6fd7 100644 --- a/main/boards/fysetc_e4_map.h +++ b/main/boards/fysetc_e4_map.h @@ -27,6 +27,10 @@ #error "Fystec E4 board does not have support for VFD spindle." #endif +#if KEYPAD_ENABLE +#error No free pins for I2C keypad! +#endif + #define BOARD_NAME "Fysetc E4 v1.0" // timer definitions @@ -89,6 +93,7 @@ #define CYCLE_START_PIN GPIO_NUM_39 #if SAFETY_DOOR_ENABLE #if !I2C_ENABLE +#define AUXINPUT0_PIN GPIO_NUM_22 #define SAFETY_DOOR_PIN GPIO_NUM_22 #else #warning No free pin for safety door input! @@ -104,10 +109,6 @@ #endif #endif -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif - #if I2C_ENABLE // Define I2C port/pins #define I2C_PORT I2C_NUM_1 diff --git a/main/boards/generic_map.h b/main/boards/generic_map.h index a9acb13..f80c415 100644 --- a/main/boards/generic_map.h +++ b/main/boards/generic_map.h @@ -1,109 +1,119 @@ /* -Driver code for ESP32 + generic_map.h - driver code for ESP32 -Part of grblHAL + Part of grblHAL -Copyright (c) 2020-2023 Terje Io + Copyright (c) 2020-2023 Terje Io -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 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. + 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/. + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . */ -#if VFD_SPINDLE -#error "Board RDS does not have support for VFD spindle." +#if N_ABC_MOTORS > 0 +#error "Axis configuration is not supported!" #endif -#define BOARD_NAME "RDS" #if VFD_SPINDLE #error "Generic map does not have support for VFD spindle." #endif -#define USE_I2S_OUT -#define I2S_OUT_BCK GPIO_NUM_13 -#define I2S_OUT_WS GPIO_NUM_12 -#define I2S_OUT_DATA GPIO_NUM_14 +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif // timer definitions -#define STEP_TIMER_GROUP TIMER_GROUP_0 -#define STEP_TIMER_INDEX TIMER_0 +#define STEP_TIMER_GROUP TIMER_GROUP_0 +#define STEP_TIMER_INDEX TIMER_0 -// Define step pulse output pin27 -#define X_STEP_PIN I2SO(1) -#define Y_STEP_PIN I2SO(3) -#define Z_STEP_PIN I2SO(5) +// Define step pulse output pins. +#define X_STEP_PIN GPIO_NUM_12 +#define Y_STEP_PIN GPIO_NUM_14 +#define Z_STEP_PIN GPIO_NUM_27 // Define step direction output pins. NOTE: All direction pins must be on the same port. -#define X_DIRECTION_PIN I2SO(2) -#define Y_DIRECTION_PIN I2SO(4) -#define Z_DIRECTION_PIN I2SO(6) +#define X_DIRECTION_PIN GPIO_NUM_26 +#define Y_DIRECTION_PIN GPIO_NUM_25 +#define Z_DIRECTION_PIN GPIO_NUM_33 // Define stepper driver enable/disable output pin(s). -#define STEPPERS_ENABLE_PIN GPIO_NUM_27 +#define STEPPERS_ENABLE_PIN GPIO_NUM_13 // Define homing/hard limit switch input pins and limit interrupt vectors. -#define X_LIMIT_PIN GPIO_NUM_33 -#define Y_LIMIT_PIN GPIO_NUM_32 -#define Z_LIMIT_PIN GPIO_NUM_35 - -#if N_ABC_MOTORS >= 1 -#define M3_AVAILABLE -#define M3_STEP_PIN I2SO(7) -#define M3_DIRECTION_PIN I2SO(0) -#define M3_LIMIT_PIN GPIO_NUM_34 +#define X_LIMIT_PIN GPIO_NUM_2 +#define Y_LIMIT_PIN GPIO_NUM_4 +#define Z_LIMIT_PIN GPIO_NUM_15 + +#if DRIVER_SPINDLE_ENABLE +// Define spindle enable and spindle direction output pins. +#define SPINDLE_ENABLE_PIN GPIO_NUM_18 +#define SPINDLE_DIRECTION_PIN GPIO_NUM_5 +#define SPINDLEPWMPIN GPIO_NUM_17 #endif +#define AUXINPUT0_PIN GPIO_NUM_35 + // Define driver spindle pins #if DRIVER_SPINDLE_PWM_ENABLE -#define SPINDLE_PWM_PIN GPIO_NUM_2 +#define SPINDLE_PWM_PIN GPIO_NUM_17 #else -#define AUXOUTPUT0_PIN GPIO_NUM_2 +#define AUXOUTPUT0_PIN GPIO_NUM_17 +#endif + +#if DRIVER_SPINDLE_DIR_ENABLE +#define SPINDLE_DIRECTION_PIN GPIO_NUM_5 +#else +#define AUXOUTPUT1_PIN GPIO_NUM_5 #endif #if DRIVER_SPINDLE_ENABLE -#define SPINDLE_ENABLE_PIN GPIO_NUM_4 +#define SPINDLE_ENABLE_PIN GPIO_NUM_18 #else -#define AUXOUTPUT2_PIN GPIO_NUM_4 +#define AUXOUTPUT2_PIN GPIO_NUM_18 #endif // Define flood and mist coolant enable output pins. -#define COOLANT_FLOOD_PIN GPIO_NUM_15 -#define COOLANT_MIST_PIN I2SO(11) + +#define COOLANT_FLOOD_PIN GPIO_NUM_16 +#define COOLANT_MIST_PIN GPIO_NUM_21 // Define user-control CONTROLs (cycle start, reset, feed hold) input pins. -//#define RESET_PIN GPIO_NUM_34 -//#define FEED_HOLD_PIN GPIO_NUM_36 -//#define CYCLE_START_PIN GPIO_NUM_39 +#define RESET_PIN GPIO_NUM_34 +#define FEED_HOLD_PIN GPIO_NUM_36 +#define CYCLE_START_PIN GPIO_NUM_39 #if SAFETY_DOOR_ENABLE -#define SAFETY_DOOR_PIN GPIO_NUM_25 +#define SAFETY_DOOR_PIN AUXINPUT0_PIN #endif // Define probe switch input pin. #if PROBE_ENABLE -#define PROBE_PIN GPIO_NUM_26 +#define PROBE_PIN GPIO_NUM_32 #endif -#if KEYPAD_ENABLE -#error No free pins for keypad! +#if I2C_ENABLE +// Define I2C port/pins +#define I2C_PORT I2C_NUM_1 +#define I2C_SDA GPIO_NUM_21 +#define I2C_SCL GPIO_NUM_22 +#define I2C_CLOCK 100000 #endif #if SDCARD_ENABLE // Pin mapping when using SPI mode. // With this mapping, SD card can be used both in SPI and 1-line SD mode. // Note that a pull-up on CS line is required in SD mode. -#define PIN_NUM_MISO GPIO_NUM_19 -#define PIN_NUM_MOSI GPIO_NUM_23 -#define PIN_NUM_CLK GPIO_NUM_18 -#define PIN_NUM_CS GPIO_NUM_5 +#define PIN_NUM_MISO GPIO_NUM_19 +#define PIN_NUM_MOSI GPIO_NUM_23 +#define PIN_NUM_CLK GPIO_NUM_18 +#define PIN_NUM_CS GPIO_NUM_5 #endif - diff --git a/main/boards/jackpot_map.h b/main/boards/jackpot_map.h index 57596ea..a75b653 100644 --- a/main/boards/jackpot_map.h +++ b/main/boards/jackpot_map.h @@ -24,6 +24,10 @@ #define BOARD_NAME "Jackpot" #define BOARD_URL "https://docs.v1e.com/electronics/jackpot/" +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define USE_I2S_OUT #define I2S_OUT_PIN_BASE 64 @@ -120,16 +124,13 @@ #define PIN_NUM_CS GPIO_NUM_5 #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED -#define UART2_RX_PIN GPIO_NUM_4 -#define UART2_TX_PIN GPIO_NUM_0 +#ifdef ADD_SERIAL2 +#define UART2_RX_PIN GPIO_NUM_4 +#define UART2_TX_PIN GPIO_NUM_0 #endif // Define probe switch input pin. #if PROBE_ENABLE -#define PROBE_PIN GPIO_NUM_36 +#define PROBE_PIN GPIO_NUM_36 #endif -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif diff --git a/main/boards/mks_tinybee_1_0_map.h b/main/boards/mks_tinybee_1_0_map.h index db35c72..8e47076 100644 --- a/main/boards/mks_tinybee_1_0_map.h +++ b/main/boards/mks_tinybee_1_0_map.h @@ -25,10 +25,13 @@ #define BOARD_NAME "MKS Tinybee V1.0" #define BOARD_URL "https://github.com/makerbase-mks/MKS-TinyBee" +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define USE_I2S_OUT #define I2S_OUT_PIN_BASE 64 -//#define SERIAL2_ENABLE 1 #define UART2_RX_PIN GPIO_NUM_16 // EXP_1 #define UART2_TX_PIN GPIO_NUM_17 // EXP_1 @@ -79,6 +82,8 @@ #endif #endif +#define AUXINPUT0_PIN GPIO_NUM_39 // TB + // Define driver spindle pins #if DRIVER_SPINDLE_PWM_ENABLE @@ -109,7 +114,7 @@ #define FEED_HOLD_PIN GPIO_NUM_34 // TH2 //#define RESET_PIN (use board hardware) #if SAFETY_DOOR_ENABLE -#define SAFETY_DOOR_PIN GPIO_NUM_39 // TB +#define SAFETY_DOOR_PIN AUXINPUT0_PIN // TB #endif // Define probe switch input pin. diff --git a/main/boards/root_cnc_v2_map.h b/main/boards/root_cnc_v2_map.h index ad91b42..7d5b0f9 100644 --- a/main/boards/root_cnc_v2_map.h +++ b/main/boards/root_cnc_v2_map.h @@ -24,6 +24,10 @@ #define BOARD_NAME "Root CNC v2.x" #define BOARD_URL "https://wiki.rootcnc.com/en/Root-Controller-ISO/DetailedInfo" +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define USE_I2S_OUT #define I2S_OUT_PIN_BASE 64 @@ -119,7 +123,7 @@ // N/A -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_16 #define UART2_TX_PIN GPIO_NUM_17 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED @@ -131,7 +135,3 @@ #if PROBE_ENABLE #define PROBE_PIN GPIO_NUM_27 #endif - -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif diff --git a/main/boards/root_cnc_v3_map.h b/main/boards/root_cnc_v3_map.h index b7b2aa3..cf70638 100644 --- a/main/boards/root_cnc_v3_map.h +++ b/main/boards/root_cnc_v3_map.h @@ -24,6 +24,10 @@ #define BOARD_NAME "Root CNC v3" #define BOARD_URL "https://wiki.rootcnc.com/en/Root-Controller-ISO/DetailedInfo" +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define USE_I2S_OUT #define I2S_OUT_PIN_BASE 64 @@ -119,7 +123,7 @@ // N/A -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_16 #define UART2_TX_PIN GPIO_NUM_17 #if MODBUS_ENABLE & MODBUS_RTU_DIR_ENABLED @@ -131,7 +135,3 @@ #if PROBE_ENABLE #define PROBE_PIN GPIO_NUM_2 #endif - -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif diff --git a/main/boards/sourcerabbit_4axis.h b/main/boards/sourcerabbit_4axis.h index 4042b5f..ec2d30b 100644 --- a/main/boards/sourcerabbit_4axis.h +++ b/main/boards/sourcerabbit_4axis.h @@ -111,10 +111,9 @@ #endif #ifdef BOARD_SOURCERABBIT_4AXIS_12 -#if SAFETY_DOOR_ENABLE -#define SAFETY_DOOR_PIN GPIO_NUM_5 // ATC Door -#else #define AUXINPUT0_PIN GPIO_NUM_5 // ATC Door +#if SAFETY_DOOR_ENABLE +#define SAFETY_DOOR_PIN AUXINPUT0_PIN // ATC Door #endif #define AUXOUTPUT0_PIN GPIO_NUM_19 // ATC Lock #define AUXOUTPUT1_PIN GPIO_NUM_18 // ATC Blow diff --git a/main/boards/xPro_v5_map.h b/main/boards/xPro_v5_map.h index 25e69c9..fd6ce93 100644 --- a/main/boards/xPro_v5_map.h +++ b/main/boards/xPro_v5_map.h @@ -25,6 +25,10 @@ #error "Axis configuration is not supported!" #endif +#if KEYPAD_ENABLE == 1 +#error No free pins for I2C keypad! +#endif + #define BOARD_NAME "x-Pro v5" #define HAS_BOARD_INIT #if TRINAMIC_ENABLE != 5160 @@ -100,11 +104,7 @@ #define PIN_NUM_CS GPIO_NUM_5 #endif -#if MODBUS_ENABLE & MODBUS_RTU_ENABLED +#ifdef ADD_SERIAL2 #define UART2_RX_PIN GPIO_NUM_25 #define UART2_TX_PIN GPIO_NUM_4 #endif - -#if KEYPAD_ENABLE -#error No free pins for keypad! -#endif diff --git a/main/driver.h b/main/driver.h index fda8bb9..f0742d6 100644 --- a/main/driver.h +++ b/main/driver.h @@ -113,6 +113,10 @@ typedef struct { // End configuration +#if !USB_SERIAL_CDC && ((MODBUS_ENABLE & MODBUS_RTU_ENABLED) || TRINAMIC_UART_ENABLE || MPG_ENABLE || (KEYPAD_ENABLE == 2 && MPG_ENABLE == 0)) +#define ADD_SERIAL2 +#endif + #ifdef BOARD_CNC_BOOSTERPACK #include "boards/cnc_boosterpack_map.h" #elif defined(BOARD_BDRING_V4) @@ -168,6 +172,12 @@ typedef struct { #define DRIVER_SPINDLE_PWM_ENABLE 0 #endif +#if SAFETY_DOOR_ENABLE && !defined(SAFETY_DOOR_PIN) +#warning "Safety door input is not available!" +#undef SAFETY_DOOR_ENABLE +#define SAFETY_DOOR_ENABLE 0 +#endif + #if IOEXPAND_ENABLE || EEPROM_ENABLE || KEYPAD_ENABLE == 1 || I2C_STROBE_ENABLE || (TRINAMIC_ENABLE && TRINAMIC_I2C) #undef I2C_ENABLE #define I2C_ENABLE 1 diff --git a/main/my_machine.h b/main/my_machine.h index e543fb4..3154ba0 100644 --- a/main/my_machine.h +++ b/main/my_machine.h @@ -64,7 +64,11 @@ //#define ETHERNET_ENABLE 1 // Ethernet streaming. Uses networking plugin. //#define BLUETOOTH_ENABLE 1 // Set to 1 for native radio, 2 for HC-05 module. //#define SDCARD_ENABLE 1 // Run gcode programs from SD card. Set to 2 to enable YModem upload. -//#define KEYPAD_ENABLE 1 // I2C keypad for jogging etc., uses keypad plugin. +//#define MPG_ENABLE 1 // Enable MPG interface. Requires serial port and one handshake pin unless + // KEYPAD_ENABLE is set to 2 when mode switching is done by the CMD_MPG_MODE_TOGGLE (0x8B) + // command character. Set both MPG_ENABLE and KEYPAD_ENABLE to 2 to use a handshake pin anyway. +//#define KEYPAD_ENABLE 1 // Set to 1 for I2C keypad, 2 for other input such as serial data. If KEYPAD_ENABLE is set to 2 + // and MPG_ENABLE is uncommented then a serial stream is shared with the MPG. //#define PPI_ENABLE 1 // Laser PPI plugin. To be completed. //#define LASER_COOLANT_ENABLE 1 // Laser coolant plugin. To be completed. //#define LB_CLUSTERS_ENABLE 1 // LaserBurn cluster support.