From 880ed6778530d23a894fd2b46e3ce22f89820787 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 7 Aug 2018 16:00:35 +0200 Subject: [PATCH] Fix compiler warning: sketch/stepper.cpp:1499:6: warning: unused parameter 'address' [-Wunused-parameter]. --- Firmware/stepper.cpp | 4 ++-- Firmware/stepper.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 8f74ae6f..3bc3344b 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -1496,16 +1496,16 @@ void babystep(const uint8_t axis,const bool direction) } #endif //BABYSTEPPING +#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 void digitalPotWrite(int address, int value) // From Arduino DigitalPotControl example { - #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 digitalWrite(DIGIPOTSS_PIN,LOW); // take the SS pin low to select the chip SPI.transfer(address); // send in the address and value via SPI: SPI.transfer(value); digitalWrite(DIGIPOTSS_PIN,HIGH); // take the SS pin high to de-select the chip: //delay(10); - #endif } +#endif void EEPROM_read_st(int pos, uint8_t* value, uint8_t size) { diff --git a/Firmware/stepper.h b/Firmware/stepper.h index ac508944..d4199247 100644 --- a/Firmware/stepper.h +++ b/Firmware/stepper.h @@ -92,8 +92,9 @@ extern bool y_min_endstop; extern bool y_max_endstop; void quickStop(); - +#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 void digitalPotWrite(int address, int value); +#endif //defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2); void microstep_mode(uint8_t driver, uint8_t stepping); void st_current_init();