Fix GTM32_PRO_VB Serial and HAL via watchdog (#12753)

Move `watchdog_reset` from `.h` to `.cpp` to eliminate the need to include `MarlinConfig.h` in a HAL-related file.
This commit is contained in:
Phr3d13 2019-01-03 10:46:49 -05:00 committed by Scott Lahteine
parent 288340cb6c
commit 01f75591c6
2 changed files with 8 additions and 8 deletions

View file

@ -33,6 +33,13 @@
#include <libmaple/iwdg.h> #include <libmaple/iwdg.h>
#include "watchdog_STM32F1.h" #include "watchdog_STM32F1.h"
void watchdog_reset() {
#if PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
iwdg_feed();
}
void watchdogSetup(void) { void watchdogSetup(void) {
// do whatever. don't remove this function. // do whatever. don't remove this function.
} }

View file

@ -27,8 +27,6 @@
#include <libmaple/iwdg.h> #include <libmaple/iwdg.h>
#include "../../inc/MarlinConfig.h"
/** /**
* The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and * The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and
* 625 reload value (counts down to 0) * 625 reload value (counts down to 0)
@ -43,9 +41,4 @@ void watchdog_init();
// Reset watchdog. MUST be called at least every 4 seconds after the // Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or STM32F1 will reset. // first watchdog_init or STM32F1 will reset.
inline void watchdog_reset() { void watchdog_reset();
#if PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heart beat indicator
#endif
iwdg_feed();
}