Home
last modified time | relevance | path

Searched refs:sensor (Results 1 – 25 of 67) sorted by relevance

123

/hardware/invensense/6515/libsensors_iio/software/simple_apps/devnode_parser/
Dread_device_node.c56 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/2.0/multihal/tests/fake_subhal/
DSensorsSubHal.cpp59 for (const auto& sensor : mSensors) { in getSensorsList() local
60 sensors.push_back(sensor.second->getSensorInfo()); in getSensorsList()
68 for (auto sensor : mSensors) { in setOperationMode() local
69 sensor.second->setOperationMode(mode); in setOperationMode()
76 auto sensor = mSensors.find(sensorHandle); in activate() local
77 if (sensor != mSensors.end()) { in activate()
78 sensor->second->activate(enabled); in activate()
86 auto sensor = mSensors.find(sensorHandle); in batch() local
87 if (sensor != mSensors.end()) { in batch()
88 sensor->second->batch(samplingPeriodNs); in batch()
[all …]
DSensorsSubHal.h91 std::shared_ptr<SensorType> sensor = in AddSensor() local
93 mSensors[sensor->getSensorInfo().sensorHandle] = sensor; in AddSensor()
/hardware/interfaces/sensors/2.0/default/
DSensors.cpp65 for (const auto& sensor : mSensors) { in getSensorsList() local
66 sensors.push_back(sensor.second->getSensorInfo()); in getSensorsList()
76 for (auto sensor : mSensors) { in setOperationMode() local
77 sensor.second->setOperationMode(mode); in setOperationMode()
83 auto sensor = mSensors.find(sensorHandle); in activate() local
84 if (sensor != mSensors.end()) { in activate()
85 sensor->second->activate(enabled); in activate()
98 for (auto sensor : mSensors) { in initialize() local
99 sensor.second->activate(false /* enable */); in initialize()
142 auto sensor = mSensors.find(sensorHandle); in batch() local
[all …]
DSensors.h94 std::shared_ptr<SensorType> sensor = in AddSensor() local
96 mSensors[sensor->getSensorInfo().sensorHandle] = sensor; in AddSensor()
/hardware/interfaces/sensors/2.0/vts/functional/
DVtsHalSensorsV2_0TargetTest.cpp94 for (const SensorInfo& sensor : sensorsToWaitFor) { in flushesReceived() local
95 if (getFlushCount(sensor.sensorHandle) < numCallsToFlush) { in flushesReceived()
103 for (const SensorInfo& sensor : sensorsToWaitFor) { in eventsReceived() local
104 if (getEvents(sensor.sensorHandle).size() == 0) { in eventsReceived()
187 bool getDirectChannelSensor(SensorInfo* sensor, SharedMemType* memType, RateLevel* rate);
192 void verifyConfigure(const SensorInfo& sensor, SharedMemType memType,
195 void checkRateLevel(const SensorInfo& sensor, int32_t directChannelHandle, RateLevel rateLevel);
305 for (const SensorInfo& sensor : getSensorsList()) { in getInvalidSensorHandle() local
306 maxHandle = std::max(maxHandle, sensor.sensorHandle); in getInvalidSensorHandle()
720 for (const SensorInfo& sensor : sensors) { in runFlushTest() local
[all …]
/hardware/interfaces/sensors/1.0/
Dtypes.hal21 * 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 …]
DISensors.hal31 * 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/libhardware/modules/sensors/dynamic_sensor/test/
DHidRawDeviceTest.cpp72 SP(HidRawSensor) sensor = std::make_shared<HidRawSensor>( in test()
75 if (!sensor->isValid()) { in test()
80 const sensor_t *s = sensor->getSensor(); in test()
82 LOG_V << sensor->dump() << LOG_ENDL; in test()
86 LOG_V << "sensor: " << e.sensor << ", type: " << e.type << ", ts: " << e.timestamp in test()
93 sensor->setEventCallback(&callback); in test()
96 sensor->batch(100LL*1000*1000 /*ns*/, 0); in test()
97 sensor->enable(true); in test()
106 sensor->handleInput(id, buffer); in test()
110 sensor->enable(false); in test()
/hardware/libhardware/modules/sensors/dynamic_sensor/
DDynamicSensorManager.cpp114 .sensor = mHandleRange.first, in flush()
130 bool DynamicSensorManager::registerSensor(sp<BaseSensorObject> sensor) { in registerSensor() argument
132 if (mReverseMap.find(sensor.get()) != mReverseMap.end()) { in registerSensor()
143 mMap.emplace(handle, sensor); in registerSensor()
144 mReverseMap.emplace(sensor.get(), handle); in registerSensor()
145 sensor->setEventCallback(this); in registerSensor()
150 std::forward_as_tuple(handle, sensor)); in registerSensor()
157 void DynamicSensorManager::unregisterSensor(sp<BaseSensorObject> sensor) { in unregisterSensor() argument
159 auto i = mReverseMap.find(sensor.get()); in unregisterSensor()
198 event.sensor = 0; in submitEvent()
[all …]
DAndroid.bp73 // There are two ways to utilize the dynamic sensor module:
75 // library in existing sensor hal.
76 // 2. Use as a standalone sensor HAL and configure multihal to combine it with sensor hal that
83 // Option 1: sensor extension module
93 // Option 2: independent sensor hal
DDynamicSensorManager.h50 bool registerSensor(sp<BaseSensorObject> sensor);
51 void unregisterSensor(sp<BaseSensorObject> sensor);
76 ConnectionReport(int handle, sp<BaseSensorObject> sensor);
DBaseDynamicSensorDaemon.cpp53 for (auto &sensor : sensors) { in onConnectionChange() local
54 mManager.unregisterSensor(sensor); in onConnectionChange()
/hardware/interfaces/sensors/2.0/
DISensors.hal31 * 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 …]
DISensorsCallback.hal25 * 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/
Dthermal_common.c216 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/qcom/sdm845/thermal/
Dthermal_common.c216 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/sensors/common/vts/utils/
DSensorsHidlTestBase.cpp223 bool SensorsHidlTestBase::isDirectReportRateSupported(SensorInfo sensor, RateLevel rate) { in isDirectReportRateSupported() argument
224 unsigned int r = static_cast<unsigned int>(sensor.flags & SensorFlagBits::MASK_DIRECT_REPORT) >> in isDirectReportRateSupported()
229 bool SensorsHidlTestBase::isDirectChannelTypeSupported(SensorInfo sensor, SharedMemType type) { in isDirectChannelTypeSupported() argument
232 return (sensor.flags & SensorFlagBits::DIRECT_CHANNEL_ASHMEM) != 0; in isDirectChannelTypeSupported()
234 return (sensor.flags & SensorFlagBits::DIRECT_CHANNEL_GRALLOC) != 0; in isDirectChannelTypeSupported()
254 SensorInfo sensor = defaultSensorByType(type); in testDirectReportOperation() local
256 if (!isValidType(sensor.type)) { in testDirectReportOperation()
261 if (!isDirectReportRateSupported(sensor, rate)) { in testDirectReportOperation()
265 if (!isDirectChannelTypeSupported(sensor, memType)) { in testDirectReportOperation()
292 configDirectReport(sensor.sensorHandle, channelHandle, rate, in testDirectReportOperation()
[all …]
/hardware/invensense/6515/libsensors_iio/software/simple_apps/stress_iio/
Dstress_iio.c700 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/biometrics/face/1.0/
Dtypes.hal91 * 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 …]
/hardware/interfaces/camera/metadata/3.2/
Dtypes.hal159 * sensor's native color into linear sRGB color.</p>
166 * from sensor RGB color space to output linear sRGB color space.</p>
506 * after RAW sensor data is captured.</p>
744 * <p>The orientation of the camera relative to the sensor
1034 * <p>The desired region of the sensor to read out for this capture.</p>
1102 * sensor output streams, listed as width,
1144 /** android.sensor.exposureTime [dynamic, int64, public]
1151 /** android.sensor.frameDuration [dynamic, int64, public]
1158 /** android.sensor.sensitivity [dynamic, int32, public]
1160 * <p>The amount of gain applied to sensor data
[all …]
/hardware/interfaces/sensors/2.0/multihal/
DHalProxy.cpp319 for (SensorInfo sensor : dynamicSensorsAdded) { in onDynamicSensorsConnected() local
320 if (!subHalIndexIsClear(sensor.sensorHandle)) { in onDynamicSensorsConnected()
322 sensor.name.c_str()); in onDynamicSensorsConnected()
324 sensor.sensorHandle = setSubHalIndex(sensor.sensorHandle, subHalIndex); in onDynamicSensorsConnected()
325 mDynamicSensors[sensor.sensorHandle] = sensor; in onDynamicSensorsConnected()
326 sensors.push_back(sensor); in onDynamicSensorsConnected()
401 for (SensorInfo sensor : list) { in initializeSensorList() local
402 if (!subHalIndexIsClear(sensor.sensorHandle)) { in initializeSensorList()
405 ALOGV("Loaded sensor: %s", sensor.name.c_str()); in initializeSensorList()
406 sensor.sensorHandle = setSubHalIndex(sensor.sensorHandle, subHalIndex); in initializeSensorList()
[all …]
/hardware/libhardware/modules/sensors/
Dmultihal.cpp353 full_handle.localHandle = dest->meta_data.sensor; in copy_event_remap_handle()
354 dest->meta_data.sensor = get_global_handle(&full_handle); in copy_event_remap_handle()
356 full_handle.localHandle = dest->sensor; in copy_event_remap_handle()
357 dest->sensor = get_global_handle(&full_handle); in copy_event_remap_handle()
378 if (data[eventsRead].sensor == SENSORS_HANDLE_BASE - 1) { in poll()
434 if (data->sensor == -1) { in inject_sensor_data()
445 int local_handle = get_local_handle(data->sensor); in inject_sensor_data()
446 sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(data->sensor); in inject_sensor_data()
447 if (halIsAPILevelCompliant(this, data->sensor, SENSORS_DEVICE_API_VERSION_1_4) && in inject_sensor_data()
452 data_copy.sensor = local_handle; in inject_sensor_data()
[all …]
/hardware/invensense/65xx/libsensors_iio/software/core/mllite/
Ddata_builder.c56 void inv_apply_calibration(struct inv_single_sensor_t *sensor, const long *bias);
206 void set_sensor_orientation_and_scale(struct inv_single_sensor_t *sensor, in set_sensor_orientation_and_scale() argument
217 sensor->sensitivity = sensitivity; in set_sensor_orientation_and_scale()
232 sensor->orientation = orientation; in set_sensor_orientation_and_scale()
486 void inv_apply_calibration(struct inv_single_sensor_t *sensor, const long *bias) in inv_apply_calibration() argument
491 raw32[0] = (long)sensor->raw[0] << 15; in inv_apply_calibration()
492 raw32[1] = (long)sensor->raw[1] << 15; in inv_apply_calibration()
493 raw32[2] = (long)sensor->raw[2] << 15; in inv_apply_calibration()
495 …inv_convert_to_body_with_scale(sensor->orientation, sensor->sensitivity << 1, raw32, sensor->raw_s… in inv_apply_calibration()
501 …inv_convert_to_body_with_scale(sensor->orientation, sensor->sensitivity << 1, raw32, sensor->calib… in inv_apply_calibration()
[all …]
/hardware/interfaces/thermal/2.0/
Dtypes.hal101 * Hot throttling temperature constant for this temperature sensor in
109 * Cold throttling temperature constant for this temperature sensor in
139 * For BCL, this is the current reading of the virtual sensor and the unit is
147 * The current throttling level of the sensor.

123