Callisto4Bootloader: include/c4_watchdog.h Source File

Callisto4Bootloader

c4_watchdog.h
Go to the documentation of this file.
1
16 #ifndef C4_WATCHDOG_H_
17 #define C4_WATCHDOG_H_
18
19
20 /*******************************************************************************
21 * Includes
22 ******************************************************************************/
23
24 #include "c4_error_codes.h"
25
26 #include <stdint.h>
27
28 /*******************************************************************************
29 * Defines
30 ******************************************************************************/
31
32 /*******************************************************************************
33 * Structures
34 ******************************************************************************/
35
37 typedef enum
38 {
39 C4_WDOG1,
40 C4_WDOG2,
41 C4_NUM_WDOG
42 } c4_wdog_t;
43
44 /*******************************************************************************
45 * Variables
46 ******************************************************************************/
47
48 /*******************************************************************************
49 * Prototypes
50 ******************************************************************************/
51
62 exit_code_t c4_initWatchdog(c4_wdog_t wdog, uint16_t to, uint16_t ito);
63
74 exit_code_t c4_setWdogTimeout(c4_wdog_t wdog, uint16_t to);
75
83 exit_code_t c4_disableWdog(c4_wdog_t wdog);
84
92 exit_code_t c4_enableWdog(c4_wdog_t wdog);
93
109 exit_code_t c4_setWdogInterrupt(c4_wdog_t wdog, uint16_t to);
110
116 exit_code_t c4_getResetHistory();
117
118 #endif /* C4_WATCHDOG_H_ */
c4_wdog_t
c4_wdog_t
Enumeration of watchdogs.
Definition: c4_watchdog.h:34
c4_error_codes.h
Enumeration of Error Codes.
exit_code_t
exit_code_t
Enumeration of error codes.
Definition: c4_error_codes.h:96
c4_getResetHistory
exit_code_t c4_getResetHistory()
Retrieve reset history from watchdog registers and from System Register.
Definition: c4_watchdog.c:258
C4_WDOG2
Watchdog 2 - for SNVS secure world.
Definition: c4_watchdog.h:40
C4_WDOG1
Watchdog 1 - resets processor.
Definition: c4_watchdog.h:39
c4_initWatchdog
exit_code_t c4_initWatchdog(c4_wdog_t wdog, uint16_t to, uint16_t ito)
Initialise watchdog subsystem.
Definition: c4_watchdog.c:109
c4_enableWdog
exit_code_t c4_enableWdog(c4_wdog_t wdog)
enables the watchdog.
Definition: c4_watchdog.c:176
c4_setWdogTimeout
exit_code_t c4_setWdogTimeout(c4_wdog_t wdog, uint16_t to)
Set timeout on watchdog.
Definition: c4_watchdog.c:193
c4_disableWdog
exit_code_t c4_disableWdog(c4_wdog_t wdog)
disables the watchdog.
Definition: c4_watchdog.c:159
C4_NUM_WDOG
Number of watchdogs.
Definition: c4_watchdog.h:41
c4_setWdogInterrupt
exit_code_t c4_setWdogInterrupt(c4_wdog_t wdog, uint16_t to)
Enable interrupt on watchdog before expiry.
Definition: c4_watchdog.c:213