Comments (5)
You shouldn't need any sensor HAL modifications for this. If the sensor has an IIO kernel driver and type of the sensor is supported by the sensor HAL it should likely just work. You need to enable the kernel driver for your sensor hardware and add a device tree overlay to enable the driver/configure I2C. This only requires compiling the kernel & dtbs.
Probably can't explain it any better than I did here https://forums.raspberrypi.com/viewtopic.php?t=297349&start=125#p1927487 (read the rest of that page as well).
from android_kernel_brcm_rpi.
You shouldn't need any sensor HAL modifications for this. If the sensor has an IIO kernel driver and type of the sensor is supported by the sensor HAL it should likely just work. You need to enable the kernel driver for your sensor hardware and add a device tree overlay to enable the driver/configure I2C. This only requires compiling the kernel & dtbs.
Probably can't explain it any better than I did here https://forums.raspberrypi.com/viewtopic.php?t=297349&start=125#p1927487 (read the rest of that page as well).
The information you give is very precious!
Could you please tell me the following question~~??
Is this IIO HAL code written by you?? Or is it originally included in the Android source code??
If I want to write HAL code by myself, do you have any recommended reference materials?
For example
bmc150 is a 6-axis digital compass.
How does the compass API of the Android framework know which driver to connect to?
Thanks^_^
from android_kernel_brcm_rpi.
Is this IIO HAL code written by you?? Or is it originally included in the Android source code?? If I want to write HAL code by myself, do you have any recommended reference materials?
No, as you can see from the repository name, where it was forked from, and the copyright headers it was initially written by Intel. No, it is not part of Google's Android source code (AOSP) but Intel's fork to support Android on their platform (but AOSP has another IIO HAL from Intel https://android.googlesource.com/platform/hardware/intel/sensors/). One reference for IIO sensor HAL is of course the one I'm using (https://github.com/lineage-rpi/android_hardware_intel_sensors-iio) and I also have one forked from STMicro (https://github.com/lineage-rpi/android_hardware_st_sensors-iio). Android-x86 project has one additional IIO sensor HAL as well (http://git.osdn.net/view?p=android-x86/hardware-libsensors.git;a=summary).
For example bmc150 is a 6-axis digital compass. How does the compass API of the Android framework know which driver to connect to?
That's exactly what the sensor HAL is for. It sits between the kernel driver for the sensor hardware and the Android sensor framework (see https://source.android.com/devices/sensors/sensor-stack).
from android_kernel_brcm_rpi.
Is this IIO HAL code written by you?? Or is it originally included in the Android source code?? If I want to write HAL code by myself, do you have any recommended reference materials?
No, as you can see from the repository name, where it was forked from, and the copyright headers it was initially written by Intel. No, it is not part of Google's Android source code (AOSP) but Intel's fork to support Android on their platform (but AOSP has another IIO HAL from Intel https://android.googlesource.com/platform/hardware/intel/sensors/). One reference for IIO sensor HAL is of course the one I'm using (https://github.com/lineage-rpi/android_hardware_intel_sensors-iio) and I also have one forked from STMicro (https://github.com/lineage-rpi/android_hardware_st_sensors-iio). Android-x86 project has one additional IIO sensor HAL as well (http://git.osdn.net/view?p=android-x86/hardware-libsensors.git;a=summary).
For example bmc150 is a 6-axis digital compass. How does the compass API of the Android framework know which driver to connect to?
That's exactly what the sensor HAL is for. It sits between the kernel driver for the sensor hardware and the Android sensor framework (see https://source.android.com/devices/sensors/sensor-stack).
The Following web page in "android_hardware_intel_sensors-iio" is not found.
Do you know where can find reference materials on these two web pages?
https://source.android.com/devices/sensors/hal-interface.html
[basic tour of the Android sensors HAL interface]
http://source.android.com/devices/halref/sensors_8h_source.html
[Android sensor details]
In addition, in addition to HAL and DTBO config these two blocks need to be set
Do init.rc and ueventd.rc usually need to be modified?
Thanks ^_^
from android_kernel_brcm_rpi.
Do you know where can find reference materials on these two web pages?
Android documentation should have the information that is still relevant today (current Android versions).
In addition, in addition to HAL and DTBO config these two blocks need to be set Do init.rc and ueventd.rc usually need to be modified?
Usually yes, depends on the sensor HAL. All the necessary file permissions for the IIO sensor HAL I'm using are already there on my builds so if you're adding a sensor no modification should be necessary.
from android_kernel_brcm_rpi.
Related Issues (20)
- Second screen HOT 1
- Accesing GPIO from Android SDK? HOT 1
- ifconfig does not work HOT 1
- Two displays crash it... HOT 5
- camera device
- problemi di codice HOT 1
- Build error HOT 1
- Full build but not get the zImage.img HOT 2
- sensor bmp280 i2c driver in the lineage-18.1 doesn;t work HOT 1
- Cannot boot from compiled image HOT 1
- error building lineage-19.1 and lineage-18.1 on 'ARCH=arm' HOT 6
- tigervnc screen didnt display mouse icon HOT 3
- Max17040 can't enable with config_user.txt HOT 4
- Waveshare xinch DSI touchscreen support HOT 13
- Waveshare xinch DSI touchscreen recovery support HOT 1
- Cannot disable dhcp or set static ip address. HOT 4
- PS4 Controller support HOT 2
- TV doesn't recognize CEC HOT 16
- feature request: add support for Raspberry Pi TV HAT HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android_kernel_brcm_rpi.