Skip to content

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

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stm-sensors-hal-iio documentation

Introduction

This repository hosts the STMicroelectronics HAL (Hardware Abstraction Layer) for mems sensors running in Android or Linux systems based on the STMicroelectronics github hosted IIO drivers.

This HAL implementation is leaning on the Linux IIO framework to gather data from sensor device drivers.

You can find a list of sensors supported directly into the source code here.

Architecture

Four different components can be identified:

core
This is the main component of the HAL. All the adapter components are interacting with the core in order to send commands and receive sensors data and events.
android multi-hal (Android 11 and above)
Android multi-hal adapter.
android hidl 2.0 (Android 11 and above)
Android HIDL 2.0 adapter (full treble).
android aidl (Android 13 and above)
Android AIDL AIDL adapter (full treble).
android legacy (Android 10 and inferior)
Android legacy (pre full treble) adapter.
linux
Linux implementation adapter.

Android

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:

Linux

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.

Here you can find the related documentation.

Core

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

Here you can find the related documentation.

About

stm mems sensors-hal for Android and Linux platforms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.9%
  • CMake 2.3%
  • Makefile 1.7%
  • C 1.1%