RTEMS  5.1
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
watchdog.h
1 /* watchdog.h
2  *
3  * The LEON3 BSP timer watch-dog interface
4  *
5  * COPYRIGHT (c) 2012.
6  * Cobham Gaisler AB.
7  *
8  * The license and distribution terms for this file may be
9  * found in the file LICENSE in this distribution or at
10  * http://www.rtems.org/license/LICENSE.
11  */
12 
13 #ifndef __WATCHDOG_H__
14 #define __WATCHDOG_H__
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /* Initialize BSP watchdog routines. Returns number of watchdog timers found.
21  * Currently only one is supported.
22  */
23 int bsp_watchdog_init(void);
24 
25 /* Reload watchdog (last timer on the first GPTIMER core), all systems does not
26  * feature a watchdog, it is expected that if this function is called the
27  * user knows that there is a watchdog available.
28  *
29  * The prescaler is normally set to number of MHz of system, this is to
30  * make the system clock tick be stable.
31  *
32  * Arguments
33  * watchdog - Always 0 for now
34  * reload_value - Number of timer clocks (after prescaler) to count before
35  * watchdog is woken.
36  */
37 void bsp_watchdog_reload(int watchdog, unsigned int reload_value);
38 
39 /* Stop watchdog timer */
40 void bsp_watchdog_stop(int watchdog);
41 
42 /* Use watchdog0 timer to reset the system */
43 void bsp_watchdog_system_reset(void);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif