我从这里开始关注 LSM6DSM 驱动程序的集成:
https ://github.com/STMicroelectronics/STMems_Linux_IIO_drivers/blob/linux-4.4.y-gh/README.md&
https://github.com/STMicroelectronics/STMems_Linux_IIO_drivers/树/linux-4.14.y-gh/drivers/iio/imu/st_lsm6dsm
现在我可以通过 sysfs 设备获取数据:
- grep "" /sys/bus/iio/devices/iio:device*/name
- /sys/bus/iio/devices/iio:device0/name:lsm6dsm_accel
- /sys/bus/iio/devices/iio:device1/name:lsm6dsm_gyro
- /sys/bus/iio/devices/iio:device2/name:lsm6dsm_sign_motion
- /sys/bus/iio/devices/iio:device3/name:lsm6dsm_step_c
- /sys/bus/iio/devices/iio:device4/name:lsm6dsm_step_d
- /sys/bus/iio/devices/iio:device5/name:lsm6dsm_tilt
- /sys/bus/iio/devices/iio:device6/name:lsm6dsm_wrist
- /sys/bus/iio/devices/iio:device7/name:lsm6dsm_stap
- /sys/bus/iio/devices/iio:device8/name:lsm6dsm_dtap
然后我将 HAL 集成到我的 AOSP 文件夹中:
https ://github.com/STMicroelectronics/STMems_Android_Sensor_HAL_IIO/blob/STMems_Android_Sensor_HAL_IIO/README.md&
https://github.com/STMicroelectronics/STMems_Android_Sensor_HAL_IIO/blob/STMems_Android_Sensor_HAL_IIO/Documentation自述文件
我没有使用工厂校准,因为我无法访问 lib 文件夹中的库
我的 Android 中没有显示任何内容,没有传感器:
- adb shell dumpsys sensorservice
- No Sensors on the device
- devInitCheck : -19
我在 /system/vendor/lib/hw/sensor.imx8.so 的 imx8 板上看到了
这个库
我需要额外的库吗?(SENSOR_FUSION, GEOMAG_FUSION, GBIAS, MAGCALIB, ACC_CALIB)
我同意签署保密协议:
STM 专有库的发布需要签署许可用户协议 (LUA);如需更多信息,请联系 STMicroelectronics 销售办事处和代表。
我还需要初始化其他东西吗?
任何线索将不胜感激!