Make UEFI boot-platform build again
[haiku.git] / headers / private / device / power_managment.h
blob7964a27240ffaecdb278a7f704b2c0a10bce9777
1 /*
2 * Copyright 2004-2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef POWER_MANAGMENT_H
6 #define POWER_MANAGMENT_H
9 #include <Drivers.h>
12 // io controls
13 enum {
14 // ioctl response with kMagicFreqID
15 IDENTIFY_DEVICE = B_DEVICE_OP_CODES_END + 20001,
17 GET_BATTERY_INFO,
18 GET_EXTENDED_BATTERY_INFO,
19 WATCH_BATTERY,
20 STOP_WATCHING_BATTERY
24 // ACPI Battery:
25 // magic id returned by IDENTIFY_DEVICE
26 const uint32 kMagicACPIBatteryID = 17822;
29 // Our known battery states
30 #define BATTERY_DISCHARGING 0x01
31 #define BATTERY_CHARGING 0x02
32 #define BATTERY_CRITICAL_STATE 0x04
35 typedef struct {
36 int state;
37 int current_rate;
38 int capacity;
39 int voltage;
40 } acpi_battery_info;
43 typedef struct {
44 int power_unit;
45 int design_capacity;
46 int last_full_charge;
47 int technology;
48 int design_voltage;
49 int design_capacity_warning;
50 int design_capacity_low;
51 int capacity_granularity_1;
52 int capacity_granularity_2;
53 char model_number[32];
54 char serial_number[32];
55 char type[32];
56 char oem_info[32];
57 } acpi_extended_battery_info;
60 #endif