From 05cd4834134aa8cd403ecee7c730ad73dc403f81 Mon Sep 17 00:00:00 2001 From: reloxx13 Date: Wed, 11 Sep 2019 19:12:58 +0200 Subject: [PATCH] STM32F1: Support M997 - Reset and begin flash (#15209) --- Marlin/src/HAL/HAL_STM32F1/HAL.cpp | 2 ++ Marlin/src/HAL/HAL_STM32F1/HAL.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp index f3d0168342..fd0c4a27a0 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp @@ -369,4 +369,6 @@ void analogWrite(pin_t pin, int pwm_val8) { analogWrite(uint8_t(pin), pwm_val8); } +void flashFirmware(int16_t value) { nvic_sys_reset(); } + #endif // __STM32F1__ diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h index c096fb0831..d36c53aed0 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h @@ -256,3 +256,6 @@ void analogWrite(pin_t pin, int pwm_val8); // PWM only! mul by 257 in maple!? #define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY) #define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE) + +#define PLATFORM_M997_SUPPORT +void flashFirmware(int16_t value);