diff options
author | Ashutosh Joshi <ashutoshj@google.com> | 2015-04-15 13:56:53 -0700 |
---|---|---|
committer | Ashutosh Joshi <ashutoshj@google.com> | 2015-04-15 14:47:43 -0700 |
commit | 050f2e45a042638bc2f6c1a51a805847edd9332f (patch) | |
tree | 4a6dea9ade237583129b53c00decd19c0d282c3c /include/hardware/sensors.h | |
parent | 6b46cc59ce7913d2d70e43059484fba9f09124f5 (diff) | |
download | hardware_libhardware-050f2e45a042638bc2f6c1a51a805847edd9332f.zip hardware_libhardware-050f2e45a042638bc2f6c1a51a805847edd9332f.tar.gz hardware_libhardware-050f2e45a042638bc2f6c1a51a805847edd9332f.tar.bz2 |
Remove custome sensors from sensors.h
Custom sensors should not be included in sensors.h
Change-Id: I553fbe3dd41eaaa70628184f5a0b9499699f17bc
Diffstat (limited to 'include/hardware/sensors.h')
-rw-r--r-- | include/hardware/sensors.h | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h index 90036b6..b8b550f 100644 --- a/include/hardware/sensors.h +++ b/include/hardware/sensors.h @@ -95,7 +95,7 @@ enum { /* * Availability: SENSORS_DEVICE_API_VERSION_1_4 - * Sensor HAL modes uses in set_operation_mode method + * Sensor HAL modes used in set_operation_mode method */ enum { /* @@ -108,7 +108,8 @@ enum { */ SENSOR_HAL_NORMAL_MODE = 0, - /* Loopback mode. In this mode, the device shall not source data from the + /* + * Loopback mode. In this mode, the device shall not source data from the * physical sensors as it would in normal mode. Instead sensor data is * injected by the sensor service. */ @@ -642,36 +643,6 @@ enum { #define SENSOR_STRING_TYPE_WRIST_TILT_GESTURE "android.sensor.wrist_tilt_gesture" /** - * SENSOR_TYPE_TIME_SYNC - * reporting-mode: continuous - * - * A time synchronization mechanism sensor to synchronize timing between - * differnt parts of the device. - * This sensor returns the following values in the sensor_event - * Time_stamp of the event - * u64.data[0] -> Type of event latched - * u64.data[1] -> count - * - * Implement only the wake-up version of this sensor. - */ -#define SENSOR_TYPE_TIME_SYNC (SENSOR_TYPE_DEVICE_PRIVATE_BASE + 0x10) -#define SENSOR_STRING_TYPE_TIME_SYNC "android.sensor.time_sync" - -/** - * SENSOR_TYPE_NUDGE_GESTURE - * reporting-mode: one-shot - * - * A sensor of this type triggers when the device is nudged. - * - * The only allowed return value is 1.0. This sensor - * de-activates itself immediately after it triggers. - * - * Implement only the wake-up version of this sensor. - */ -#define SENSOR_TYPE_NUDGE_GESTURE (SENSOR_TYPE_DEVICE_PRIVATE_BASE + 0x11) -#define SENSOR_STRING_NUDGE_UP_GESTURE "android.sensor.nudge_gesture" - -/** * Values returned by the accelerometer in various locations in the universe. * all values are in SI units (m/s^2) */ @@ -864,9 +835,12 @@ struct sensors_module_t { /** * Place the module in a specific mode. The following modes are defined * - * 0 - Normal operation. Default state of the module. - * 1 - Loopback mode. Data is injected for the the supported sensors by - * the sensor service in this mode. + * 0 - Normal operation. Default state of the module. + * 1 - Loopback mode. Data is injected for the the supported + * sensors by the sensor service in this mode. + * @return 0 on success + * -EINVAL if requested mode is not supported + * -EPERM if operation is not allowed */ int (*set_operation_mode)(unsigned int mode); }; @@ -1067,7 +1041,11 @@ typedef struct sensors_poll_device_1 { int (*flush)(struct sensors_poll_device_1* dev, int sensor_handle); /* - * Inject a sensor samples to be to this device. + * Inject a single sensor sample to be to this device. + * data points to the sensor event to be injected + * @return 0 on success + * -EPERM if operation is not allowed + * -EINVAL if sensor event cannot be injected */ int (*inject_sensor_data)(struct sensors_poll_device_1 *dev, const sensors_event_t *data); |