test_led_strip/src/watdog.cpp
zhangyisong 0e5d15c814 Refactor app to use static classes and event-driven callbacks
Restructure Led as a template on the DT spec, add a generic
signal/slot mechanism for host status, and cache Infrared sensor
samples via trigger callbacks. Add new init modules for LED, temp,
and watchdog, and build them into the main app.
2026-08-03 22:12:31 +08:00

17 lines
350 B
C++

#include <watchdog.hpp>
#include <zpp/work_queue.hpp>
using namespace ther;
namespace {
WatchDogConfig wdt;
} // namespace
static auto Init() -> int {
printk("[watchdog] init\n");
using namespace std::chrono_literals;
static zpp::periodic_work<> work{[]() { wdt.Feed(); }};
work.submit(50ms);
return 0;
}
SYS_INIT(Init, POST_KERNEL, 50);