Re: Request to have generic sensor support
Davidoaia, Bogdan M <bogdan.m.davidoaia@...>
Hello Kasim,toggle quoted messageShow quoted text
The sensor types from sensor.h are in no way final, and new types can be
added as the need arises for new drivers.
Not sure if your driver could define a more specific type (that may be
useful for other future drivers) rather then a generic one, but a
generic data type can be easily added.
For sending generic data to the driver, you can add a
SENSOR_ATTR_USER_DATA attribute, a SENSOR_VALUE_TYPE_USER_DATA value
type and a void *user_data field in the union from struct sensor_value.
Sending generic data back to the application can be done by adding a
SENSOR_CHAN_USER_DATA channel (together with the generic sensor value
type and filed).
On Jo, 2016-09-01 at 14:19 +0000, kasim shibi wrote: