ASM330lhh
Hi,
I am working with ASM330lhh, connected to my linux device via i2c.
in the sysfs i can see the device with the command "ls -l /sys/bus/iio/devices/iio:device1/" that return:
total 0
-r--r--r-- 1 root root 4096 Mar 24 14:21 consumers
-rw-r--r-- 1 root root 4096 Mar 24 14:21 current_timestamp_clock
-r--r--r-- 1 root root 4096 Mar 24 14:21 dev
drwxr-xr-x 2 root root 0 Mar 24 14:21 events
--w------- 1 root root 4096 Mar 24 14:21 hwfifo_flush
-rw-r--r-- 1 root root 4096 Mar 24 14:21 hwfifo_watermark
-r--r--r-- 1 root root 4096 Mar 24 14:21 hwfifo_watermark_max
-r--r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_scale_available
-rw-r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_x_raw
-rw-r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_x_scale
-rw-r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_y_raw
-rw-r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_y_scale
-rw-r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_z_raw
-rw-r--r-- 1 root root 4096 Mar 24 14:21 in_anglvel_z_scale
-r--r--r-- 1 root root 4096 Mar 24 14:21 name
lrwxrwxrwx 1 root root 0 Mar 24 14:21 of_node -> ../../../../../../../../firmware/devicetree/base/soc@0/bus@30800000/i2c@30a40000/asm330lhh@6a
drwxr-xr-x 2 root root 0 Mar 24 14:21 power
-rw-r--r-- 1 root root 4096 Mar 29 15:59 sampling_frequency
-r--r--r-- 1 root root 4096 Mar 24 14:21 sampling_frequency_available
lrwxrwxrwx 1 root root 0 Mar 24 10:25 subsystem -> ../../../../../../../../bus/iio
-r--r--r-- 1 root root 4096 Mar 24 14:21 suppliers
-rw-r--r-- 1 root root 4096 Mar 24 10:25 uevent
from the linux terminal i am reading the device registers with 'i2cdump -f -y 2 0x6a' command, so the i2c is working.
my questions:
1. What are the units the i got from the command "cat in_anglvel_x_raw" ? degrres/second, milli degrees/second or radians?
2. what i need to do with the value of "in_anglvel_x_scale" ?
3. is there is a special mode to read from the libiio user space application?
FIFO or somthing like that? a code example will be great!
4.how should i initiate the device via i2c in the start?
Thanks
