Changing api of restart handler to only expose needed functions.

This encapsulates the low level timer logic from the caller.
This commit is contained in:
Ole Odendahl 2023-06-02 11:16:49 +02:00
parent 9285a6bc41
commit 5cede82dc5
No known key found for this signature in database
GPG key ID: 116D1FA8CD50CD0B
2 changed files with 11 additions and 0 deletions

View file

@ -13,3 +13,11 @@ static void restart_network_steering_cb(struct k_timer *timer) {
}
K_TIMER_DEFINE(restart_timer, restart_network_steering_cb, NULL);
static void prst_restart_watchdog_start() {
k_timer_start(&restart_timer, K_SECONDS(PRST_ZB_RESET_TIMEOUT), K_MSEC(0));
}
static void prst_restart_watchdog_stop() {
k_timer_stop(&restart_timer);
}

View file

@ -3,4 +3,7 @@
static const int PRST_ZB_RESET_TIMEOUT = 5 * 60;
static void prst_restart_watchdog_start;
static void prst_restart_watchdog_stop;
#endif // _PRST_ZB_RESTART_HANDLER_H_