How to program the POWER button

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
B.E

How to program the POWER button

Post by B.E »

In Windows XP and linux, when you press the POWER OFF button on your case it shut down properly. So I want to know how do you program the POWER button. can you give me any links to tutorials if posible.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:How to program the POWER button

Post by Pype.Clicker »

that's the goal of system management mode and things alike. I suggest you document about ACPI (advanced Control Power Interface) and APM (advanced Power Management) to figure out how it better works.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:How to program the POWER button

Post by Candy »

as Pype already mentioned, it's in ACPI stuff. But, ACPI can't make your processor just do what it wants to without any control from you. They use SMM, which you can also use (although I don't know how) and they use plain ports and/or memory mapped stuff. However, most of it is system specific.

Use the ACPI interfaces for the easiest way.
Post Reply