From 6b8a5bc3ac5c35ab038f7696a4c53bd09e2cd506 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 16 Jul 2019 17:31:56 +0200 Subject: [PATCH] Fix compiler warnings sketch/tmc2130.cpp:146:42: warning: default argument given for parameter 1 of 'void tmc2130_init(bool)' [-fpermissive] sketch/tmc2130.cpp:146:24: warning: unused parameter 'bSupressFlag' [-Wunused-parameter] --- Firmware/tmc2130.cpp | 7 +++++-- Firmware/tmc2130.h | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Firmware/tmc2130.cpp b/Firmware/tmc2130.cpp index f9dee3be..15188fc4 100755 --- a/Firmware/tmc2130.cpp +++ b/Firmware/tmc2130.cpp @@ -142,8 +142,11 @@ uint16_t __tcoolthrs(uint8_t axis) } return 0; } - -void tmc2130_init(bool bSupressFlag=false) +#ifdef PSU_Delta +void tmc2130_init(bool bSupressFlag) +#else +void tmc2130_init() +#endif { // DBG(_n("tmc2130_init(), mode=%S\n"), tmc2130_mode?_n("STEALTH"):_n("NORMAL")); WRITE(X_TMC2130_CS, HIGH); diff --git a/Firmware/tmc2130.h b/Firmware/tmc2130.h index a1d160f0..ed4c0d7c 100644 --- a/Firmware/tmc2130.h +++ b/Firmware/tmc2130.h @@ -51,7 +51,11 @@ typedef struct extern tmc2130_chopper_config_t tmc2130_chopper_config[4]; //initialize tmc2130 +#ifdef PSU_Delta extern void tmc2130_init(bool bSupressFlag=false); +#else +extern void tmc2130_init(); +#endif //check diag pins (called from stepper isr) extern void tmc2130_st_isr(); //update stall guard (called from st_synchronize inside the loop)