This is the gsensor KXT_9 driver sysfs interface, any suggestion is welcome
Sysfs Nodes | Attr | Description | Comment |
interval | r/w | Get/Set g sensor polling rate |
|
enable | r/w | Enable/Disable g sensor |
|
tilt | r/w | Enable/Disable Tilt Position function |
|
wake | r/w | Enable/Disable Wake Up (motion detection) function |
|
tap | r/w | Enable/Disable Directional Tap fucntion |
|
data | r | Get g sensor adc data |
|
selftest | w | 1: Electrostatic actuation of the accelerometer, results in a DC shift of the X, Y and Z axis outputs. 0 : return the accelerometer to normal operation |
|
Usage: enable g sensor
echo 1 > |
Usage: get g sensor adc data
cat /sys/devices/virtual/input/input3/adc |
echo 1 16 22 32 64 128 260 580 800 1024 > adc_table |