power check

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
lama
Member
Member
Posts: 83
Joined: Thu Apr 16, 2009 8:41 am

power check

Post by lama »

hi everyone,
i have a simple question, how can i check that system is powered by battery (or ac), and if so, how can i measure its power state?thanks for any answer.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: power check

Post by Combuster »

A quick google shows that both APM (=old) and ACPI (=nasty) have support for batteries, I suggest you start looking there.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
lama
Member
Member
Posts: 83
Joined: Thu Apr 16, 2009 8:41 am

Re: power check

Post by lama »

i know about that.in my system i have only used apm for some power down routines, nothing else so far - so i dont know much about it and i have not found any texts covering the things i want to do (except official datasheet ofcourse :) ).but i'll check again.
lama
Member
Member
Posts: 83
Joined: Thu Apr 16, 2009 8:41 am

Re: power check

Post by lama »

ok, got it :) you can lock this topic.
Post Reply