KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dev_watchdog.h
Go to the documentation of this file.
1 /*
2  * KM3NeT CLB v2 Firmware
3  * ----------------------
4  *
5  * Copyright 2013-2016 KM3NeT Collaboration
6  *
7  * All Rights Reserved.
8  *
9  *
10  * File : dev_watchdog.h
11  * Created : 12 august 2016
12  * Author : Vincent van Beveren
13  */
14 
15 #ifndef DEV_WATCHDOG_H_
16 #define DEV_WATCHDOG_H_
17 
18 #include "dev_defs.h"
19 
20 /**
21  * @file
22  *
23  * @ingroup devices
24  *
25  * This provides a device mapping for a wishbone bus mapped Watchdog
26  */
27 
28 
29 #define WATCHDOG_CNT_DEFAULT 0x0256 //!< Counter value default (10 minutes)
30 
31 #define WATCHDOG_CMD_REBOOT 0xDEADC0DE //!< Reboot now
32 #define WATCHDOG_CMD_FEED 0xFEEDD051 //!< Feed the dog
33 
34 /**
35  * The definition of the state-machine registers.
36  */
37 typedef struct {
38  reg_io CNT; //!< Low top-counter register, in seconds. Only applied on next feed.
39  reg_o CMD; //!< Command to issue, see WATCHDOG_CMD_*
41 
42 #endif /* DEV_WATCHDOG_H_ */
#define reg_o
Write-only register.
Definition: dev_defs.h:36
The definition of the state-machine registers.
Definition: dev_watchdog.h:37
volatile unsigned int CNT
Low top-counter register, in seconds.
Definition: dev_watchdog.h:38
#define reg_io
Input/Output register.
Definition: dev_defs.h:33
volatile unsigned int CMD
Command to issue, see WATCHDOG_CMD_*.
Definition: dev_watchdog.h:39
This module contains some very basic type definitions used for hardware mappings. ...