Browse Source

STM32F1: Support M997 - Reset and begin flash (#15209)

reloxx13 5 years ago
parent
commit
05cd483413
2 changed files with 5 additions and 0 deletions
  1. 2
    0
      Marlin/src/HAL/HAL_STM32F1/HAL.cpp
  2. 3
    0
      Marlin/src/HAL/HAL_STM32F1/HAL.h

+ 2
- 0
Marlin/src/HAL/HAL_STM32F1/HAL.cpp View File

@@ -369,4 +369,6 @@ void analogWrite(pin_t pin, int pwm_val8) {
369 369
     analogWrite(uint8_t(pin), pwm_val8);
370 370
 }
371 371
 
372
+void flashFirmware(int16_t value) { nvic_sys_reset(); }
373
+
372 374
 #endif // __STM32F1__

+ 3
- 0
Marlin/src/HAL/HAL_STM32F1/HAL.h View File

@@ -256,3 +256,6 @@ void analogWrite(pin_t pin, int pwm_val8); // PWM only! mul by 257 in maple!?
256 256
 
257 257
 #define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
258 258
 #define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
259
+
260
+#define PLATFORM_M997_SUPPORT
261
+void flashFirmware(int16_t value);

Loading…
Cancel
Save