STMicroelectronics / st-mems-android-linux-sensors-hal

stm mems sensors-hal for Android and Linux platforms.
Apache License 2.0
24 stars 7 forks source link
android android-hal hal iio mems mems-sensors sensors stm stmicroelectronics

+TITLE: stm-sensors-hal-iio documentation

+SUBTITLE: notes

+AUTHOR: MEMS Software Solutions Team

This repository hosts the STMicroelectronics HAL (Hardware Abstraction Layer) for mems sensors running in Android or Linux systems based on the STMicroelectronics github hosted [[https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio][IIO drivers]].

This HAL implementation is leaning on the [[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/iio][Linux IIO framework]] to gather data from sensor device drivers.

You can find a list of sensors supported directly into the source code [[file:core/SensorsSupported.cpp][here]].

Four different components can be identified:

HAL is compiled using different makefiles in order to support the two different modes. Fortunately this is transparent at the end for the build system, correct declaration is needed in order to choose the version to build and install.

In Android legacy mode (pre full treble) the HAL is build as dynamic library (.so) and the Android framework or HIDL 1.0 service load the library at runtime. In Android HIDL 2.0 and AIDL (full treble) mode, HAL is build as an executable and a service is created to run within it.

You can find the related documentation for Android here:

In Linux, HAL is build as an executable using cmake. Current version does list the sensors found and exit, user needs to implement the final application.

[[file:linux/readme.org][Here]] you can find the related documentation.

This is the main component of the project. All the 'wrappers' are using this component for sending commands and receive data stream.

[[file:core/readme.org][Here]] you can find the related documentation.