diff --git a/uCNC/cnc_hal_config.h b/uCNC/cnc_hal_config.h index ef1822e20..d49d86121 100644 --- a/uCNC/cnc_hal_config.h +++ b/uCNC/cnc_hal_config.h @@ -53,26 +53,26 @@ extern "C" // Uncomment to enable weak pull up resistors for limit switch // If the pin is not defined in the board this will be ignored -#define LIMIT_X_PULLUP -#define LIMIT_Y_PULLUP -#define LIMIT_Z_PULLUP -#define LIMIT_X2_PULLUP -#define LIMIT_Y2_PULLUP -#define LIMIT_Z2_PULLUP -#define LIMIT_A_PULLUP -#define LIMIT_B_PULLUP -#define LIMIT_C_PULLUP +#define LIMIT_X_PULLUP_ENABLE +#define LIMIT_Y_PULLUP_ENABLE +#define LIMIT_Z_PULLUP_ENABLE +#define LIMIT_X2_PULLUP_ENABLE +#define LIMIT_Y2_PULLUP_ENABLE +#define LIMIT_Z2_PULLUP_ENABLE +#define LIMIT_A_PULLUP_ENABLE +#define LIMIT_B_PULLUP_ENABLE +#define LIMIT_C_PULLUP_ENABLE // Uncomment to enable weak pull up resistor for probe // If the pin is not defined in the board this will be ignored -// #define PROBE_PULLUP +// #define PROBE_PULLUP_ENABLE // Uncomment to enable weak pull up resistors for control pins // If the pin is not defined in the board this will be ignored -#define ESTOP_PULLUP -#define SAFETY_DOOR_PULLUP -#define FHOLD_PULLUP -#define CS_RES_PULLUP +#define ESTOP_PULLUP_ENABLE +#define SAFETY_DOOR_PULLUP_ENABLE +#define FHOLD_PULLUP_ENABLE +#define CS_RES_PULLUP_ENABLE /** * Uncomment this feature to enable tool length compensation diff --git a/uCNC/src/cnc.h b/uCNC/src/cnc.h index dd54b8e1f..03bf67cbb 100644 --- a/uCNC/src/cnc.h +++ b/uCNC/src/cnc.h @@ -117,6 +117,7 @@ extern "C" #include "hal/tools/tool.h" //configures the kinematics for the cnc machine // final HAL configurations #include "../cnc_hal_config.h" //inicializes the HAL hardcoded connections +#include "cnc_hal_overrides.h" //config override file // fill remaining HAL configurations and sanity checks #include "cnc_hal_config_helper.h" // initializes core utilities (like fast math functions) diff --git a/uCNC/src/cnc_hal_config_helper.h b/uCNC/src/cnc_hal_config_helper.h index c532b2570..d7b64ceed 100644 --- a/uCNC/src/cnc_hal_config_helper.h +++ b/uCNC/src/cnc_hal_config_helper.h @@ -127,6 +127,51 @@ extern "C" #endif #endif +#ifdef LIMIT_X_PULLUP_ENABLE +#define LIMIT_X_PULLUP +#endif +#ifdef LIMIT_Y_PULLUP_ENABLE +#define LIMIT_Y_PULLUP +#endif +#ifdef LIMIT_Z_PULLUP_ENABLE +#define LIMIT_Z_PULLUP +#endif +#ifdef LIMIT_X2_PULLUP_ENABLE +#define LIMIT_X2_PULLUP +#endif +#ifdef LIMIT_Y2_PULLUP_ENABLE +#define LIMIT_Y2_PULLUP +#endif +#ifdef LIMIT_Z2_PULLUP_ENABLE +#define LIMIT_Z2_PULLUP +#endif +#ifdef LIMIT_A_PULLUP_ENABLE +#define LIMIT_A_PULLUP +#endif +#ifdef LIMIT_B_PULLUP_ENABLE +#define LIMIT_B_PULLUP +#endif +#ifdef LIMIT_C_PULLUP_ENABLE +#define LIMIT_C_PULLUP +#endif + +#ifdef PROBE_PULLUP_ENABLE +#define PROBE_PULLUP +#endif + +#ifdef ESTOP_PULLUP_ENABLE +#define ESTOP_PULLUP +#endif +#ifdef SAFETY_DOOR_PULLUP_ENABLE +#define SAFETY_DOOR_PULLUP +#endif +#ifdef FHOLD_PULLUP_ENABLE +#define FHOLD_PULLUP +#endif +#ifdef CS_RES_PULLUP_ENABLE +#define CS_RES_PULLUP +#endif + #ifndef ENCODERS #define ENCODERS 0 #endif diff --git a/uCNC/src/cnc_hal_overrides.h b/uCNC/src/cnc_hal_overrides.h new file mode 100644 index 000000000..cd09a4f01 --- /dev/null +++ b/uCNC/src/cnc_hal_overrides.h @@ -0,0 +1,15 @@ +//boardmap override dummy file + +#ifndef CNC_HAL_OVERRIDES_H +#define CNC_HAL_OVERRIDES_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/uCNC/src/hal/boards/boarddefs.h b/uCNC/src/hal/boards/boarddefs.h index b6530ffbf..f634ac882 100644 --- a/uCNC/src/hal/boards/boarddefs.h +++ b/uCNC/src/hal/boards/boarddefs.h @@ -148,6 +148,7 @@ extern "C" #error Undefined board #endif +#include "boardmap_overrides.h" #include "../mcus/mcudefs.h" //configures the MCU for the selected board #ifdef __cplusplus diff --git a/uCNC/src/hal/boards/boardmap_overrides.h b/uCNC/src/hal/boards/boardmap_overrides.h new file mode 100644 index 000000000..e38625540 --- /dev/null +++ b/uCNC/src/hal/boards/boardmap_overrides.h @@ -0,0 +1,15 @@ +//boardmap override dummy file + +#ifndef BOARDMAP_OVERRIDES_H +#define BOARDMAP_OVERRIDES_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file