Skip to content

Commit

Permalink
Fixed xPro_v5 map
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeio committed Sep 30, 2024
1 parent c892a63 commit ef47e81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
22 changes: 11 additions & 11 deletions main/boards/xPro_v5_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@
#endif

#define BOARD_NAME "x-Pro v5"
#define BOARD_URL "https://www.spark-concepts.com/cnc-xpro-v5/"
#define HAS_BOARD_INIT
#if TRINAMIC_ENABLE != 5160
#error BOARD_XPRO_V5 has soldered TMC5160 drivers.
#endif

#define TRINAMIC_MIXED_DRIVERS 0

#ifdef ADD_SERIAL2 // ModBus
#undef DRIVER_SPINDLE_ENABLE
#define DRIVER_SPINDLE_ENABLE 0
#endif

// timer definitions
#define STEP_TIMER_GROUP TIMER_GROUP_0
#define STEP_TIMER_INDEX TIMER_0
Expand Down Expand Up @@ -66,15 +72,14 @@

// Define driver spindle pins

#if DRIVER_SPINDLE_PWM_ENABLE && !(MODBUS_ENABLE & MODBUS_RTU_ENABLED)
#if DRIVER_SPINDLE_PWM_ENABLE
#define SPINDLE_PWM_PIN GPIO_NUM_25
#else
#define AUXOUTPUT0_PIN GPIO_NUM_25
#endif

#if DRIVER_SPINDLE_ENABLE && !(MODBUS_ENABLE & MODBUS_RTU_ENABLED)
#define SPINDLE_ENABLE_PIN GPIO_NUM_4
#elif defined(ADD_SERIAL2)
#define UART2_RX_PIN GPIO_NUM_25
#define UART2_TX_PIN GPIO_NUM_4
#else
#define AUXOUTPUT0_PIN GPIO_NUM_25
#define AUXOUTPUT1_PIN GPIO_NUM_4
#endif

Expand Down Expand Up @@ -106,8 +111,3 @@
#if SDCARD_ENABLE
#define PIN_NUM_CS GPIO_NUM_5
#endif

#ifdef ADD_SERIAL2
#define UART2_RX_PIN GPIO_NUM_25
#define UART2_TX_PIN GPIO_NUM_4
#endif
5 changes: 2 additions & 3 deletions main/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,19 +434,19 @@ static bool IOInitDone = false, rtc_started = false;
static portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED;
static pin_group_pins_t limit_inputs = {0};
static on_execute_realtime_ptr on_execute_realtime;
#if STEP_INJECT_ENABLE
static struct {
uint32_t length;
uint32_t delay;
axes_signals_t out;
#if STEP_INJECT_ENABLE
struct {
hal_timer_t timer;
axes_signals_t claimed;
volatile axes_signals_t axes;
volatile axes_signals_t out;
} inject;
#endif
} step_pulse = {0};
#endif

#if PROBE_ENABLE
static probe_state_t probe = {
Expand Down Expand Up @@ -3121,7 +3121,6 @@ bool driver_init (void)
#if PWM_RAMPED
.at_speed = On
#endif

}
};

Expand Down

0 comments on commit ef47e81

Please sign in to comment.