am 730c0797: am 077d3542: Merge "Define a flag for whether a sensor supports data_injection mode or not." into mnc-dev

* commit '730c0797e5fa8127bd31c4d78a12230cac1d6829':
  Define a flag for whether a sensor supports data_injection mode or not.
This commit is contained in:
Aravind Akella 2015-06-23 23:18:18 +00:00 committed by Android Git Automerger
commit 983c943c81

View file

@ -109,11 +109,11 @@ enum {
SENSOR_HAL_NORMAL_MODE = 0,
/*
* Loopback mode. In this mode, the device shall not source data from the
* Data Injection 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.
*/
SENSOR_HAL_LOOPBACK_MODE = 0x1
SENSOR_HAL_DATA_INJECTION_MODE = 0x1
};
/*
@ -138,7 +138,16 @@ enum {
SENSOR_FLAG_CONTINUOUS_MODE = 0, // 0000
SENSOR_FLAG_ON_CHANGE_MODE = 0x2, // 0010
SENSOR_FLAG_ONE_SHOT_MODE = 0x4, // 0100
SENSOR_FLAG_SPECIAL_REPORTING_MODE = 0x6 // 0110
SENSOR_FLAG_SPECIAL_REPORTING_MODE = 0x6, // 0110
/*
* Set this flag if the sensor supports data_injection mode and allows data to be injected
* from the SensorService. When in data_injection ONLY sensors with this flag set are injected
* sensor data and only sensors with this flag set are activated. Eg: Accelerometer and Step
* Counter sensors can be set with this flag and SensorService will inject accelerometer data
* and read the corresponding step counts.
*/
SENSOR_FLAG_SUPPORTS_DATA_INJECTION = 0x8 // 1000
};
/*
@ -147,6 +156,12 @@ enum {
#define REPORTING_MODE_MASK (0xE)
#define REPORTING_MODE_SHIFT (1)
/*
* Mask and shift for data_injection mode sensor flags defined above.
*/
#define DATA_INJECTION_MASK (0x10)
#define DATA_INJECTION_SHIFT (4)
/*
* Sensor type
*