forked from community-ssu/dsme
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dsme-wdd-wd.h
49 lines (35 loc) · 1.34 KB
/
dsme-wdd-wd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
@file dsme-wdd-wd.h
This file has defines hardware watchdog kicker.
<p>
Copyright (C) 2004-2010 Nokia Corporation.
@author Semi Malinen <[email protected]>
This file is part of Dsme.
Dsme is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License
version 2.1 as published by the Free Software Foundation.
Dsme is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Dsme. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DSME_WDD_WD_H
#define DSME_WDD_WD_H
#include <stdbool.h>
// Period for kicking; i.e. how soon the quickest watchdog will bite.
// NOTE: This must be picked from the wd[] array in dsme-wdd-wd.c!
#define DSME_SHORTEST_WD_PERIOD 14 // seconds
// Period for heartbeat; i.e. how often we wakeup to kick watchdogs, etc.
// We take a 2 second window for kicking the watchdogs.
#define DSME_HEARTBEAT_INTERVAL (DSME_SHORTEST_WD_PERIOD - 2) // seconds
#ifdef __cplusplus
extern "C" {
#endif
void dsme_wd_kick(void);
bool dsme_wd_init(void);
#ifdef __cplusplus
}
#endif
#endif