Add a watchdog module to meshsolar. (#9337)

* add watchdog module

* Restore the code in power.h

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Quency-D
2026-01-29 10:41:27 +08:00
committed by GitHub
parent df400850c1
commit b2f2f6b305
4 changed files with 75 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <stdint.h>
#include "concurrency/OSThread.h"
#ifdef HAS_HARDWARE_WATCHDOG
class WatchdogThread : private concurrency::OSThread
{
public:
WatchdogThread();
void feedDog(void);
virtual bool setup();
virtual int32_t runOnce() override;
};
extern WatchdogThread *watchdogThread;
#endif