Hi Gianmaria, You need a HAL sensor implement to let Android system know that there is sensor in kernel. You can refer to this HAL sensor implement http://androidxref.com/9.0.0_r3/xref/hardware/invensense/65xx/
Thanks, Vu Tran Vào Th 2, 2 thg 12, 2019 vào lúc 21:54 Gianmaria Iaculo < gianmari...@nventa.it> đã viết: > Good morning, > I need a little help with accelerometer porting, I'm new to this task and > right now I'm a little bit confused. I've read the documentation on Google > Sensors Stack here: > https://source.android.com/devices/sensors/sensor-stack > but I'm not able to go ahead. > > Actually I've my accelerometer (Freescale MMA8451) connected to I2C and > correctly working, my kernel drivers are loaded and i can see > under /sys/class/input/input2 enable, name and so on. I can set enable = 1 > with cat and I can read values with getevent. > > Now the hard part.. I have to add this to the HAL, cause android continues > to say "no accelerometer connected". It's not clear to me what are the > following steps. > > 1) What to add in sensors.h > 2)Do I need a sensor.cpp ? Or kernel drivers are enough? > 3) What else? > > > Any help or hint will be appreciated. > > Gianmaria > > -- > -- > unsubscribe: android-porting+unsubscr...@googlegroups.com > website: http://groups.google.com/group/android-porting > > --- > You received this message because you are subscribed to the Google Groups > "android-porting" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to android-porting+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-porting/4751ca88-e0dd-4a88-8902-c6abdc3cce0b%40googlegroups.com > <https://groups.google.com/d/msgid/android-porting/4751ca88-e0dd-4a88-8902-c6abdc3cce0b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/CADfFnWh%3DSAa8%2BbpJWdHk-QyO42mXVQqgF4M5cHi2uQeArF%3DeMg%40mail.gmail.com.