Conversation
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
- Provide a set of basic algs. Currently, it has only been tested with the daemon. It should be useable on the embedded side. The make system needs to be beefed up to support embedded use. - Add a daemon. This supports different modes of operation/translation. Data can be sourced from: - Input event devices. - IIO devices - Files (testing) Data can be sent to: - Another input device - A file. With suitable mods, this can also be linked to part of a the HAL. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
This is not for a particular kernel and can be adapted to most kernels. This driver uses I2C to talk to an OSP sensor hub. Two output options are offered: - input events - IIO See README for installation details. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Remove obsolete Keil work around code. Consolidate union members. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
This is a temporary work around to support private sensors prior to debugging inbound control packets. This patch adds 2 registers used to select between private and android sensor spaces. By default, android sensor space is selected to retain compatibility. 0x1f - a read of this register selects the android sensor space 0x1e - a read of this register selects the private sensor space Usage protocol: To enable/disable a public sensor: read(0x1f) read(0x20+sensor number) or read(0x50+sensor number) To enable/disable a private sensor: read(0x1e) read(0x20+private sensor number) or read(0x50+private sensor number) Note the private sensor number is the sensor number without the high private bit set! Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Non static binaries requires usage of a bionic toolchain. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Unbuffered iio devices do not have a scanelements directory. Handle the case where that directory is not there. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
- Add null pointer check for data coming from algs. - Abort if cal length being read is longer then available buffer space. - Add quiet option to suppress initial banner. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
[inputN|outputN].option provides a way for a driver to receive configuration/option info. The parameter is a 32bit unsigned value. Values can be specified as decimal or hex by prefixing it with a 0x. The meaning of the value is solely determined by the driver. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Add support for 3 options: bit 0 - enable embedded time stamp support. 64 bit time stamps are sent as ABS_THROTTLE (upper 32bit) and ABS_RUDDER (lower 32bit) bit 1 - Send the 4th element of a quaternion as ABS_WHEEL. bit 2 - Enable dithering of data. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
These files are used for defines and datastructures but are not included by the NDK toolchain. For now, save a copy here. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
The data structure is initialized to 0 but DRIVER_INPUT is also 0. Moving DRIVER_INPUT to a non-zero value allows 0'ed but not configured entries to be ignored. Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
Signed-off-by: Hunyue Yau <hy-git@hy-research.com>
There was a problem hiding this comment.
What was this meant to do? Why is this using both fields of the union?
There was a problem hiding this comment.
Data conversion. As indicated by references to formats.
|
Some general review comments/questions -
|
|
This is a daemon; it does not exit. |
linux/driver/osp-iio.c
Outdated
There was a problem hiding this comment.
Total No of android sensors created : 16 ..
While creating IIO device, we are initializing data for android sensors : SENSOR_ACCELEROMETER, SENSOR_GYROSCOPE, SENSOR_MAGNETIC_FIELD &
SENSOR_ROTATION_VECTOR. do we need to set data for other sensors as well?
There was a problem hiding this comment.
That code is left over from before the sensorhub was available. It is still there to make it easy to catch the case where the sensorhub is failing to send data. Once we have a reliable hub, this code should go away.
This is the update which supports: