1. add function sensing_iodev_submit and defined struct
sensing_submit_config
2. fix the issue of phy_3d_sensor
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Initializers must be compile time constants (not expressions!) for clang
to be happy. Clang rightfully pointed out that the callback_list member
of sensing_connection was being initialized using an expression that was
not compile-time constant.
The macros passed along a pointer created by taking the address of a
global constant and then at initialization time attempting to
dereference it using the * operator. So in the end the compiler has
identifier its trying to first take the address of and then later
dereference in an initializer. Clang didn't appreciate this, though gcc
seemed to be just fine.
Actually clang 17 might work just fine with this as well, but clang 16
(the clang I tried) didn't like it at all.
Instead store the pointer to the callback list rather than copying the
struct. This could be done the other way and not passing a
pointer through the macros perhaps.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Many sensors have multiple functions, for example, icm42688 supports
accel, gyro and temperature, and the sensor streaming api always mixes
the multiple functions in one function call. So we need add a layer in
sensing subsystem to dispatch the result returned from sensor streaming
api for each function.
I changed the sensor-type(int) to sensor-types(array) in sensing sensor
device bindings, so that one device can map to multiple instances of
sensing sensor.
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Add hinge angle virtual sensor for sensing subsystem, hinge angle sensor
takes both base accel and lid accel as reporter.
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
This patch is to implement the phy_3d_sensor in sensing subsystem. It's a
wrapper layer of AGM sensor driver for sensing subsystem. It supports
the accelerometer and gyrometer now.
This has been tested with bmi160 on native_posix simulator.
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
1. use the sensor_driver_api instead of the sensing_sensor_api.
2. clean up the sensing_sensor.h after using the unified api.
3. select RTIO while CONFIG_SENSING is enabled.
4. remove the sensing_sensor_post_data and sensing_sensor_xxx_data_ready by
introducing the RTIO
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>