Home
last modified time | relevance | path

Searched refs:tmp (Results 1 – 25 of 100) sorted by relevance

1234

/drivers/peripheral/usb/sample/host/src/
Dusbhost_ddk_test.c192 const char *tmp = HdfSbufReadString(g_reply); in UsbHostDdkTestAsyncRead() local
193 if (tmp && strlen(tmp) > 0) { in UsbHostDdkTestAsyncRead()
195 errno_t err = memcpy_s(readSbuf, DATA_MAX_LEN, tmp, strlen(tmp)); in UsbHostDdkTestAsyncRead()
200 printf("%s:%d %s-%zu!\n", __func__, __LINE__, tmp, strlen(tmp)); in UsbHostDdkTestAsyncRead()
201 HDF_LOGD("%s:%d %s-%zu!", __func__, __LINE__, tmp, strlen(tmp)); in UsbHostDdkTestAsyncRead()
202 TestModuleWriteLog(HOST_ACM_ASYNC_READ, tmp); in UsbHostDdkTestAsyncRead()
254 const char *tmp = HdfSbufReadString(g_reply); in UsbHostDdkTestSyncRead() local
255 if (tmp && strlen(tmp) > 0) { in UsbHostDdkTestSyncRead()
257 errno_t err = memcpy_s(readSbuf, DATA_MAX_LEN, tmp, strlen(tmp)); in UsbHostDdkTestSyncRead()
262 printf("%s:%d %s-%zu!\n", __func__, __LINE__, tmp, strlen(tmp)); in UsbHostDdkTestSyncRead()
[all …]
/drivers/hdf_core/framework/support/platform/src/regulator/
Dregulator_tree_mgr.c37 struct RegulatorChildNode *tmp = NULL; in RegulatorChildListDestroy() local
39 …DLIST_FOR_EACH_ENTRY_SAFE(nodeInfo, tmp, &pRegulator->childHead, struct RegulatorChildNode, node) { in RegulatorChildListDestroy()
51 struct RegulatorTreeInfo *tmp = NULL; in RegulatorTreeGetParent() local
60 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->treeMgrHead, struct RegulatorTreeInfo, node) { in RegulatorTreeGetParent()
85 struct RegulatorTreeInfo *tmp = NULL; in RegulatorTreeGetChild() local
94 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->treeMgrHead, struct RegulatorTreeInfo, node) { in RegulatorTreeGetChild()
129 struct RegulatorChildNode *tmp = NULL; in RegulatorTreeIsChildAlwayson() local
130 DLIST_FOR_EACH_ENTRY_SAFE(nodeInfo, tmp, pList, struct RegulatorChildNode, node) { in RegulatorTreeIsChildAlwayson()
149 struct RegulatorChildNode *tmp = NULL; in RegulatorTreeIsChildStatusOn() local
150 DLIST_FOR_EACH_ENTRY_SAFE(nodeInfo, tmp, pList, struct RegulatorChildNode, node) { in RegulatorTreeIsChildStatusOn()
[all …]
/drivers/peripheral/vibrator/hdi_impl/
Dvibrator_interface_impl.cpp80 VibratorMode tmp; in Stop() local
82 tmp = VIBRATOR_MODE_ONCE; in Stop()
84 tmp = VIBRATOR_MODE_PRESET; in Stop()
86 tmp = VIBRATOR_MODE_BUTT; in Stop()
92 int32_t ret = vibratorInterface->Stop(tmp); in Stop()
108 struct VibratorInfo *tmp = nullptr; in GetVibratorInfo() local
110 int32_t ret = vibratorInterface->GetVibratorInfo(&tmp); in GetVibratorInfo()
116 if (tmp == nullptr) { in GetVibratorInfo()
121 hdfVibratorInfo.isSupportFrequency = tmp->isSupportFrequency; in GetVibratorInfo()
122 hdfVibratorInfo.frequencyMaxValue = tmp->frequencyMaxValue; in GetVibratorInfo()
[all …]
/drivers/peripheral/usb/sample/device/liteos/lib/src/
Dlib_acm_test.c123 const char *tmp = HdfSbufReadString(g_reply); in AcmRead() local
124 if (str && tmp && strlen(tmp) > 0) { in AcmRead()
125 ret = memcpy_s(str, maxLen, tmp, strlen(tmp)); in AcmRead()
129 printf("AcmRead:%s\n", tmp); in AcmRead()
189 const char *tmp = HdfSbufReadString(g_reply); in acm_prop_read() local
190 if (propValue && tmp && strlen(tmp) > 0) { in acm_prop_read()
192 errno_t err = memcpy_s(propValue, maxLen, tmp, strlen(tmp)); in acm_prop_read()
196 printf("prop_read:%s\n", tmp); in acm_prop_read()
/drivers/hdf_core/framework/test/unittest/platform/common/
Dgpio_driver_test.c75 uint16_t tmp; in GpioTestReadConfig() local
84 ret = drsOps->GetUint16(node, "gpio", &tmp, 0); in GpioTestReadConfig()
89 config->gpio = (uint16_t)tmp; in GpioTestReadConfig()
91 ret = drsOps->GetUint16(node, "gpioTestTwo", &tmp, 0); in GpioTestReadConfig()
96 config->gpioTestTwo = (uint16_t)tmp; in GpioTestReadConfig()
98 ret = drsOps->GetUint16(node, "gpioIrq", &tmp, 0); in GpioTestReadConfig()
103 config->gpioIrq = (uint16_t)tmp; in GpioTestReadConfig()
105 ret = drsOps->GetUint16(node, "testUserApi", &tmp, 0); in GpioTestReadConfig()
110 config->testUserApi = (uint16_t)tmp; in GpioTestReadConfig()
Duart_driver_test.c50 uint32_t *tmp = NULL; in UartTestReadConfig() local
73 tmp = (uint32_t *)OsalMemCalloc(config->len * sizeof(uint32_t)); in UartTestReadConfig()
74 if (tmp == NULL) { in UartTestReadConfig()
79 ret = drsOps->GetUint32Array(node, "wbuf", tmp, config->len, 0); in UartTestReadConfig()
83 OsalMemFree(tmp); in UartTestReadConfig()
87 config->wbuf[i] = tmp[i]; in UartTestReadConfig()
89 OsalMemFree(tmp); in UartTestReadConfig()
/drivers/peripheral/usb/ddk/device/src/
Dadapter_if.c120 char tmp[MAX_PATHLEN] = {0}; in IsDeviceDirExist() local
121 int32_t ret = snprintf_s(tmp, MAX_PATHLEN, MAX_PATHLEN - 1, "%s/%s", CONFIGFS_DIR, deviceName); in IsDeviceDirExist()
127 return IsDirExist(tmp); in IsDeviceDirExist()
154 char tmp[MAX_PATHLEN] = {0}; in UsbFnWriteProp() local
161 …ret = snprintf_s(tmp, MAX_PATHLEN, MAX_PATHLEN - 1, "%s/%s/%s", CONFIGFS_DIR, deviceName, propName… in UsbFnWriteProp()
173 return UsbFnWriteFile(tmp, tmpVal); in UsbFnWriteProp()
179 char tmp[MAX_PATHLEN] = {0}; in UsbFnWriteConfString() local
181 …ret = snprintf_s(tmp, MAX_PATHLEN, MAX_PATHLEN - 1, "%s/%s/configs/b.%d/strings/0x%x", CONFIGFS_DI… in UsbFnWriteConfString()
188 if (!IsDirExist(tmp)) { in UsbFnWriteConfString()
189 ret = mkdir(tmp, S_IREAD | S_IWRITE); in UsbFnWriteConfString()
[all …]
/drivers/peripheral/sensor/chipset/magnetic/
Dmagnetic_lsm303.c80 int32_t tmp[MAGNETIC_AXIS_NUM]; in ReadLsm303Data() local
84 (void)memset_s(tmp, sizeof(tmp), 0, sizeof(tmp)); in ReadLsm303Data()
98 tmp[MAGNETIC_X_AXIS] = rawData.x * LSM303_MAGNETIC_GIN / LSM303DLHC_SENSITIVITY_XY47GA; in ReadLsm303Data()
99 tmp[MAGNETIC_Y_AXIS] = rawData.y * LSM303_MAGNETIC_GIN / LSM303DLHC_SENSITIVITY_XY47GA; in ReadLsm303Data()
100 tmp[MAGNETIC_Z_AXIS] = rawData.z * LSM303_MAGNETIC_GIN / LSM303DLHC_SENSITIVITY_Z47GA; in ReadLsm303Data()
102 ret = SensorRawDataToRemapData(data->direction, tmp, sizeof(tmp) / sizeof(tmp[0])); in ReadLsm303Data()
108 event.dataLen = sizeof(tmp); in ReadLsm303Data()
109 event.data = (uint8_t *)&tmp; in ReadLsm303Data()
/drivers/hdf_core/framework/support/platform/src/fwk/
Dplatform_manager.c45 struct PlatformDevice *tmp = NULL; in PlatformManagerClearDevice() local
54 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->devices, struct PlatformDevice, node) { in PlatformManagerClearDevice()
129 struct PlatformDevice *tmp = NULL; in PlatformManagerAddDeviceDefault() local
133 DLIST_FOR_EACH_ENTRY(tmp, &manager->devices, struct PlatformDevice, node) { in PlatformManagerAddDeviceDefault()
134 if (device->number == tmp->number) { in PlatformManagerAddDeviceDefault()
140 if (device->name != NULL && device->name == tmp->name) { in PlatformManagerAddDeviceDefault()
262 struct PlatformDevice *tmp = NULL; in PlatformManagerFindDevice() local
275 DLIST_FOR_EACH_ENTRY(tmp, &manager->devices, struct PlatformDevice, node) { in PlatformManagerFindDevice()
276 if (tmp == NULL || !match(tmp, data)) { in PlatformManagerFindDevice()
279 if (PlatformDeviceGet(tmp) == HDF_SUCCESS) { in PlatformManagerFindDevice()
[all …]
/drivers/peripheral/usb/sample/device/linux/
Dacm_test.c71 const char *tmp = HdfSbufReadString(g_reply); in TestRead() local
72 if (tmp && strlen(tmp) > 0) { in TestRead()
73 size_t len = strlen(tmp); in TestRead()
75 if (tmp[i] == 0x0A || tmp[i] == 0x0D) { in TestRead()
78 putchar(tmp[i]); in TestRead()
Dacm_read.c43 const char *tmp = HdfSbufReadString(g_reply); in TestRead() local
44 if (tmp && strlen(tmp) > 0) { in TestRead()
49 time.tv_sec, time.tv_usec, tmp); in TestRead()
/drivers/peripheral/intelligent_voice/hdi_service/engine/
Dintell_voice_engine_adapter_impl.cpp105 uint8_t *tmp = nullptr; in Read() local
108 ReadFileDataInner(type, tmp, size); in Read()
109 if (tmp == nullptr) { in Read()
117 delete[] tmp; in Read()
118 tmp = nullptr; in Read()
137 if (!buffer->WriteToAshmem(tmp, size, 0)) { in Read()
/drivers/peripheral/sensor/chipset/gyro/
Dgyro_bmi160.c80 int32_t tmp[GYRO_AXIS_NUM]; in ReadBmi160GyroData() local
94 tmp[GYRO_X_AXIS] = rawData.x * BMI160_GYRO_SENSITIVITY_2000DPS; in ReadBmi160GyroData()
95 tmp[GYRO_Y_AXIS] = rawData.y * BMI160_GYRO_SENSITIVITY_2000DPS; in ReadBmi160GyroData()
96 tmp[GYRO_Z_AXIS] = rawData.z * BMI160_GYRO_SENSITIVITY_2000DPS; in ReadBmi160GyroData()
98 ret = SensorRawDataToRemapData(data->direction, tmp, sizeof(tmp) / sizeof(tmp[0])); in ReadBmi160GyroData()
104 event.dataLen = sizeof(tmp); in ReadBmi160GyroData()
105 event.data = (uint8_t *)&tmp; in ReadBmi160GyroData()
/drivers/hdf_core/adapter/khdf/liteos/platform/src/
Dspi_dev.c151 uint32_t tmp = 0; in SpiDevGetCfg() local
165 tmp = cfg.mode; in SpiDevGetCfg()
166 HDF_LOGI("SpiDevGetCfg: get mode 0x%x!", tmp); in SpiDevGetCfg()
168 tmp = cfg.bitsPerWord; in SpiDevGetCfg()
169 HDF_LOGI("SpiDevGetCfg: get word %u!", tmp); in SpiDevGetCfg()
171 tmp = cfg.maxSpeedHz; in SpiDevGetCfg()
172 HDF_LOGI("SpiDevGetCfg: get maxspeed %d!", tmp); in SpiDevGetCfg()
174 …ret = LOS_CopyFromKernel((void *)(uintptr_t)arg, sizeof(uint32_t), (void *)&tmp, sizeof(uint32_t)); in SpiDevGetCfg()
184 uint32_t tmp; in SpiDevSetCfg() local
192 … ret = LOS_CopyToKernel((void *)&tmp, sizeof(uint32_t), (void *)(uintptr_t)arg, sizeof(uint32_t)); in SpiDevSetCfg()
[all …]
Dgpio_dev.c56 uint16_t tmp; in GpioExecCmd() local
68 ret = GpioGetDir(gpio, &tmp); in GpioExecCmd()
73 info->direction = (unsigned char)tmp; in GpioExecCmd()
77 ret = GpioRead(gpio, &tmp); in GpioExecCmd()
82 info->value = (unsigned char)tmp; in GpioExecCmd()
/drivers/peripheral/sensor/chipset/accel/
Daccel_bmi160.c81 static int32_t tmp[ACCEL_AXIS_NUM]; in ReadBmi160Data() local
100 tmp[ACCEL_X_AXIS] = (rawData.x * SENSOR_CONVERT_UNIT) / SENSOR_CONVERT_UNIT; in ReadBmi160Data()
101 tmp[ACCEL_Y_AXIS] = (rawData.y * SENSOR_CONVERT_UNIT) / SENSOR_CONVERT_UNIT; in ReadBmi160Data()
102 tmp[ACCEL_Z_AXIS] = (rawData.z * SENSOR_CONVERT_UNIT) / SENSOR_CONVERT_UNIT; in ReadBmi160Data()
104 ret = SensorRawDataToRemapData(cfg->direction, tmp, sizeof(tmp) / sizeof(tmp[0])); in ReadBmi160Data()
110 event->dataLen = sizeof(tmp); in ReadBmi160Data()
111 event->data = (uint8_t *)&tmp; in ReadBmi160Data()
Daccel_mxc6655xa.c108 static int32_t tmp[ACCEL_AXIS_NUM]; in ReadMxc6655xaData() local
127 tmp[ACCEL_X_AXIS] = (rawData.x * SENSOR_CONVERT_UNIT) / SENSOR_CONVERT_UNIT; in ReadMxc6655xaData()
128 tmp[ACCEL_Y_AXIS] = (rawData.y * SENSOR_CONVERT_UNIT) / SENSOR_CONVERT_UNIT; in ReadMxc6655xaData()
129 tmp[ACCEL_Z_AXIS] = (rawData.z * SENSOR_CONVERT_UNIT) / SENSOR_CONVERT_UNIT; in ReadMxc6655xaData()
131 ret = SensorRawDataToRemapData(cfg->direction, tmp, sizeof(tmp) / sizeof(tmp[0])); in ReadMxc6655xaData()
137 event->dataLen = sizeof(tmp); in ReadMxc6655xaData()
138 event->data = (uint8_t *)&tmp; in ReadMxc6655xaData()
/drivers/liteos/hievent/src/
Dhiview_hievent.c63 tmp += tmplen; \
67 tmp += len; \
385 char *tmp, int length) in HiviewHieventFillPayload() argument
401 tmplen = snprintf_s(tmp, len, len - 1, " --extra "); in HiviewHieventFillPayload()
408 tmplen = snprintf_s(tmp, len, len - 1, "%s:", p->key); in HiviewHieventFillPayload()
420 tmplen = snprintf_s(tmp, len, len - 1, "%s;", regularValue); in HiviewHieventFillPayload()
433 char *tmp = NULL; in HiviewHieventConvertString() local
444 tmp = buf; in HiviewHieventConvertString()
447 tmplen = snprintf_s(tmp, len, len - 1, "eventid %d", event->eventid); in HiviewHieventConvertString()
455 tmplen = snprintf_s(tmp, len, len - 1, " -i %s", in HiviewHieventConvertString()
[all …]
/drivers/peripheral/sensor/hdi_impl/
Dsensor_impl.cpp57 uint8_t *tmp = event->data; in ReportSensorEventsData() local
60 hdfSensorEvents.data.push_back(*tmp); in ReportSensorEventsData()
61 tmp++; in ReportSensorEventsData()
143 struct SensorInformation *tmp = nullptr; in GetAllSensorInfo() local
159 tmp = sensorInfo; in GetAllSensorInfo()
162 std::string sensorName(tmp->sensorName); in GetAllSensorInfo()
164 std::string vendorName(tmp->vendorName); in GetAllSensorInfo()
166 std::string firmwareVersion(tmp->firmwareVersion); in GetAllSensorInfo()
168 std::string hardwareVersion(tmp->hardwareVersion); in GetAllSensorInfo()
170 hdfSensorInfo.sensorTypeId = tmp->sensorTypeId; in GetAllSensorInfo()
[all …]
/drivers/hdf_core/adapter/khdf/liteos_m/network/src/
Dnetbuf_adapter.c661 struct pbuf *tmp = NULL; in Pbuf2NetBuf() local
677 for (tmp = lwipBuf; tmp != NULL; tmp = tmp->next, index++) { in Pbuf2NetBuf()
678 if (tmp->len == 0 || tmp->payload == NULL) { in Pbuf2NetBuf()
682 if (NetBufGetRoom(nb, E_TAIL_BUF) < tmp->len) { in Pbuf2NetBuf()
684 __func__, NetBufGetRoom(nb, E_TAIL_BUF), tmp->len, index); in Pbuf2NetBuf()
689 if (memcpy_s(nb->mem + offset, tmp->len, tmp->payload, tmp->len) != EOK) { in Pbuf2NetBuf()
694 NetBufPush(nb, E_DATA_BUF, tmp->len); in Pbuf2NetBuf()
696 offset += tmp->len; in Pbuf2NetBuf()
/drivers/hdf_core/adapter/khdf/liteos/network/src/
Dnetbuf_adapter.c663 struct pbuf *tmp = NULL; in Pbuf2NetBuf() local
679 for (tmp = lwipBuf; tmp != NULL; tmp = tmp->next, index++) { in Pbuf2NetBuf()
680 if (tmp->len == 0 || tmp->payload == NULL) { in Pbuf2NetBuf()
684 if (NetBufGetRoom(nb, E_TAIL_BUF) < tmp->len) { in Pbuf2NetBuf()
686 __func__, NetBufGetRoom(nb, E_TAIL_BUF), tmp->len, index); in Pbuf2NetBuf()
691 if (memcpy_s(nb->mem + offset, tmp->len, tmp->payload, tmp->len) != EOK) { in Pbuf2NetBuf()
696 NetBufPush(nb, E_DATA_BUF, tmp->len); in Pbuf2NetBuf()
698 offset += tmp->len; in Pbuf2NetBuf()
/drivers/peripheral/usb/sample/device/liteos/
Dacm_test.c68 const char *tmp = HdfSbufReadString(g_reply); in TestRead() local
69 if (tmp && strlen(tmp) > 0) { in TestRead()
70 printf("%s: read : %s \n", __func__, tmp); in TestRead()
/drivers/hdf_core/framework/core/manager/src/
Ddriver_manager.c49 struct HdfDriver *tmp = NULL; in HdfUnregisterDriverEntry() local
56 DLIST_FOR_EACH_ENTRY_SAFE(driver, tmp, driverHead, struct HdfDriver, node) { in HdfUnregisterDriverEntry()
81 struct HdfDriver *tmp = NULL; in HdfUnregisterDriver() local
88 DLIST_FOR_EACH_ENTRY_SAFE(it, tmp, driverHead, struct HdfDriver, node) { in HdfUnregisterDriver()
/drivers/peripheral/sensor/chipset/proximity/
Dproximity_apds9960.c52 int32_t tmp; in ReadApds9960Data() local
68 tmp = PROXIMITY_STATE_FAR; in ReadApds9960Data()
70 tmp = PROXIMITY_STATE_NEAR; in ReadApds9960Data()
73 event.dataLen = sizeof(tmp); in ReadApds9960Data()
74 event.data = (uint8_t *)&tmp; in ReadApds9960Data()
/drivers/hdf_core/framework/model/display/driver/lcdkit/
Dlcdkit_parse_config.c168 uint32_t *tmp = array; in ParsePowerSetting() local
177 setting->power[i].type = tmp[i]; // get power type in ParsePowerSetting()
178 setting->power[i].num = tmp[i + 1]; // 1-get power num in ParsePowerSetting()
179 setting->power[i].vol = tmp[i + 2]; // 2-get power vol in ParsePowerSetting()
180 tmp += POWER_SETTING_SIZE; // next power setting in ParsePowerSetting()
205 uint32_t *tmp = array; in ParsePowerSequeue() local
214 seq->pwCtrl[i].num = tmp[i]; // get power num in ParsePowerSequeue()
215 seq->pwCtrl[i].opt = tmp[i + 1]; // 1-get power operate in ParsePowerSequeue()
216 seq->pwCtrl[i].delay = tmp[i + 2]; // 2-get power delay in ParsePowerSequeue()
217 tmp += POWER_SEQUEUE_SIZE; // next power setting in ParsePowerSequeue()

1234