1
/* hidups.h - prototype HID UPS driver for Network UPS Tools
3
Copyright (C) 2001 Russell Kroll <rkroll@exploits.org>
5
Based on evtest.c v1.10 - Copyright (c) 1999-2000 Vojtech Pavlik
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
#include <asm/types.h>
29
#include <sys/ioctl.h>
30
#include <sys/types.h>
34
#include LINUX_HIDDEV /* from configure */
36
#define DEFAULT_ONDELAY 13 /* delay between return of utility power */
37
/* and powering up of load (10 seconds units for MGE) */
38
/* ondelay > offdelay */
39
#define DEFAULT_OFFDELAY 120 /* delay befor power off, in SECONDS*/
41
/* power device page: x84 */
43
#define UPS_USAGE 0x840004
44
#define POWER_USAGE 0x840020 /* wrong, but needed for MGE */
45
#define UPS_BATTVOLT 0x840030 /* voltage * 100 */
46
#define UPS_LOADPCT 0x840035 /* load percentage */
47
#define UPS_SHUTDOWN_IMMINENT 0x840069 /* 1 = low battery */
48
#define UPS_IMFR 0x8400FD /* manufacturer name */
49
#define UPS_IPRODUCT 0x8400FE /* model name */
50
#define UPS_ISERIAL 0x8400FF /* serial number */
51
#define UPS_WAKEDELAY 0x840056
52
#define UPS_GRACEDELAY 0x840057
54
/* battery system page: x85 */
56
#define BATT_BELOW_RCL 0x850042 /* below remaining cap limit */
57
#define BATT_CHARGING 0x850044 /* 0 = no longer charging */
58
#define BATT_DISCHARGING 0x850045 /* 1 = on battery */
59
#define BATT_REMAINING_CAPACITY 0x850066 /* battery percentage */
60
#define BATT_RUNTIME_TO_EMPTY 0x850068 /* minutes */
61
#define BATT_MFRDATE 0x850085 /* manufacturer date */
62
#define BATT_ICHEMISTRY 0x850089 /* battery type */
63
#define BATT_AC_PRESENT 0x8500d0 /* 1 = on line */
64
#define BATT_IOEMINFORMATION 0x85008f /* battery OEM description */