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]
This commit is contained in:
Marek Bel 2019-07-16 17:31:56 +02:00
parent 8b806f692e
commit 6b8a5bc3ac
2 changed files with 9 additions and 2 deletions

View File

@ -142,8 +142,11 @@ uint16_t __tcoolthrs(uint8_t axis)
} }
return 0; return 0;
} }
#ifdef PSU_Delta
void tmc2130_init(bool bSupressFlag=false) void tmc2130_init(bool bSupressFlag)
#else
void tmc2130_init()
#endif
{ {
// DBG(_n("tmc2130_init(), mode=%S\n"), tmc2130_mode?_n("STEALTH"):_n("NORMAL")); // DBG(_n("tmc2130_init(), mode=%S\n"), tmc2130_mode?_n("STEALTH"):_n("NORMAL"));
WRITE(X_TMC2130_CS, HIGH); WRITE(X_TMC2130_CS, HIGH);

View File

@ -51,7 +51,11 @@ typedef struct
extern tmc2130_chopper_config_t tmc2130_chopper_config[4]; extern tmc2130_chopper_config_t tmc2130_chopper_config[4];
//initialize tmc2130 //initialize tmc2130
#ifdef PSU_Delta
extern void tmc2130_init(bool bSupressFlag=false); extern void tmc2130_init(bool bSupressFlag=false);
#else
extern void tmc2130_init();
#endif
//check diag pins (called from stepper isr) //check diag pins (called from stepper isr)
extern void tmc2130_st_isr(); extern void tmc2130_st_isr();
//update stall guard (called from st_synchronize inside the loop) //update stall guard (called from st_synchronize inside the loop)