View Full Version : proximity sensor
11-08-2009, 12:57 PM
Does anyone know hot to get access to proximity sensor in N900? Probably D-Bus somehow?
Don't really count on documentation, an example would be plenty.
11-08-2009, 01:26 PM
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.
11-08-2009, 01:28 PM
Thanks, that's why I like Linux :)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.