diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-07-25 17:48:02 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-07-25 17:48:02 -0700 |
commit | f0a3c389eba7edc0631b8de60fae41a73432306b (patch) | |
tree | f52fa8d9dd03a80fa857ca1d484ec0f0716c6a25 | |
parent | a60b1dd605f10335588926164d72ba021be651d5 (diff) | |
parent | 8d567480b45a801a1955e4743c5eeae431d58f56 (diff) | |
download | libhardware-donut-plus-aosp.tar.gz |
Merge korg/donut into korg/masterdonut-plus-aosp
-rw-r--r-- | include/hardware/sensors.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h index 094b3eee..a6bee561 100644 --- a/include/hardware/sensors.h +++ b/include/hardware/sensors.h @@ -22,6 +22,7 @@ #include <sys/types.h> #include <hardware/hardware.h> +#include <cutils/native_handle.h> __BEGIN_DECLS @@ -137,7 +138,7 @@ __BEGIN_DECLS * the z-axis moves toward the y-axis. * * roll: Rotation around Y axis (-90<=roll<=90), with positive values when - * the z-axis moves AWAY from the x-axis. + * the x-axis moves AWAY from the z-axis. * * Note: This definition is different from yaw, pitch and roll used in aviation * where the X axis is along the long side of the plane (tail to nose). @@ -278,14 +279,14 @@ struct sensors_control_device_t { struct hw_device_t common; /** - * Returns the fd which will be the parameter to + * Returns a native_handle_t, which will be the parameter to * sensors_data_device_t::open_data(). - * The caller takes ownership of this fd. This is intended to be + * The caller takes ownership of this handle. This is intended to be * passed cross processes. * - * @return a fd if successful, < 0 on error + * @return a native_handle_t if successful, NULL on error */ - int (*open_data_source)(struct sensors_control_device_t *dev); + native_handle_t* (*open_data_source)(struct sensors_control_device_t *dev); /** Activate/deactivate one sensor. * @@ -316,15 +317,15 @@ struct sensors_data_device_t { /** * Prepare to read sensor data. * - * This routine does NOT take ownership of the fd + * This routine does NOT take ownership of the handle * and must not close it. Typically this routine would - * use a duplicate of the fd parameter. + * use a duplicate of the nh parameter. * - * @param fd from sensors_control_open. + * @param nh from sensors_control_open. * * @return 0 if successful, < 0 on error */ - int (*data_open)(struct sensors_data_device_t *dev, int fd); + int (*data_open)(struct sensors_data_device_t *dev, native_handle_t* nh); /** * Caller has completed using the sensor data. |