Lines Matching defs:sta

38 static void CloseOnlineDev(InputDevDesc *sta, int32_t len);
39 static void OpenOnlineDev(InputDevDesc *sta, int32_t len);
52 InputDevDesc sta[MAX_DEVICES];
53 ret = memset_s(sta, MAX_DEVICES * sizeof(InputDevDesc), 0, MAX_DEVICES * sizeof(InputDevDesc));
65 ret = g_inputInterface->iInputManager->ScanInputDevice(sta, MAX_DEVICES);
70 if (sta[i].devIndex == 0) {
138 static void OpenOnlineDev(InputDevDesc *sta, int32_t len)
140 int32_t ret = g_inputInterface->iInputManager->ScanInputDevice(sta, len);
147 if (sta[i].devIndex == 0) {
150 ret = g_inputInterface->iInputManager->OpenInputDevice(sta[i].devIndex);
152 HDF_LOGE("%s: open device[%d] failed, ret %d", __func__, sta[i].devIndex, ret);
156 ret = g_inputInterface->iInputReporter->RegisterReportCallback(sta[i].devIndex, &g_callback);
158 HDF_LOGE("%s: register callback failed for device[%d], ret %d", __func__, sta[i].devIndex, ret);
164 static void CloseOnlineDev(InputDevDesc *sta, int32_t len)
166 int32_t ret = g_inputInterface->iInputManager->ScanInputDevice(sta, len);
173 if (sta[i].devIndex == 0) {
176 ret = g_inputInterface->iInputReporter->UnregisterReportCallback(sta[i].devIndex);
178 HDF_LOGE("%s: register callback failed for device[%d], ret %d", __func__, sta[i].devIndex, ret);
182 ret = g_inputInterface->iInputManager->CloseInputDevice(sta[i].devIndex);
184 HDF_LOGE("%s: close device[%d] failed, ret %d", __func__, sta[i].devIndex, ret);
192 InputDevDesc sta[MAX_DEVICES];
200 ret = g_inputInterface->iInputManager->ScanInputDevice(sta, sizeof(sta)/sizeof(InputDevDesc));
202 HDF_LOGI("%s:%d, %d, %d, %d", __func__, sta[0].devType, sta[0].devIndex, sta[1].devType, sta[1].devIndex);
212 InputDevDesc sta[MAX_DEVICES];
214 ret = memset_s(sta, sizeof(sta), 0, sizeof(sta));
229 OpenOnlineDev(sta, MAX_DEVICES);
235 ret = memset_s(sta, sizeof(sta), 0, sizeof(sta));
240 CloseOnlineDev(sta, MAX_DEVICES);