source: branches/branch-1-0/include/helpers/acpih.h@ 406

Last change on this file since 406 was 406, checked in by shl, 13 years ago

Add additioned ACPI support for battery and temperature monitoring
Code from David Azarewicz

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1
2/*
3 *@@sourcefile acpih.h:
4 * header file for acpih.c.
5 *
6 * Note: Version numbering in this file relates to XWorkplace version
7 * numbering.
8 *
9 *@@include #include <os2.h>
10 *@@include #include "helpers\acpih.h"
11 */
12
13/* Copyright (C) 2006 Paul Ratcliffe.
14 * This file is part of the "XWorkplace helpers" source package.
15 * This is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published
17 * by the Free Software Foundation, in version 2 as it comes in the
18 * "COPYING" file of the XWorkplace main distribution.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 */
24
25#if __cplusplus
26extern "C" {
27#endif
28
29// @@changed V1.0.9 (2012-02-20) [slevine]: sync with current ACPI toolkit, code by David Azarewicz
30
31#ifndef ACPIH_HEADER_INCLUDED
32 #define ACPIH_HEADER_INCLUDED
33
34 #pragma pack(4)
35 #include <acpi.h>
36 #include <acpiapi.h>
37 #pragma pack()
38 /*
39 * Power state values
40 */
41
42 APIRET APIENTRY AcpiStartApi(ACPI_API_HANDLE *);
43 typedef APIRET APIENTRY ACPISTARTAPI(ACPI_API_HANDLE *);
44 typedef ACPISTARTAPI *PACPISTARTAPI;
45
46 APIRET APIENTRY AcpiEndApi(ACPI_API_HANDLE *);
47 typedef APIRET APIENTRY ACPIENDAPI(ACPI_API_HANDLE *);
48 typedef ACPIENDAPI *PACPIENDAPI;
49
50 APIRET APIENTRY AcpiGoToSleep(ACPI_API_HANDLE *, UCHAR);
51 typedef APIRET APIENTRY ACPIGOTOSLEEP(ACPI_API_HANDLE *, UCHAR);
52 typedef ACPIGOTOSLEEP *PACPIGOTOSLEEP;
53
54 typedef APIRET APIENTRY ACPITKGETOBJECTINFOALLOC(ACPI_HANDLE *, PVOID);
55 typedef APIRET APIENTRY ACPITKGETHANDLE(ACPI_HANDLE, ACPI_STRING, ACPI_HANDLE *);
56 typedef APIRET APIENTRY ACPITKOSFREE(PVOID);
57 typedef APIRET APIENTRY ACPITKWALKNAMESPACE(ACPI_OBJECT_TYPE, ACPI_HANDLE, UINT32,ACPI_WALK_CALLBACK, PVOID, void **);
58 typedef APIRET APIENTRY ACPITKEVALUATEOBJECT(ACPI_HANDLE, ACPI_STRING, ACPI_OBJECT_LIST *, ACPI_BUFFER *);
59
60 APIRET APIENTRY acpihOpen(ACPI_API_HANDLE *phACPI);
61 typedef APIRET APIENTRY ACPIHOPEN(ACPI_API_HANDLE *);
62 typedef ACPIHOPEN *PACPIHOPEN;
63
64 VOID APIENTRY acpihClose(ACPI_API_HANDLE *phACPI);
65
66 APIRET APIENTRY acpihGoToSleep(ACPI_API_HANDLE *phACPI, UCHAR ucState);
67
68 APIRET APIENTRY acpihGetPowerStatus(PAPM, PBOOL);
69 typedef APIRET APIENTRY ACPIHGETPOWERSTATUS(PAPM, PBOOL);
70 typedef ACPIHGETPOWERSTATUS *PACPIHGETPOWERSTATUS;
71
72 BOOL acpihHasBattery(VOID);
73
74 #define ORD_ACPISTARTAPI 16
75 #define ORD_ACPIENDAPI 17
76 #define ORD_ACPIGOTOSLEEP 19
77 #define ORD_ACPITKGETOBJECTINFOALLOC 85
78 #define ORD_ACPITKGETHANDLE 65
79 #define ORD_ACPITKOSFREE 66
80 #define ORD_ACPITKWALKNAMESPACE 56
81 #define ORD_ACPITKEVALUATEOBJECT 50
82
83#endif
84
85#if __cplusplus
86}
87#endif
88
Note: See TracBrowser for help on using the repository browser.