Home
last modified time | relevance | path

Searched refs:sensorInfo (Results 1 – 25 of 30) sorted by relevance

12

/drivers/peripheral/sensor/hdi_service/
Dsensor_if_service.cpp108 struct HdfSensorInformation sensorInfo = {}; in GetAllSensorInfo() local
109 sensorInfo.sensorName = it.sensorName; in GetAllSensorInfo()
110 sensorInfo.vendorName = it.vendorName; in GetAllSensorInfo()
111 sensorInfo.firmwareVersion = it.firmwareVersion; in GetAllSensorInfo()
112 sensorInfo.hardwareVersion = it.hardwareVersion; in GetAllSensorInfo()
113 sensorInfo.sensorTypeId = it.sensorTypeId; in GetAllSensorInfo()
114 sensorInfo.sensorId = it.sensorId; in GetAllSensorInfo()
115 sensorInfo.maxRange = it.maxRange; in GetAllSensorInfo()
116 sensorInfo.accuracy = it.accuracy; in GetAllSensorInfo()
117 sensorInfo.power = it.power; in GetAllSensorInfo()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/common/src/
Dsensor_device_manager.c37 if ((deviceInfo->sensorInfo.sensorId == pos->devInfo.sensorInfo.sensorId) && in AddSensorDevice()
38 (strcmp(deviceInfo->sensorInfo.sensorName, pos->devInfo.sensorInfo.sensorName) == 0)) { in AddSensorDevice()
39 HDF_LOGE("%s: sensor id[%d] had existed", __func__, deviceInfo->sensorInfo.sensorId); in AddSensorDevice()
59 HDF_LOGI("%s: register sensor name[%s] success", __func__, deviceInfo->sensorInfo.sensorName); in AddSensorDevice()
75 if ((sensorBaseInfo->sensorId == pos->devInfo.sensorInfo.sensorId) && in DeleteSensorDevice()
76 (strcmp(sensorBaseInfo->sensorName, pos->devInfo.sensorInfo.sensorName) == 0)) { in DeleteSensorDevice()
135 struct SensorBasicInfo *sensorInfo = NULL; in GetAllSensorInfo() local
146 sensorInfo = &(pos->devInfo.sensorInfo); in GetAllSensorInfo()
147 if (!HdfSbufWriteBuffer(reply, sensorInfo, sizeof(*sensorInfo))) { in GetAllSensorInfo()
153 if ((count + 1) * sizeof(*sensorInfo) > HDF_SENSOR_INFO_MAX_BUF) { in GetAllSensorInfo()
[all …]
Dsensor_config_parser.c299 HDF_LOGD("%s: sensor [%s] detect chip success", __func__, config->sensorInfo.sensorName); in DetectSensorDevice()
313 if (strcpy_s(config->sensorInfo.sensorName, SENSOR_INFO_NAME_MAX_LEN, name) != EOK) { in ParseSensorInfo()
320 if (strcpy_s(config->sensorInfo.vendorName, SENSOR_INFO_NAME_MAX_LEN, name) != EOK) { in ParseSensorInfo()
327 if (strcpy_s(config->sensorInfo.firmwareVersion, SENSOR_INFO_VERSION_MAX_LEN, name) != EOK) { in ParseSensorInfo()
334 if (strcpy_s(config->sensorInfo.hardwareVersion, SENSOR_INFO_VERSION_MAX_LEN, name) != EOK) { in ParseSensorInfo()
341 config->sensorInfo.sensorTypeId = id; in ParseSensorInfo()
344 config->sensorInfo.sensorId = id; in ParseSensorInfo()
348 config->sensorInfo.maxRange = value; in ParseSensorInfo()
351 config->sensorInfo.accuracy = value; in ParseSensorInfo()
354 config->sensorInfo.power = value; in ParseSensorInfo()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/gyro/
Dsensor_gyro_driver.c230 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitGyroOps()
231 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitGyroOps()
256 (void)DeleteSensorDevice(&config->sensorInfo); in InitGyroAfterDetected()
262 (void)DeleteSensorDevice(&config->sensorInfo); in InitGyroAfterDetected()
311 …(void)memset_s(&drvData->gyroCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct Sen… in GyroCreateCfgData()
321 (void)DeleteSensorDevice(&gyroCfg->sensorInfo); in GyroReleaseCfgData()
327 …(void)memset_s(&gyroCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorBasicI… in GyroReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/accel/
Dsensor_accel_driver.c255 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitAccelOps()
256 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitAccelOps()
281 (void)DeleteSensorDevice(&config->sensorInfo); in InitAccelAfterDetected()
287 (void)DeleteSensorDevice(&config->sensorInfo); in InitAccelAfterDetected()
336 …(void)memset_s(&drvData->accelCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct Se… in AccelCreateCfgData()
346 (void)DeleteSensorDevice(&accelCfg->sensorInfo); in AccelReleaseCfgData()
352 …(void)memset_s(&accelCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorBasic… in AccelReleaseCfgData()
Dsensor_gravity_driver.c237 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitGravityOps()
238 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitGravityOps()
322 (void)DeleteSensorDevice(&drvData->gravityCfg->sensorInfo); in GravityReleaseDriver()
/drivers/hdf_core/framework/model/sensor/driver/magnetic/
Dsensor_magnetic_driver.c232 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitMagneticOps()
233 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitMagneticOps()
258 (void)DeleteSensorDevice(&config->sensorInfo); in InitMagneticAfterDetected()
264 (void)DeleteSensorDevice(&config->sensorInfo); in InitMagneticAfterDetected()
314 (void)memset_s(&drvData->magneticCfg->sensorInfo, in MagneticCreateCfgData()
326 (void)DeleteSensorDevice(&magneticCfg->sensorInfo); in MagneticReleaseCfgData()
332 …(void)memset_s(&magneticCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorBa… in MagneticReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/pedometer/
Dsensor_pedometer_driver.c233 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitPedometerOps()
234 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitPedometerOps()
259 (void)DeleteSensorDevice(&config->sensorInfo); in InitPedometerAfterDetected()
308 (void)memset_s(&drvData->pedometerCfg->sensorInfo, in PedometerCreateCfgData()
319 (void)DeleteSensorDevice(&pedometerCfg->sensorInfo); in PedometerReleaseCfgData()
325 …(void)memset_s(&pedometerCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorB… in PedometerReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/barometer/
Dsensor_barometer_driver.c230 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitBarometerOps()
231 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitBarometerOps()
256 (void)DeleteSensorDevice(&config->sensorInfo); in InitBarometerAfterDetected()
304 (void)memset_s(&drvData->barometerCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, in BarometerCreateCfgData()
315 (void)DeleteSensorDevice(&barometerCfg->sensorInfo); in BarometerReleaseCfgData()
320 …(void)memset_s(&barometerCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorB… in BarometerReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/proximity/
Dsensor_proximity_driver.c233 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitProximityOps()
234 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitProximityOps()
259 (void)DeleteSensorDevice(&config->sensorInfo); in InitProximityAfterDetected()
307 (void)memset_s(&drvData->proximityCfg->sensorInfo, sizeof(struct SensorBasicInfo), in ProximityCreateCfgData()
318 (void)DeleteSensorDevice(&proximityCfg->sensorInfo); in ProximityReleaseCfgData()
323 …(void)memset_s(&proximityCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorB… in ProximityReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/temperature/
Dsensor_temperature_driver.c234 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitTemperatureOps()
235 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitTemperatureOps()
260 (void)DeleteSensorDevice(&config->sensorInfo); in InitTemperatureAfterDetected()
319 (void)memset_s(&drvData->temperatureCfg->sensorInfo, in TemperatureCreateCfgData()
331 (void)DeleteSensorDevice(&temperatureCfg->sensorInfo); in TemperatureReleaseCfgData()
337 …(void)memset_s(&temperatureCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct Senso… in TemperatureReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/humidity/
Dsensor_humidity_driver.c232 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitHumidityOps()
233 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitHumidityOps()
258 (void)DeleteSensorDevice(&config->sensorInfo); in InitHumidityAfterDetected()
316 (void)memset_s(&drvData->humidityCfg->sensorInfo, in HumidityCreateCfgData()
328 (void)DeleteSensorDevice(&humidityCfg->sensorInfo); in HumidityReleaseCfgData()
334 …(void)memset_s(&humidityCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorBa… in HumidityReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/hall/
Dsensor_hall_driver.c325 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitHallOps()
326 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitHallOps()
352 (void)DeleteSensorDevice(&drvData->hallCfg->sensorInfo); in InitHallAfterDetected()
425 …(void)memset_s(&drvData->hallCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct Sen… in HallCreateCfgData()
434 (void)DeleteSensorDevice(&hallCfg->sensorInfo); in HallReleaseCfgData()
437 …(void)memset_s(&hallCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorBasicI… in HallReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/als/
Dsensor_als_driver.c383 if (memcpy_s(&deviceInfo->sensorInfo, sizeof(deviceInfo->sensorInfo), in InitAlsOps()
384 &config->sensorInfo, sizeof(config->sensorInfo)) != EOK) { in InitAlsOps()
422 (void)DeleteSensorDevice(&config->sensorInfo); in InitAlsAfterDetected()
469 …(void)memset_s(&drvData->alsCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct Sens… in AlsCreateCfgData()
479 (void)DeleteSensorDevice(&alsCfg->sensorInfo); in AlsReleaseCfgData()
485 …(void)memset_s(&alsCfg->sensorInfo, sizeof(struct SensorBasicInfo), 0, sizeof(struct SensorBasicIn… in AlsReleaseCfgData()
/drivers/hdf_core/framework/model/sensor/driver/ppg/
Dsensor_ppg_driver.c44 .sensorId = drvData->chipData.cfgData->sensorCfg.sensorInfo.sensorId, in ReportPpgData()
224 if (memcpy_s(&devData.sensorInfo, sizeof(devData.sensorInfo), in RegisterSensorDev()
225 &(cfg->sensorCfg.sensorInfo), sizeof(cfg->sensorCfg.sensorInfo)) != EOK) { in RegisterSensorDev()
/drivers/peripheral/thermal/interfaces/hdi_service/src/
Dthermal_hdf_config.cpp142 std::shared_ptr<SensorInfoConfig> sensorInfo = std::make_shared<SensorInfoConfig>(); in ParsePollingNode() local
145 sensorInfo->SetGroupName(groupName); in ParsePollingNode()
155 sensorInfo->SetGroupInterval(interval); in ParsePollingNode()
174 sensorInfo->SetXMLThermalZoneInfo(xmlTzInfoList); in ParsePollingNode()
175 sensorInfo->SetXMLThermalNodeInfo(xmlTnInfoList); in ParsePollingNode()
176 groupMap.insert(std::make_pair(groupName, sensorInfo)); in ParsePollingNode()
Dthermal_zone_manager.cpp268 …HdfThermalCallbackInfo &callbackInfo, const std::shared_ptr<SensorInfoConfig> &sensorInfo, int32_t… in CollectCallbackInfo() argument
270 if (sensorInfo->multiple_ == NUM_ZERO) { in CollectCallbackInfo()
274 if (reportTime % (sensorInfo->multiple_) == NUM_ZERO) { in CollectCallbackInfo()
275 for (auto iter : sensorInfo->thermalDataList_) { in CollectCallbackInfo()
/drivers/hdf_core/framework/model/sensor/driver/include/
Dsensor_device_if.h24 struct SensorBasicInfo sensorInfo; member
/drivers/hdf_core/framework/test/unittest/sensor/
Dhdf_sensor_test.c193 .sensorInfo = { in InitSensorDriverTest()
236 .sensorInfo = { in ReleaseSensorDriverTest()
250 (void)DeleteSensorDevice(&deviceInfo.sensorInfo); in ReleaseSensorDriverTest()
/drivers/peripheral/sensor/interfaces/include/
Dsensor_if.h73 int32_t (*GetAllSensors)(struct SensorInformation **sensorInfo, int32_t *count);
/drivers/hdf_core/framework/model/sensor/driver/common/include/
Dsensor_config_parser.h94 struct SensorBasicInfo sensorInfo; member
/drivers/peripheral/sensor/test/performance/common/
Dhdf_sensor_performance_test.cpp118 struct SensorInformation *sensorInfo = nullptr; variable
124 int ret = g_sensorPerformanceDev->GetAllSensors(&sensorInfo, &count);
/drivers/peripheral/thermal/interfaces/hdi_service/include/
Dthermal_zone_manager.h117 …HdfThermalCallbackInfo &callbackInfo, const std::shared_ptr<SensorInfoConfig> &sensorInfo, int32_t…
/drivers/peripheral/sensor/
DREADME_zh.md54 …="b935414557240"></a>GetAllSensors</strong>(struct SensorInformation **sensorInfo, int32_t *count)…
134 struct SensorInformation *sensorInfo = NULL;
149 ret = sensorDev->GetAllSensors(&sensorInfo, &count);
/drivers/peripheral/sensor/hdi_impl/
Dsensor_impl.cpp142 struct SensorInformation *sensorInfo = nullptr; in GetAllSensorInfo() local
147 int32_t ret = sensorInterface->GetAllSensors(&sensorInfo, &count); in GetAllSensorInfo()
159 tmp = sensorInfo; in GetAllSensorInfo()

12