diff options
author | Bogdan Davidoaia <bogdan.davidoaia@linaro.org> | 2017-01-26 16:36:57 +0200 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2017-01-27 17:46:18 +0000 |
commit | 678d1ba9860c5314e638f826ec269e0a0cef4522 (patch) | |
tree | 72611d6317011fb2c4d9892bcc5b1e391bfef0d2 /include | |
parent | 0ceca659e38069a8290e23f3e797b6444198d28b (diff) |
sensor: add SENSOR_CHAN_*_XYZ enum values
Add SENSOR_CHAN_*_XYZ enum values to be used instead of
SENSOR_CHAN_*_ANY, because the new naming takes into account that
they are used to fetch all the 3 axes for a channel (X, Y and Z)
and not just any number of them.
Also deprecate old SENSOR_CHAN_*_ANY enum values.
Change-Id: I59e9901c1f8879d084bdb7c95583c2b28aa1e025
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sensor.h | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/include/sensor.h b/include/sensor.h index fae9650bd..0b0c8601b 100644 --- a/include/sensor.h +++ b/include/sensor.h @@ -50,24 +50,45 @@ enum sensor_channel { SENSOR_CHAN_ACCEL_Y, /** Acceleration on the Z axis, in m/s^2. */ SENSOR_CHAN_ACCEL_Z, - /** Acceleration on any axis. */ - SENSOR_CHAN_ACCEL_ANY, + /** Acceleration on the X, Y and Z axes. */ + SENSOR_CHAN_ACCEL_XYZ, + /** + * This enum value will be deprecated. + * Please use SENSOR_CHAN_ACCEL_XYZ instead. + * + * Acceleration on any axis. + */ + SENSOR_CHAN_ACCEL_ANY = SENSOR_CHAN_ACCEL_XYZ, /** Angular velocity around the X axis, in radians/s. */ SENSOR_CHAN_GYRO_X, /** Angular velocity around the Y axis, in radians/s. */ SENSOR_CHAN_GYRO_Y, /** Angular velocity around the Z axis, in radians/s. */ SENSOR_CHAN_GYRO_Z, - /** Angular velocity on any axis. */ - SENSOR_CHAN_GYRO_ANY, + /** Angular velocity around the X, Y and Z axes. */ + SENSOR_CHAN_GYRO_XYZ, + /** + * This enum value will be deprecated. + * Please use SENSOR_CHAN_GYRO_XYZ instead. + * + * Angular velocity on any axis. + */ + SENSOR_CHAN_GYRO_ANY = SENSOR_CHAN_GYRO_XYZ, /** Magnetic field on the X axis, in Gauss. */ SENSOR_CHAN_MAGN_X, /** Magnetic field on the Y axis, in Gauss. */ SENSOR_CHAN_MAGN_Y, /** Magnetic field on the Z axis, in Gauss. */ SENSOR_CHAN_MAGN_Z, - /** Magnetic field on any axis. */ - SENSOR_CHAN_MAGN_ANY, + /** Magnetic field on the X, Y and Z axes. */ + SENSOR_CHAN_MAGN_XYZ, + /** + * This enum value will be deprecated. + * Please use SENSOR_CHAN_MAGN_XYZ instead. + * + * Magnetic field on any axis. + */ + SENSOR_CHAN_MAGN_ANY = SENSOR_CHAN_MAGN_XYZ, /** Temperature in degrees Celsius. */ SENSOR_CHAN_TEMP, /** Pressure in kilopascal. */ @@ -342,7 +363,7 @@ static inline int sensor_sample_fetch_chan(struct device *dev, * has not been called in the meantime. * * For vectorial data samples you can request all axes in just one call - * by passing the specific channel with _ANY suffix. The sample will be + * by passing the specific channel with _XYZ suffix. The sample will be * returned at val[0], val[1] and val[2] (X, Y and Z in that order). * * @param dev Pointer to the sensor device |