Lines Matching defs:device
137 bool HdcHostUSB::DetectMyNeed(libusb_device *device, string &sn)
144 hUSB->device = device;
156 WRITE_LOG(LOG_INFO, "Needed device found, busid:%d devid:%d connectkey:%s", hUSB->busId, hUSB->devId,
158 // USB device is automatically connected after recognition, auto connect USB
226 WRITE_LOG(LOG_FATAL, "Failed to get device list");
246 bool HdcHostUSB::HasValidDevice(libusb_device *device)
249 int ret = libusb_get_active_config_descriptor(device, &descConfig);
299 uint8_t curBus = libusb_get_bus_number(hUSB->device);
300 uint8_t curDev = libusb_get_device_address(hUSB->device);
303 if (libusb_get_device_descriptor(hUSB->device, &desc)) {
307 // Get the serial number of the device, if there is no serial number, use the ID number to replace
308 // If the device is not in time, occasionally can't get it, this is determined by the external factor, cannot be
363 int HdcHostUSB::CheckActiveConfig(libusb_device *device, HUSB hUSB, libusb_device_descriptor& desc)
366 int ret = libusb_get_active_config_descriptor(device, &descConfig);
379 ret = libusb_get_active_config_descriptor(device, &descConfig);
629 libusb_device *device = hUSB->device;
631 int OpenRet = libusb_open(device, &hUSB->devHandle);
642 if (CheckActiveConfig(device, hUSB, desc)) {
645 // USB filter rules are set according to specific device pedding device
652 // not my need device, release the device
712 hUSB->device = listDevices[i];
734 // Determines that daemonInfo must have the device