/hardware/invensense/6515/libsensors_iio/software/simple_apps/devnode_parser/ |
D | read_device_node.c | 56 void get_sensor_data(char *d, short *sensor) in get_sensor_data() argument 60 sensor[i] = *(short *)(d + 2 + i * 2); in get_sensor_data() 76 short sensor[3]; in read_data() local 121 get_sensor_data(dptr, sensor); in read_data() 123 … printf("PRESS, %d, %lld\n", (sensor[1] << 16) + (unsigned short)sensor[2], *(long long *)dptr); in read_data() 129 get_sensor_data(dptr, sensor); in read_data() 131 … printf("ACCEL, %d, %d, %d, %lld\n", sensor[0], sensor[1], sensor[2], *(long long *)dptr); in read_data() 137 get_sensor_data(dptr, sensor); in read_data() 139 … printf("GYRO, %d, %d, %d, %lld\n", sensor[0], sensor[1], sensor[2], *(long long *)dptr); in read_data() 145 get_sensor_data(dptr, sensor); in read_data() [all …]
|
/hardware/interfaces/sensors/aidl/default/ |
D | Sensors.cpp | 35 auto sensor = mSensors.find(in_sensorHandle); in activate() local 36 if (sensor != mSensors.end()) { in activate() 37 sensor->second->activate(in_enabled); in activate() 46 auto sensor = mSensors.find(in_sensorHandle); in batch() local 47 if (sensor != mSensors.end()) { in batch() 48 sensor->second->batch(in_samplingPeriodNs); in batch() 65 auto sensor = mSensors.find(in_sensorHandle); in flush() local 66 if (sensor != mSensors.end()) { in flush() 67 return sensor->second->flush(); in flush() 74 for (const auto& sensor : mSensors) { in getSensorsList() local [all …]
|
/hardware/google/pixel/thermal/utils/ |
D | thermal_stats_helper.cpp | 131 for (const auto &[sensor, sensor_info] : sensor_info_map_) { in initializeSensorCdevRequestStats() 151 sensor_cdev_request_stats_map_[sensor][cdev] in initializeSensorCdevRequestStats() 156 sensor_cdev_request_stats_map_[sensor][cdev].stats_by_default_threshold = in initializeSensorCdevRequestStats() 160 << sensor << "-" << cdev << "]"; in initializeSensorCdevRequestStats() 169 LOG(ERROR) << "For sensor " << sensor << " bindedCdev: " << cdev in initializeSensorCdevRequestStats() 175 sensor_cdev_request_stats_map_[sensor][cdev] in initializeSensorCdevRequestStats() 179 << sensor << "-" << cdev << "]"; in initializeSensorCdevRequestStats() 193 for (const auto &[sensor, sensor_info] : sensor_info_map_) { in initializeSensorTempStats() 197 sensor_stats_info.record_by_default_threshold_all_or_name_set_, sensor)) { in initializeSensorTempStats() 199 temp_stats_map_[sensor].stats_by_default_threshold = in initializeSensorTempStats() [all …]
|
D | thermal_info.cpp | 217 bool ParseOffsetThresholds(const std::string_view name, const Json::Value &sensor, in ParseOffsetThresholds() argument 220 Json::Value config_offset_thresholds = sensor["OffsetThresholds"]; in ParseOffsetThresholds() 221 Json::Value config_offset_values = sensor["OffsetValues"]; in ParseOffsetThresholds() 257 bool ParseVirtualSensorInfo(const std::string_view name, const Json::Value &sensor, in ParseVirtualSensorInfo() argument 259 if (sensor["VirtualSensor"].empty() || !sensor["VirtualSensor"].isBool()) { in ParseVirtualSensorInfo() 263 bool is_virtual_sensor = sensor["VirtualSensor"].asBool(); in ParseVirtualSensorInfo() 279 Json::Value values = sensor["Combination"]; in ParseVirtualSensorInfo() 291 if (sensor["Formula"].asString().compare("COUNT_THRESHOLD") == 0) { in ParseVirtualSensorInfo() 293 } else if (sensor["Formula"].asString().compare("WEIGHTED_AVG") == 0) { in ParseVirtualSensorInfo() 295 } else if (sensor["Formula"].asString().compare("MAXIMUM") == 0) { in ParseVirtualSensorInfo() [all …]
|
/hardware/interfaces/sensors/common/vts/2_X/ |
D | VtsHalSensorsV2_XTargetTest.h | 112 for (const SensorInfoType& sensor : sensorsToWaitFor) { in flushesReceived() local 113 if (getFlushCount(sensor.sensorHandle) < numCallsToFlush) { in flushesReceived() 121 for (const SensorInfoType& sensor : sensorsToWaitFor) { in eventsReceived() local 122 if (getEvents(sensor.sensorHandle).size() == 0) { in eventsReceived() 234 bool getDirectChannelSensor(SensorInfoType* sensor, SharedMemType* memType, RateLevel* rate); 240 void verifyConfigure(const SensorInfoType& sensor, SharedMemType memType, 243 void checkRateLevel(const SensorInfoType& sensor, int32_t directChannelHandle, 367 for (const SensorInfoType& sensor : getSensorsList()) { in getInvalidSensorHandle() local 368 maxHandle = std::max(maxHandle, sensor.sensorHandle); in getInvalidSensorHandle() 615 for (const SensorInfoType& sensor : sensorGroup) { in runFlushTest() local [all …]
|
/hardware/interfaces/sensors/aidl/vts/ |
D | VtsAidlHalSensorsTargetTest.cpp | 111 bool isDirectChannelTypeSupported(SensorInfo sensor, ISensors::SharedMemInfo::SharedMemType type) { in isDirectChannelTypeSupported() argument 114 return (sensor.flags & SensorInfo::SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM) != 0; in isDirectChannelTypeSupported() 116 return (sensor.flags & SensorInfo::SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC) != 0; in isDirectChannelTypeSupported() 122 bool isDirectReportRateSupported(SensorInfo sensor, ISensors::RateLevel rate) { in isDirectReportRateSupported() argument 123 unsigned int r = static_cast<unsigned int>(sensor.flags & in isDirectReportRateSupported() 269 for (const SensorInfo& sensor : sensorsToWaitFor) { in flushesReceived() local 270 if (getFlushCount(sensor.sensorHandle) < numCallsToFlush) { in flushesReceived() 278 for (const SensorInfo& sensor : sensorsToWaitFor) { in eventsReceived() local 279 if (getEvents(sensor.sensorHandle).size() == 0) { in eventsReceived() 330 void verifyConfigure(const SensorInfo& sensor, ISensors::SharedMemInfo::SharedMemType memType, [all …]
|
/hardware/interfaces/sensors/1.0/ |
D | types.hal | 21 * introduction to and detailed descriptions of Android sensor types: 46 * Each sensor has a type which defines what this sensor measures and how 52 * Device manufacturers (OEMs) can define their own sensor types, for 54 * sensor types are specific to an OEM and can't be exposed in the SDK. 59 * the description of the sensor type. 61 * Each sensor also has a "typeAsString". 63 * values defined in Android API with "android.sensor." prefix. 66 * typeAsString = "" (will be replace by "android.sensor.accelerometer" by 69 * by the sensor provider's or OEM reverse domain name. In particular, they 70 * cannot use the "android.sensor." prefix. [all …]
|
D | ISensors.hal | 31 * Data is injected for the supported sensors by the sensor service in 41 * Activate/de-activate one sensor. 43 * After sensor de-activation, existing sensor events that have not 45 * subsequent activation will not get stale sensor events (events 48 * @param sensorHandle is the handle of the sensor to change. 49 * @param enabled set to true to enable, or false to disable the sensor. 56 * Generate a vector of sensor events containing at most "maxCount" 62 * If there is no sensor event when this function is being called, block 63 * until there are sensor events available. 69 * @return data vector of Event contains sensor events. [all …]
|
/hardware/interfaces/sensors/2.1/ |
D | types.hal | 28 * wake-up sensor: yes 30 * A sensor of this type measures the angle, in degrees, between two 31 * integral parts of the device. Movement of a hinge measured by this sensor 37 * Implement wake-up proximity sensor before implementing a non wake-up 38 * proximity sensor. 47 /** sensor identifier */ 59 * this sensor throughout the HAL API. 64 * Name of this sensor. 75 * output of this sensor. This is important for fused sensors when the 80 /** this sensor's type. */ [all …]
|
D | ISensors.hal | 27 * The SensorInfo for each sensor returned by getSensorsList must be stable 29 * entire system restarts. The SensorInfo for each sensor must not change 31 * HAL and its dependencies (for example, the sensor handle for a given 32 * sensor must not change across HAL restarts). 41 * framework of asynchronous events, such as a dynamic sensor connection. 43 * The Event FMQ is used to transport sensor events from the HAL to the 47 * sensor events, the HAL writes the sensor events to the Event FMQ. 49 * Once the HAL is finished writing sensor events to the Event FMQ, the HAL 50 * must notify the framework that sensor events are available to be read and 80 * asynchronous events, such as a dynamic sensor connection. [all …]
|
/hardware/libhardware/modules/sensors/dynamic_sensor/test/ |
D | HidRawDeviceTest.cpp | 71 SP(HidRawSensor) sensor{ in test() 74 if (!sensor->isValid()) { in test() 79 const sensor_t *s = sensor->getSensor(); in test() 81 LOG_V << sensor->dump() << LOG_ENDL; in test() 85 LOG_V << "sensor: " << e.sensor << ", type: " << e.type << ", ts: " << e.timestamp in test() 92 sensor->setEventCallback(&callback); in test() 95 sensor->batch(100LL*1000*1000 /*ns*/, 0); in test() 96 sensor->enable(true); in test() 105 sensor->handleInput(id, buffer); in test() 109 sensor->enable(false); in test()
|
/hardware/interfaces/sensors/common/default/2.X/multihal/tests/fake_subhal/ |
D | SensorsSubHal.cpp | 93 for (const auto& sensor : mSensors) { in getSensorsList() local 94 sensors.push_back(sensor.second->getSensorInfo()); in getSensorsList() 102 for (auto sensor : mSensors) { in setOperationMode() local 103 sensor.second->setOperationMode(mode); in setOperationMode() 110 auto sensor = mSensors.find(sensorHandle); in activate() local 111 if (sensor != mSensors.end()) { in activate() 112 sensor->second->activate(enabled); in activate() 120 auto sensor = mSensors.find(sensorHandle); in batch() local 121 if (sensor != mSensors.end()) { in batch() 122 sensor->second->batch(samplingPeriodNs); in batch() [all …]
|
/hardware/libhardware/modules/sensors/dynamic_sensor/ |
D | DynamicSensorManager.cpp | 114 .sensor = mHandleRange.first, in flush() 134 bool DynamicSensorManager::registerSensor(sp<BaseSensorObject> sensor) { in registerSensor() argument 136 if (mReverseMap.find(sensor.get()) != mReverseMap.end()) { in registerSensor() 147 mMap.emplace(handle, sensor); in registerSensor() 148 mReverseMap.emplace(sensor.get(), handle); in registerSensor() 149 sensor->setEventCallback(this); in registerSensor() 154 std::forward_as_tuple(handle, sensor)); in registerSensor() 161 void DynamicSensorManager::unregisterSensor(sp<BaseSensorObject> sensor) { in unregisterSensor() argument 163 auto i = mReverseMap.find(sensor.get()); in unregisterSensor() 202 event.sensor = 0; in submitEvent() [all …]
|
D | README.md | 7 * [Sensor HAL dynamic sensor support](https://source.android.com/devices/sensors/sensors-hal2#dyn… 10 ## Adding dynamic sensor support to a device 12 A few files need to be modified to add dynamic sensor support to a device. The 13 dynamic sensor HAL must be enabled in the device product makefile and in the 14 sensor sub-HAL configuration file, support for raw HID devices must be configured 38 +# Add the dynamic sensor HAL. 61 # Allow sensor HAL to read thruster state. 64 +# Allow access for dynamic sensor properties. 72 # Thruster sensor enforcements. 83 +# Dynamic sensor [all …]
|
/hardware/interfaces/sensors/common/default/2.X/ |
D | Sensors.h | 82 for (auto sensor : mSensors) { in setOperationMode() local 83 sensor.second->setOperationMode(mode); in setOperationMode() 89 auto sensor = mSensors.find(sensorHandle); in activate() local 90 if (sensor != mSensors.end()) { in activate() 91 sensor->second->activate(enabled); in activate() 115 for (auto sensor : mSensors) { in initializeBase() local 116 sensor.second->activate(false /* enable */); in initializeBase() 158 auto sensor = mSensors.find(sensorHandle); in batch() local 159 if (sensor != mSensors.end()) { in batch() 160 sensor->second->batch(samplingPeriodNs); in batch() [all …]
|
/hardware/interfaces/sensors/2.0/ |
D | ISensors.hal | 31 * The SensorInfo for each sensor returned by getSensorsList must be stable 33 * entire system restarts. The SensorInfo for each sensor must not change 35 * HAL and its dependencies (for example, the sensor handle for a given 36 * sensor must not change across HAL restarts). 46 * Data is injected for the supported sensors by the sensor service in 56 * Activate/de-activate one sensor. 58 * After sensor de-activation, existing sensor events that have not 60 * subsequent activations do not get stale sensor events (events 63 * @param sensorHandle is the handle of the sensor to change. 64 * @param enabled set to true to enable, or false to disable the sensor. [all …]
|
D | ISensorsCallback.hal | 25 * If a dynamic sensor was previously connected and has not been 26 * disconnected, then that sensor must not be included in sensorInfos. 28 * @param sensorInfos vector of SensorInfo for each dynamic sensor that 37 * If a dynamic sensor was previously disconnected and has not been 38 * reconnected, then that sensor must not be included in sensorHandles. 40 * The HAL must ensure that all sensor events from departing dynamic 44 * @param sensorHandles vector of sensor handles for each dynamic sensors
|
/hardware/qcom/sm8150/thermal/ |
D | thermal_common.c | 216 struct vendor_temperature *sensor, in initialize_sensor() argument 220 if (v_sen_t == NULL || sensor == NULL || in initialize_sensor() 226 sensor->tzn = get_tzn(v_sen_t->sensor_list[sens_idx]); in initialize_sensor() 227 if (sensor->tzn < 0) { in initialize_sensor() 229 v_sen_t->sensor_list[sens_idx], sensor->tzn); in initialize_sensor() 233 sensor->t.name = get_cpu_label(sens_idx); in initialize_sensor() 235 sensor->t.name = v_sen_t->label; in initialize_sensor() 237 sensor->t.type = v_sen_t->type; in initialize_sensor() 238 sensor->mult = v_sen_t->mult; in initialize_sensor() 241 sensor->t.throttling_threshold = v_sen_t->throt_thresh; in initialize_sensor() [all …]
|
/hardware/interfaces/biometrics/fingerprint/2.3/ |
D | IBiometricsFingerprint.hal | 30 * Returns whether the fingerprint sensor is an under-display fingerprint 31 * sensor. 32 * @param sensorId the unique sensor ID for which the operation should be 34 * @return isUdfps indicating whether the specified sensor is an 35 * under-display fingerprint sensor. 41 * sensor area. 44 * fingerprint sensor at a time. 46 * If multiple fingers are detected within the sensor area, only the 61 * Notifies about a finger leaving the under-display fingerprint sensor area. 64 * fingerprint sensor at a time. [all …]
|
/hardware/google/camera/common/sensor_listener/tests/ |
D | how_to_run.txt | 5 # GoogSensorSyncTest: test Vsync sensor. 19 # Run device_orientation sensor test, try to rotate device: 22 # Run light sensor test, try to put device under different lighting conditions: 25 # Run proximity sensor test, try to move hands close/away from device: 28 # Run accelerometer sensor test: 31 # Run gravity sensor test: 34 # Run gyroscope sensor test: 37 # Run linear_acceleration sensor test: 40 # Run magnetic_field sensor test:
|
/hardware/interfaces/sensors/common/vts/utils/include/sensors-vts-utils/ |
D | SensorsHidlTestBase.h | 212 SensorInfoType sensor = defaultSensorByType(type); in testStreamingOperation() local 214 if (!isValidType(sensor.type)) { in testStreamingOperation() 219 if (std::chrono::microseconds(sensor.minDelay) > samplingPeriod) { in testStreamingOperation() 224 int32_t handle = sensor.sensorHandle; in testStreamingOperation() 262 SensorInfoType sensor = defaultSensorByType(type); variable 264 if (!isValidType(sensor.type)) { 269 int32_t handle = sensor.sensorHandle; 270 int64_t minSamplingPeriodInNs = sensor.minDelay * 1000ll; 271 int64_t maxSamplingPeriodInNs = sensor.maxDelay * 1000ll; 360 SensorInfoType sensor = defaultSensorByType(type); in testBatchingOperation() local [all …]
|
/hardware/invensense/6515/libsensors_iio/software/simple_apps/stress_iio/ |
D | stress_iio.c | 700 void get_sensor_data(char *d, short *sensor) in get_sensor_data() argument 705 sensor[i] = *(short *)(d + 2 + i * 2); in get_sensor_data() 712 short sensor[3]; in read_data() local 790 get_sensor_data(dptr, sensor); in read_data() 792 … printf("PRESSURE:%d, %lld\n", (sensor[1] << 16) + (unsigned short)sensor[2], *(long long *)dptr); in read_data() 798 get_sensor_data(dptr, sensor); in read_data() 800 printf("A:%d, %d, %d, %lld\n", sensor[0], sensor[1], sensor[2], *(long long *)dptr); in read_data() 806 get_sensor_data(dptr, sensor); in read_data() 809 printf("G:%d, %d, %d, %lld\n", sensor[0], sensor[1], sensor[2], *(long long *)dptr); in read_data() 815 get_sensor_data(dptr, sensor); in read_data() [all …]
|
/hardware/interfaces/sensors/2.0/vts/functional/ |
D | VtsHalSensorsV2_0TargetTest.cpp | 215 SensorInfoType sensor; in TEST_P() local 218 if (!getDirectChannelSensor(&sensor, &memType, &rate)) { in TEST_P() 223 configDirectReport(sensor.sensorHandle, -1, rate, [](Result result, int32_t /* reportToken */) { in TEST_P() 232 SensorInfoType sensor; in TEST_P() local 236 if (!getDirectChannelSensor(&sensor, &memType, &rate)) { in TEST_P() 252 sensor.sensorHandle, directChannelHandle, rate, in TEST_P() 267 sensor.sensorHandle, directChannelHandle, rate, in TEST_P() 285 SensorInfoType sensor; in TEST_P() local 293 sensor = sensors.front(); in TEST_P() 294 sensor.sensorHandle = getInvalidSensorHandle(); in TEST_P() [all …]
|
/hardware/interfaces/automotive/evs/1.1/ |
D | types.hal | 206 * Maximum number of readings (points on waveform) provided per sensor in 221 * around the car, starting from front left-most sensor. 245 * Provides the orientation and location of a car sensor relative to the android automotive 247 * https://source.android.com/devices/sensors/sensor-types#auto_axes 248 * The sensor pose defines the transformation to be applied to the android automotive axes to 249 * obtain the sensor local axes. 252 * This rotation and translation applied to the sensor data in the sensor's local coordinate 255 * Here Pcar is a point in automotive coordinate system and Psensor is a point in the sensor's 258 * For a sensor on the front bumper and on the left corner of the car with its X axis pointing to 259 * the front, the sensor is located at (-2, 4, 0) meters w.r.t android automotive axes and the [all …]
|
/hardware/interfaces/biometrics/face/1.0/ |
D | types.hal | 91 * e.g. the sensor was unable to process the current image or the HAT was 99 * framework and sensor-specific, but is generally on the order of 30 190 * The detected face is too close to the sensor, and the image cannot be 193 * The user is expected to be informed to move further from the sensor when 200 * the sensor. 202 * The user is expected to be informed to move closer to the sensor when 208 * Only the upper part of the face was detected. The sensor's field of view 211 * The user should be informed to move up with respect to the sensor when 217 * Only the lower part of the face was detected. The sensor's field of view 220 * The user should be informed to move down with respect to the sensor when [all …]
|