-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwdt.h
40 lines (30 loc) · 872 Bytes
/
wdt.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
/*
* wdt.h: Watchdog Timer Linux Device Driver
*
* (C) Copyright 2012, 2016 by WinSystems, Inc.
* Author: Paul DeMetrotion <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License.
*/
#ifndef __WDT_H
#define __WDT_H
#include <linux/ioctl.h>
#define IOCTL_NUM 'd'
#define SUCCESS 0
// Read the WDT
#define IOCTL_READ_WDT _IOWR(IOCTL_NUM, 1, int)
// Write to the WDT
#define IOCTL_WRITE_WDT _IOWR(IOCTL_NUM, 2, int)
// Set seconds
#define IOCTL_SET_WDT_SEC _IOWR(IOCTL_NUM, 3, int)
// Set minutes
#define IOCTL_SET_WDT_MIN _IOWR(IOCTL_NUM, 4, int)
// io functions
int read_wdt(void);
int write_wdt(int value);
int set_wdt_sec(void);
int set_wdt_min(void);
#endif /* __WDT_H */