STMicroelectronics / st-mems-android-linux-drivers-iio

stm mems iio drivers for Android and Linux platforms.
GNU General Public License v2.0
23 stars 1 forks source link

ASM330LHH IIO driver on kernel 5.10 #11

Closed ButterCatzz closed 1 year ago

ButterCatzz commented 1 year ago

Hi, I have ported the IIO driver to Kernel5.10 and it should be working fine. But I'm not sure how to read the sensor value from the application layer. I use "cat /sys/bus/iio/devices/iio\:device0/in_anglvel_x_raw" to get this error: "The cat: '/ sys/bus/iio/devices/iio: device0 / in_anglvel_x_raw' : Remote I/O error".

If I use the "fread" function in c code to read xxx_raw files, I end up with zero values.

Is there a demo of application layer reading code? Can you provide it for my reference?

ButterCatzz commented 1 year ago

The problem has been resolved. The reason for the "Remote I/O error" is that I2C did not receive an ACK signal. Check the hardware circuit and solve it