ACPICA: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m s/dword/uint32_t/g
No edit summary
Line 164:
=== Visual Studio experience ===
From Visual Studio, although there is little organization in the files, it is relatively easy to port. In the provided /generate directory, there is a VC 9.0 solution. The only project required for integration is "AcpiSubsystem". Copy this project along with all the files listed (you can keep the old directory structure). #define's can be used to configure certain aspects of it, and perhaps changing #ifdef WIN32 to #ifdef X86 might be a good idea (WIN64 -> X64). Once this is done though the base of it is in place, and actypes.h is the only header file that needs any modification (that listed above). It might be an idea to change the option "Compile as C code" to default - it's all .c anyway. This allows you to add C++ to the project without problems. Once this is done, add OSL.c or OSLPP.cpp, write your OS layer and you are done.
 
== Code Examples ==
Here are some examples of different operations that ACPICA can help with.
 
=== Power Off ===
To power off the machine:
AcpiEnterSleepStatePrep(5);
cli(); // disable interrupts
AcpiEnterSleepState(5);
panic("power off"); // in case it didn't work!
 
== External links ==