Home
last modified time | relevance | path

Searched refs:drvData (Results 1 – 25 of 45) sorted by relevance

12

/drivers/hdf_core/framework/model/misc/vibrator/driver/src/
Dvibrator_driver.c30 struct VibratorDriverData *drvData = GetVibratorDrvData(); in RegisterVibratorOps() local
33 CHECK_VIBRATOR_NULL_PTR_RETURN_VALUE(drvData, HDF_FAILURE); in RegisterVibratorOps()
35 (void)OsalMutexLock(&drvData->mutex); in RegisterVibratorOps()
36 drvData->ops.Start = ops->Start; in RegisterVibratorOps()
37 drvData->ops.StartEffect = ops->StartEffect; in RegisterVibratorOps()
38 drvData->ops.Stop = ops->Stop; in RegisterVibratorOps()
39 drvData->ops.SetParameter = ops->SetParameter; in RegisterVibratorOps()
40 (void)OsalMutexUnlock(&drvData->mutex); in RegisterVibratorOps()
47 struct VibratorDriverData *drvData = GetVibratorDrvData(); in RegisterVibratorInfo() local
50 CHECK_VIBRATOR_NULL_PTR_RETURN_VALUE(drvData, HDF_FAILURE); in RegisterVibratorInfo()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/pedometer/
Dsensor_pedometer_driver.c34 struct PedometerDrvData *drvData = PedometerGetDrvData(); in PedometerRegisterChipOps() local
36 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in PedometerRegisterChipOps()
39 drvData->ops.Init = ops->Init; in PedometerRegisterChipOps()
40 drvData->ops.ReadData = ops->ReadData; in PedometerRegisterChipOps()
46 struct PedometerDrvData *drvData = NULL; in PedometerDataWorkEntry() local
48 drvData = (struct PedometerDrvData *)arg; in PedometerDataWorkEntry()
49 CHECK_NULL_PTR_RETURN(drvData); in PedometerDataWorkEntry()
51 if (drvData->ops.ReadData == NULL) { in PedometerDataWorkEntry()
56 if (drvData->ops.ReadData(drvData->pedometerCfg) != HDF_SUCCESS) { in PedometerDataWorkEntry()
66 struct PedometerDrvData *drvData = (struct PedometerDrvData *)arg; in PedometerTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/sensor/driver/barometer/
Dsensor_barometer_driver.c34 struct BarometerDrvData *drvData = BarometerGetDrvData(); in BarometerRegisterChipOps() local
36 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in BarometerRegisterChipOps()
39 drvData->ops.Init = ops->Init; in BarometerRegisterChipOps()
40 drvData->ops.ReadData = ops->ReadData; in BarometerRegisterChipOps()
46 struct BarometerDrvData *drvData = NULL; in BarometerDataWorkEntry() local
48 drvData = (struct BarometerDrvData *)arg; in BarometerDataWorkEntry()
49 CHECK_NULL_PTR_RETURN(drvData); in BarometerDataWorkEntry()
51 if (drvData->ops.ReadData == NULL) { in BarometerDataWorkEntry()
55 if (drvData->ops.ReadData(drvData->barometerCfg) != HDF_SUCCESS) { in BarometerDataWorkEntry()
64 struct BarometerDrvData *drvData = (struct BarometerDrvData *)arg; in BarometerTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/sensor/driver/accel/
Dsensor_accel_driver.c36 struct AccelDrvData *drvData = AccelGetDrvData(); in SubscribeAccelDataCallbackFunc() local
38 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in SubscribeAccelDataCallbackFunc()
40 drvData->cb = cb; in SubscribeAccelDataCallbackFunc()
47 struct AccelDrvData *drvData = AccelGetDrvData(); in AccelRegisterChipOps() local
49 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in AccelRegisterChipOps()
52 drvData->ops.Init = ops->Init; in AccelRegisterChipOps()
53 drvData->ops.ReadData = ops->ReadData; in AccelRegisterChipOps()
59 struct AccelDrvData *drvData = NULL; in AccelDataWorkEntry() local
62 drvData = (struct AccelDrvData *)arg; in AccelDataWorkEntry()
63 CHECK_NULL_PTR_RETURN(drvData); in AccelDataWorkEntry()
[all …]
Dsensor_gravity_driver.c50 struct GravityDrvData *drvData = NULL; in GravityDataWorkEntry() local
53 drvData = (struct GravityDrvData *)arg; in GravityDataWorkEntry()
54 CHECK_NULL_PTR_RETURN(drvData); in GravityDataWorkEntry()
83 struct GravityDrvData *drvData = (struct GravityDrvData *)arg; in GravityTimerEntry() local
84 CHECK_NULL_PTR_RETURN(drvData); in GravityTimerEntry()
86 if (!HdfAddWork(&drvData->gravityWorkQueue, &drvData->gravityWork)) { in GravityTimerEntry()
90 ret = OsalTimerSetTimeout(&drvData->gravityTimer, drvData->interval); in GravityTimerEntry()
96 static int32_t InitGravityData(struct GravityDrvData *drvData) in InitGravityData() argument
98 if (HdfWorkQueueInit(&drvData->gravityWorkQueue, HDF_GRAVITY_WORK_QUEUE_NAME) != HDF_SUCCESS) { in InitGravityData()
103 if (HdfWorkInit(&drvData->gravityWork, GravityDataWorkEntry, drvData) != HDF_SUCCESS) { in InitGravityData()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/temperature/
Dsensor_temperature_driver.c34 struct TemperatureDrvData *drvData = TemperatureGetDrvData(); in TemperatureRegisterChipOps() local
36 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in TemperatureRegisterChipOps()
39 drvData->ops.Init = ops->Init; in TemperatureRegisterChipOps()
40 drvData->ops.ReadData = ops->ReadData; in TemperatureRegisterChipOps()
46 struct TemperatureDrvData *drvData = NULL; in TemperatureDataWorkEntry() local
48 drvData = (struct TemperatureDrvData *)arg; in TemperatureDataWorkEntry()
49 CHECK_NULL_PTR_RETURN(drvData); in TemperatureDataWorkEntry()
51 if (drvData->ops.ReadData == NULL) { in TemperatureDataWorkEntry()
55 if (drvData->ops.ReadData(drvData->temperatureCfg) != HDF_SUCCESS) { in TemperatureDataWorkEntry()
64 struct TemperatureDrvData *drvData = (struct TemperatureDrvData *)arg; in TemperatureTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/sensor/driver/humidity/
Dsensor_humidity_driver.c34 struct HumidityDrvData *drvData = HumidityGetDrvData(); in HumidityRegisterChipOps() local
36 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in HumidityRegisterChipOps()
39 drvData->ops.Init = ops->Init; in HumidityRegisterChipOps()
40 drvData->ops.ReadData = ops->ReadData; in HumidityRegisterChipOps()
46 struct HumidityDrvData *drvData = NULL; in HumidityDataWorkEntry() local
48 drvData = (struct HumidityDrvData *)arg; in HumidityDataWorkEntry()
49 CHECK_NULL_PTR_RETURN(drvData); in HumidityDataWorkEntry()
51 if (drvData->ops.ReadData == NULL) { in HumidityDataWorkEntry()
55 if (drvData->ops.ReadData(drvData->humidityCfg) != HDF_SUCCESS) { in HumidityDataWorkEntry()
64 struct HumidityDrvData *drvData = (struct HumidityDrvData *)arg; in HumidityTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/sensor/driver/proximity/
Dsensor_proximity_driver.c34 struct ProximityDrvData *drvData = NULL; in ProximityRegisterChipOps() local
38 drvData = ProximityGetDrvData(); in ProximityRegisterChipOps()
39 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in ProximityRegisterChipOps()
40 drvData->ops.Init = ops->Init; in ProximityRegisterChipOps()
41 drvData->ops.ReadData = ops->ReadData; in ProximityRegisterChipOps()
48 struct ProximityDrvData *drvData = (struct ProximityDrvData *)arg; in ProximityDataWorkEntry() local
49 CHECK_NULL_PTR_RETURN(drvData); in ProximityDataWorkEntry()
50 CHECK_NULL_PTR_RETURN(drvData->ops.ReadData); in ProximityDataWorkEntry()
52 ret = drvData->ops.ReadData(drvData->proximityCfg); in ProximityDataWorkEntry()
63 struct ProximityDrvData *drvData = (struct ProximityDrvData *)arg; in ProximityTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/sensor/driver/hall/
Dsensor_hall_driver.c33 struct HallDrvData *drvData = HallGetDrvData(); in HallRegisterChipOps() local
35 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in HallRegisterChipOps()
38 drvData->ops.Init = ops->Init; in HallRegisterChipOps()
39 drvData->ops.ReadData = ops->ReadData; in HallRegisterChipOps()
50 struct HallDrvData *drvData = HallGetDrvData(); in ReadGpioData() local
51 CHECK_NULL_PTR_RETURN(drvData); in ReadGpioData()
60 tmp = drvData->status; in ReadGpioData()
77 struct HallDrvData *drvData = NULL; in HallDataWorkEntry() local
79 drvData = (struct HallDrvData *)arg; in HallDataWorkEntry()
80 CHECK_NULL_PTR_RETURN(drvData); in HallDataWorkEntry()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/gyro/
Dsensor_gyro_driver.c34 struct GyroDrvData *drvData = GyroGetDrvData(); in GyroRegisterChipOps() local
36 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in GyroRegisterChipOps()
39 drvData->ops.Init = ops->Init; in GyroRegisterChipOps()
40 drvData->ops.ReadData = ops->ReadData; in GyroRegisterChipOps()
46 struct GyroDrvData *drvData = NULL; in GyroDataWorkEntry() local
48 drvData = (struct GyroDrvData *)arg; in GyroDataWorkEntry()
49 CHECK_NULL_PTR_RETURN(drvData); in GyroDataWorkEntry()
51 if (drvData->ops.ReadData == NULL) { in GyroDataWorkEntry()
55 if (drvData->ops.ReadData(drvData->gyroCfg) != HDF_SUCCESS) { in GyroDataWorkEntry()
64 struct GyroDrvData *drvData = (struct GyroDrvData *)arg; in GyroTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/sensor/driver/magnetic/
Dsensor_magnetic_driver.c34 struct MagneticDrvData *drvData = MagneticGetDrvData(); in MagneticRegisterChipOps() local
36 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in MagneticRegisterChipOps()
39 drvData->ops.Init = ops->Init; in MagneticRegisterChipOps()
40 drvData->ops.ReadData = ops->ReadData; in MagneticRegisterChipOps()
46 struct MagneticDrvData *drvData = NULL; in MagneticDataWorkEntry() local
48 drvData = (struct MagneticDrvData *)arg; in MagneticDataWorkEntry()
49 CHECK_NULL_PTR_RETURN(drvData); in MagneticDataWorkEntry()
51 if (drvData->ops.ReadData == NULL) { in MagneticDataWorkEntry()
55 if (drvData->ops.ReadData(drvData->magneticCfg) != HDF_SUCCESS) { in MagneticDataWorkEntry()
64 struct MagneticDrvData *drvData = (struct MagneticDrvData *)arg; in MagneticTimerEntry() local
[all …]
/drivers/hdf_core/framework/model/misc/light/driver/src/
Dlight_driver.c32 struct LightDriverData *drvData = NULL; in GetAllLightInfo() local
34 drvData = GetLightDrvData(); in GetAllLightInfo()
35 CHECK_LIGHT_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in GetAllLightInfo()
38 if (!HdfSbufWriteUint32(reply, drvData->lightNum)) { in GetAllLightInfo()
44 if (drvData->info[i] == NULL) { in GetAllLightInfo()
54 … if (strcpy_s(lightInfo.lightName, NAME_MAX_LEN, drvData->info[i]->lightInfo.lightName) != EOK) { in GetAllLightInfo()
64 lightInfo.lightNumber = drvData->info[i]->lightInfo.lightNumber; in GetAllLightInfo()
102 struct LightDriverData *drvData = NULL; in UpdateLight() local
104 drvData = GetLightDrvData(); in UpdateLight()
105 CHECK_LIGHT_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in UpdateLight()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/ppg/
Dsensor_ppg_driver.c21 #define CHECK_PPG_INIT_RETURN_VALUE(drvData, ret) do { \ argument
22 if (((drvData) == NULL) || ((drvData)->detectFlag == false)) { \
38 struct PpgDrvData *drvData = PpgGetDrvData(); in ReportPpgData() local
39 CHECK_PPG_INIT_RETURN_VALUE(drvData, HDF_ERR_NOT_SUPPORT); in ReportPpgData()
40 CHECK_NULL_PTR_RETURN_VALUE(drvData->chipData.cfgData, HDF_ERR_INVALID_PARAM); in ReportPpgData()
44 .sensorId = drvData->chipData.cfgData->sensorCfg.sensorInfo.sensorId, in ReportPpgData()
70 struct PpgDrvData *drvData = (struct PpgDrvData *)arg; in PpgDataWorkEntry() local
73 CHECK_NULL_PTR_RETURN(drvData); in PpgDataWorkEntry()
74 CHECK_NULL_PTR_RETURN(drvData->chipData.opsCall.ReadData); in PpgDataWorkEntry()
76 ret = drvData->chipData.opsCall.ReadData(g_fifoBuf, sizeof(g_fifoBuf), &readLen); in PpgDataWorkEntry()
[all …]
/drivers/peripheral/vibrator/chipset/linear/
Dvibrator_linear_driver.c31 struct VibratorLinearDriverData *drvData = GetLinearVibratorData(); in StartLinearVibrator() local
32 CHECK_VIBRATOR_NULL_PTR_RETURN_VALUE(drvData, HDF_FAILURE); in StartLinearVibrator()
34 if (drvData->linearCfgData->vibratorBus.busType != VIBRATOR_BUS_GPIO) { in StartLinearVibrator()
39 ret = GpioWrite(drvData->linearCfgData->vibratorBus.GpioNum, GPIO_VAL_HIGH); in StartLinearVibrator()
42 drvData->linearCfgData->vibratorBus.GpioNum, GPIO_VAL_HIGH); in StartLinearVibrator()
58 struct VibratorLinearDriverData *drvData = GetLinearVibratorData(); in StopLinearVibrator() local
59 CHECK_VIBRATOR_NULL_PTR_RETURN_VALUE(drvData, HDF_FAILURE); in StopLinearVibrator()
61 if (drvData->linearCfgData->vibratorBus.busType != VIBRATOR_BUS_GPIO) { in StopLinearVibrator()
66 ret = GpioWrite(drvData->linearCfgData->vibratorBus.GpioNum, GPIO_VAL_LOW); in StopLinearVibrator()
69 drvData->linearCfgData->vibratorBus.GpioNum, GPIO_VAL_LOW); in StopLinearVibrator()
[all …]
/drivers/hdf_core/framework/model/sensor/driver/als/
Dsensor_als_driver.c159 struct AlsDrvData *drvData = AlsGetDrvData(); in AlsRegisterChipOps() local
161 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in AlsRegisterChipOps()
164 drvData->ops.Init = ops->Init; in AlsRegisterChipOps()
165 drvData->ops.ReadData = ops->ReadData; in AlsRegisterChipOps()
171 struct AlsDrvData *drvData = NULL; in AlsDataWorkEntry() local
174 drvData = (struct AlsDrvData *)arg; in AlsDataWorkEntry()
175 CHECK_NULL_PTR_RETURN(drvData); in AlsDataWorkEntry()
177 if (drvData->ops.ReadData == NULL) { in AlsDataWorkEntry()
181 if (drvData->ops.ReadData(drvData->alsCfg, &event) != HDF_SUCCESS) { in AlsDataWorkEntry()
196 struct AlsDrvData *drvData = (struct AlsDrvData *)arg; in AlsTimerEntry() local
[all …]
/drivers/hdf_core/framework/test/unittest/sensor/
Dhdf_sensor_test.c59 struct SensorTestDrvData *drvData = (struct SensorTestDrvData *)arg; in SensorTestTimerEntry() local
60 CHECK_NULL_PTR_RETURN(drvData); in SensorTestTimerEntry()
62 if (!HdfAddWork(&drvData->workQueue, &drvData->work)) { in SensorTestTimerEntry()
66 interval = OsalDivS64(drvData->interval, (SENSOR_CONVERT_UNIT * SENSOR_CONVERT_UNIT)); in SensorTestTimerEntry()
69 if (OsalTimerSetTimeout(&drvData->timer, interval) != HDF_SUCCESS) { in SensorTestTimerEntry()
76 struct SensorTestDrvData *drvData = GetSensorTestDrvData(); in SensorInitTestConfig() local
78 if (HdfWorkQueueInit(&drvData->workQueue, HDF_SENSOR_TEST_WORK_QUEUE_NAME) != HDF_SUCCESS) { in SensorInitTestConfig()
83 if (HdfWorkInit(&drvData->work, SensorTestDataWorkEntry, drvData) != HDF_SUCCESS) { in SensorInitTestConfig()
88 drvData->enable = false; in SensorInitTestConfig()
89 drvData->initStatus = true; in SensorInitTestConfig()
[all …]
/drivers/peripheral/vibrator/chipset/drv2605l/
Dvibrator_drv2605l_driver.c115 static int32_t DetectDrv2605lDevice(struct Drv2605lDriverData *drvData) in DetectDrv2605lDevice() argument
122 chipIdReg = drvData->drv2605lCfgData->vibratorAttr.chipIdReg; in DetectDrv2605lDevice()
123 chipIdValue = drvData->drv2605lCfgData->vibratorAttr.chipIdValue; in DetectDrv2605lDevice()
125 ret = GetDrv2605lI2cHandle(&drvData->drv2605lCfgData->vibratorBus.i2cCfg); in DetectDrv2605lDevice()
128 ReleaseDrv2605lBusHandle(&drvData->drv2605lCfgData->vibratorBus.i2cCfg); in DetectDrv2605lDevice()
132 …ret = ReadDrv2605l(&drvData->drv2605lCfgData->vibratorBus.i2cCfg, chipIdReg, &value, sizeof(value)… in DetectDrv2605lDevice()
135 ReleaseDrv2605lBusHandle(&drvData->drv2605lCfgData->vibratorBus.i2cCfg); in DetectDrv2605lDevice()
141 ReleaseDrv2605lBusHandle(&drvData->drv2605lCfgData->vibratorBus.i2cCfg); in DetectDrv2605lDevice()
187 struct Drv2605lDriverData *drvData = NULL; in SetModulationParameter() local
188 drvData = GetDrv2605lDrvData(); in SetModulationParameter()
[all …]
/drivers/peripheral/sensor/chipset/hall/
Dhall_ak8789.c54 struct Ak8789DrvData *drvData = (struct Ak8789DrvData *)OsalMemCalloc(sizeof(*drvData)); in Ak8789BindDriver() local
55 if (drvData == NULL) { in Ak8789BindDriver()
60 drvData->ioService.Dispatch = DispatchAK8789; in Ak8789BindDriver()
61 drvData->device = device; in Ak8789BindDriver()
62 device->service = &drvData->ioService; in Ak8789BindDriver()
63 g_ak8789DrvData = drvData; in Ak8789BindDriver()
73 struct Ak8789DrvData *drvData = (struct Ak8789DrvData *)device->service; in AK8789InitDriver() local
74 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in AK8789InitDriver()
82 drvData->sensorCfg = HallCreateCfgData(device->property); in AK8789InitDriver()
83 if (drvData->sensorCfg == NULL) { in AK8789InitDriver()
[all …]
/drivers/peripheral/sensor/chipset/proximity/
Dproximity_apds9960.c125 struct Apds9960DrvData *drvData = (struct Apds9960DrvData *)OsalMemCalloc(sizeof(*drvData)); in Apds9960BindDriver() local
126 if (drvData == NULL) { in Apds9960BindDriver()
131 drvData->ioService.Dispatch = DispatchApds9960; in Apds9960BindDriver()
132 drvData->device = device; in Apds9960BindDriver()
133 device->service = &drvData->ioService; in Apds9960BindDriver()
134 g_apds9960DrvData = drvData; in Apds9960BindDriver()
145 struct Apds9960DrvData *drvData = (struct Apds9960DrvData *)device->service; in Apds996InitDriver() local
146 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in Apds996InitDriver()
154 drvData->sensorCfg = ProximityCreateCfgData(device->property); in Apds996InitDriver()
155 if (drvData->sensorCfg == NULL || drvData->sensorCfg->root == NULL) { in Apds996InitDriver()
[all …]
/drivers/peripheral/sensor/chipset/als/
Dals_bh1750.c119 struct Bh1750DrvData *drvData = (struct Bh1750DrvData *)OsalMemCalloc(sizeof(*drvData)); in Bh1750BindDriver() local
120 if (drvData == NULL) { in Bh1750BindDriver()
125 drvData->ioService.Dispatch = DispatchBH1750; in Bh1750BindDriver()
126 drvData->device = device; in Bh1750BindDriver()
127 device->service = &drvData->ioService; in Bh1750BindDriver()
128 g_bh1750DrvData = drvData; in Bh1750BindDriver()
139 struct Bh1750DrvData *drvData = (struct Bh1750DrvData *)device->service; in Bh1750InitDriver() local
140 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in Bh1750InitDriver()
142 drvData->sensorCfg = AlsCreateCfgData(device->property); in Bh1750InitDriver()
143 if (drvData->sensorCfg == NULL || drvData->sensorCfg->root == NULL) { in Bh1750InitDriver()
[all …]
/drivers/hdf_core/adapter/khdf/linux/platform/mipi_csi/
Dmipi_v4l2_adapter.c132 struct AdapterDrvData *drvData = &g_adapterDrvData; in LinuxEnumMbusCode() local
145 mutex_lock(&drvData->mutex); in LinuxEnumMbusCode()
146 code->code = drvData->fmt.format.code; in LinuxEnumMbusCode()
147 mutex_unlock(&drvData->mutex); in LinuxEnumMbusCode()
152 static void LinuxUpdatePadFormat(const struct AdapterDrvData *drvData, in LinuxUpdatePadFormat() argument
157 if ((drvData == NULL) || (fmt == NULL)) { in LinuxUpdatePadFormat()
161 fmt->format = drvData->fmt.format; in LinuxUpdatePadFormat()
172 struct AdapterDrvData *drvData = &g_adapterDrvData; in LinuxSetPadFormat() local
173 struct CameraDrvData *camera = drvData->camera; in LinuxSetPadFormat()
175 ImgRect *rect = &drvData->attr->imgRect; in LinuxSetPadFormat()
[all …]
/drivers/peripheral/sensor/chipset/temperature/
Dtemperature_sht30.c142 struct Sht30DrvData *drvData = (struct Sht30DrvData *)OsalMemCalloc(sizeof(*drvData)); in Sht30BindDriver() local
143 if (drvData == NULL) { in Sht30BindDriver()
148 drvData->ioService.Dispatch = DispatchSht30; in Sht30BindDriver()
149 drvData->device = device; in Sht30BindDriver()
150 device->service = &drvData->ioService; in Sht30BindDriver()
151 g_sht30DrvData = drvData; in Sht30BindDriver()
162 struct Sht30DrvData *drvData = (struct Sht30DrvData *)device->service; in Sht30InitDriver() local
163 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in Sht30InitDriver()
165 drvData->sensorCfg = TemperatureCreateCfgData(device->property); in Sht30InitDriver()
166 if (drvData->sensorCfg == NULL || drvData->sensorCfg->root == NULL) { in Sht30InitDriver()
[all …]
/drivers/peripheral/sensor/chipset/humidity/
Dhumidity_sht30.c143 struct Sht30DrvData *drvData = (struct Sht30DrvData *)OsalMemCalloc(sizeof(*drvData)); in Sht30BindDriver() local
144 if (drvData == NULL) { in Sht30BindDriver()
149 drvData->ioService.Dispatch = DispatchSht30; in Sht30BindDriver()
150 drvData->device = device; in Sht30BindDriver()
151 device->service = &drvData->ioService; in Sht30BindDriver()
152 g_sht30DrvData = drvData; in Sht30BindDriver()
163 struct Sht30DrvData *drvData = (struct Sht30DrvData *)device->service; in Sht30InitDriver() local
164 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in Sht30InitDriver()
166 drvData->sensorCfg = HumidityCreateCfgData(device->property); in Sht30InitDriver()
167 if (drvData->sensorCfg == NULL || drvData->sensorCfg->root == NULL) { in Sht30InitDriver()
[all …]
/drivers/peripheral/sensor/chipset/pedometer/
Dpedometer_bmi160.c131 struct Bmi160DrvData *drvData = (struct Bmi160DrvData *)OsalMemCalloc(sizeof(*drvData)); in PedometerBmi160BindDriver() local
132 if (drvData == NULL) { in PedometerBmi160BindDriver()
137 drvData->ioService.Dispatch = DispatchBMI160; in PedometerBmi160BindDriver()
138 drvData->device = device; in PedometerBmi160BindDriver()
139 device->service = &drvData->ioService; in PedometerBmi160BindDriver()
140 g_bmi160DrvData = drvData; in PedometerBmi160BindDriver()
151 struct Bmi160DrvData *drvData = (struct Bmi160DrvData *)device->service; in PedometerBmi160InitDriver() local
152 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM); in PedometerBmi160InitDriver()
160 drvData->sensorCfg = PedometerCreateCfgData(device->property); in PedometerBmi160InitDriver()
161 if (drvData->sensorCfg == NULL || drvData->sensorCfg->root == NULL) { in PedometerBmi160InitDriver()
[all …]
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/resources/templates/lite/sensor_template/
Dhall_sensor_driver_source.template63 …${driver_upper_camel_case}DrvData *drvData = (struct ${driver_upper_camel_case}DrvData *)OsalMemCa…
64 if (drvData == NULL) {
69 drvData->ioService.Dispatch = Dispatch${driver_upper_camel_case};
70 drvData->device = device;
71 device->service = &drvData->ioService;
72 g_${driver_lower_case}DrvData = drvData;
83 …struct ${driver_upper_camel_case}DrvData *drvData = (struct ${driver_upper_camel_case}DrvData *)de…
84 CHECK_NULL_PTR_RETURN_VALUE(drvData, HDF_ERR_INVALID_PARAM);
86 drvData->sensorCfg = ${device_upper_camel_case}CreateCfgData(device->property);
87 if (drvData->sensorCfg == NULL || drvData->sensorCfg->root == NULL) {
[all …]

12