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:
parent
9285a6bc41
commit
5cede82dc5
2 changed files with 11 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue