View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
You can fopen() /sys/devices/platform/gpio-switch/proximity/state (or /sys/bus/platform/devices/proximity/state). For me, it says "open" if my finger is not covering it, but it says "closed" when my finger is covering it. If you need some examples, look at the ioquake3 and shake2control sources in extras-devel.
 

The Following 6 Users Say Thank You to qwerty12 For This Useful Post: