From adb7a88428c04fe73d0923ba50782ba726968da7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 23 Mar 2020 17:11:00 -0500 Subject: [PATCH] Fix an unused var warning --- Marlin/src/HAL/LPC1768/HAL.cpp | 4 +--- Marlin/src/HAL/LPC1768/HAL.h | 2 +- Marlin/src/HAL/STM32/HAL.cpp | 2 +- Marlin/src/HAL/STM32/HAL.h | 2 +- Marlin/src/HAL/STM32F1/HAL.cpp | 2 +- Marlin/src/HAL/STM32F1/HAL.h | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/src/HAL/LPC1768/HAL.cpp b/Marlin/src/HAL/LPC1768/HAL.cpp index f0559d268..f206ce7ad 100644 --- a/Marlin/src/HAL/LPC1768/HAL.cpp +++ b/Marlin/src/HAL/LPC1768/HAL.cpp @@ -67,9 +67,7 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) { return ind > -1 ? ind : dval; } -void flashFirmware(int16_t value) { - NVIC_SystemReset(); -} +void flashFirmware(const int16_t) { NVIC_SystemReset(); } void HAL_clear_reset_source(void) { #if ENABLED(USE_WATCHDOG) diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index c727877ff..f5ea629f1 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -195,7 +195,7 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval); void HAL_idletask(); #define PLATFORM_M997_SUPPORT -void flashFirmware(int16_t value); +void flashFirmware(const int16_t); /** * set_pwm_frequency diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index 5d8c686af..77f8d2764 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -133,6 +133,6 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) { HAL_adc_result = analogRe uint16_t HAL_adc_get_result() { return HAL_adc_result; } -void flashFirmware(int16_t) { NVIC_SystemReset(); } +void flashFirmware(const int16_t) { NVIC_SystemReset(); } #endif // ARDUINO_ARCH_STM32 && !STM32GENERIC diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index 9fb40d612..c310cca74 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -223,4 +223,4 @@ uint16_t HAL_adc_get_result(); #define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval) #define PLATFORM_M997_SUPPORT -void flashFirmware(int16_t value); +void flashFirmware(const int16_t); diff --git a/Marlin/src/HAL/STM32F1/HAL.cpp b/Marlin/src/HAL/STM32F1/HAL.cpp index bc5479b60..01fd2c8fc 100644 --- a/Marlin/src/HAL/STM32F1/HAL.cpp +++ b/Marlin/src/HAL/STM32F1/HAL.cpp @@ -388,6 +388,6 @@ void analogWrite(pin_t pin, int pwm_val8) { analogWrite(uint8_t(pin), pwm_val8); } -void flashFirmware(int16_t value) { nvic_sys_reset(); } +void flashFirmware(const int16_t) { nvic_sys_reset(); } #endif // __STM32F1__ diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index f0f0ce1ea..ff42beb92 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -288,4 +288,4 @@ void analogWrite(pin_t pin, int pwm_val8); // PWM only! mul by 257 in maple!? #define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE) #define PLATFORM_M997_SUPPORT -void flashFirmware(int16_t value); +void flashFirmware(const int16_t);