forked from EmbeddedTeam/app_photomagnetic
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.
17 lines
350 B
C++
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);
|