♻️ Move watchdog to MarlinHAL

This commit is contained in:
Scott Lahteine
2022-05-19 11:36:13 -05:00
parent 12da2e9288
commit 52eefa90e1
62 changed files with 505 additions and 1101 deletions

View File

@@ -30,7 +30,6 @@
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "Servo.h"
#include "watchdog.h"
#include "MarlinSerial.h"
#include "../../inc/MarlinConfigPre.h"
@@ -218,9 +217,13 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
static void init(); // Called early in setup()
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
static void reboot(); // Restart the firmware from 0x0
// Interrupts
static bool isr_state() { return !__get_PRIMASK(); }