wmbattery: Add to repository.
[dockapps.git] / wmbattery / sonypi.h
blob03650afa7b418f35048219e60b653b1c802f7ae5
1 int sonypi_supported (void);
2 int sonypi_read (apm_info *info);
4 /* There's no good place to get these constants, so I must define them
5 * myself. */
7 #include <linux/types.h>
9 /* get battery full capacity/remaining capacity */
10 #define SONYPI_IOCGBAT1CAP _IOR('v', 2, __u16)
11 #define SONYPI_IOCGBAT1REM _IOR('v', 3, __u16)
12 #define SONYPI_IOCGBAT2CAP _IOR('v', 4, __u16)
13 #define SONYPI_IOCGBAT2REM _IOR('v', 5, __u16)
15 /* get battery flags: battery1/battery2/ac adapter present */
16 #define SONYPI_BFLAGS_B1 0x01
17 #define SONYPI_BFLAGS_B2 0x02
18 #define SONYPI_BFLAGS_AC 0x04
19 #define SONYPI_IOCGBATFLAGS _IOR('v', 7, __u8)