Home
last modified time | relevance | path

Searched refs:hUSB (Results 1 – 10 of 10) sorted by relevance

/developtools/hdc/src/host/
Dhost_usb.cpp139 HUSB hUSB = new(std::nothrow) HdcUSB(); in DetectMyNeed() local
140 if (hUSB == nullptr) { in DetectMyNeed()
144 hUSB->device = device; in DetectMyNeed()
146 int childRet = OpenDeviceMyNeed(hUSB); in DetectMyNeed()
149 delete hUSB; in DetectMyNeed()
152 libusb_release_interface(hUSB->devHandle, hUSB->interfaceNumber); in DetectMyNeed()
153 libusb_close(hUSB->devHandle); in DetectMyNeed()
154 hUSB->devHandle = nullptr; in DetectMyNeed()
156 …WRITE_LOG(LOG_INFO, "Needed device found, busid:%d devid:%d connectkey:%s", hUSB->busId, hUSB->dev… in DetectMyNeed()
157 hUSB->serialNumber.c_str()); in DetectMyNeed()
[all …]
Dhost_usb.h44 void CheckUsbEndpoint(int& ret, HUSB hUSB, libusb_config_descriptor *descConfig);
45 int CheckActiveConfig(libusb_device *device, HUSB hUSB, libusb_device_descriptor& desc);
46 int OpenDeviceMyNeed(HUSB hUSB);
48 int CheckDescriptor(HUSB hUSB, libusb_device_descriptor& desc);
51 bool FindDeviceByID(HUSB hUSB, const char *usbMountPoint, libusb_context *ctxUSB);
54 void UpdateUSBDaemonInfo(HUSB hUSB, HSession hSession, uint8_t connStatus);
/developtools/hdc/hdc_rust/src/cffi/host/
Dhost_usb.cpp168 HUSB hUSB = new(std::nothrow) HdcUSB(); in DetectMyNeed() local
169 if (hUSB == nullptr) { in DetectMyNeed()
172 hUSB->device = device; in DetectMyNeed()
174 int childRet = OpenDeviceMyNeed(hUSB); in DetectMyNeed()
176 delete hUSB; in DetectMyNeed()
179 UpdateUSBDaemonInfo(hUSB, STATUS_READY); in DetectMyNeed()
181 mapUsbDevice[hUSB->serialNumber] = hUSB; in DetectMyNeed()
185 void HostUsb::UpdateUSBDaemonInfo(HUSB hUSB, uint8_t connStatus) in UpdateUSBDaemonInfo() argument
189 di.connectKey = hUSB->serialNumber; in UpdateUSBDaemonInfo()
193 di.usbMountPoint = StringFormat("%d-%d", hUSB->busId, hUSB->devId); in UpdateUSBDaemonInfo()
[all …]
Dhost_usb_wrapper.cpp71 HUSB hUSB = usbPtr->GetUsbDevice(std::string(key)); in OnDeviceConnected() local
73 usbPtr->UpdateUSBDaemonInfo(hUSB, success ? STATUS_CONNECTED : STATUS_OFFLINE); in OnDeviceConnected()
90 HUSB hUSB = usbPtr->GetUsbDevice(std::string(key)); in WriteUsb() local
92 return usbPtr->WriteUsbIO(hUSB, buf); in WriteUsb()
118 HUSB hUSB = usbPtr->GetUsbDevice(std::string(key)); in ReadUsb() local
120 return usbPtr->ReadUsbIO(hUSB, exceptedSize); in ReadUsb()
137 HUSB hUSB = usbPtr->GetUsbDevice(std::string(key)); in CancelUsbIo() local
139 usbPtr->CancelUsbIo(hUSB); in CancelUsbIo()
Dhost_usb.h135 void UpdateUSBDaemonInfo(HUSB hUSB, uint8_t connStatus);
140 void CheckUsbEndpoint(int& ret, HUSB hUSB, libusb_config_descriptor *descConfig);
142 int CheckActiveConfig(libusb_device *device, HUSB hUSB, libusb_device_descriptor& desc);
144 int CheckActiveConfig(libusb_device *device, HUSB hUSB);
146 int OpenDeviceMyNeed(HUSB hUSB);
148 int CheckDescriptor(HUSB hUSB, libusb_device_descriptor& desc);
150 bool FindDeviceByID(HUSB hUSB, const char *usbMountPoint, libusb_context *ctxUSB);
/developtools/hdc/src/common/
Dusb.cpp86 std::lock_guard<std::mutex> lock(hSession->hUSB->lockSendUsbBlock); in SendUSBBlock()
97 if (childRet > 0 && (childRet % hSession->hUSB->wMaxPacketSizeSend == 0)) { in SendUSBBlock()
140 HUSB hUSB = hSession->hUSB; in PreSendUsbSoftReset() local
141 if (hSession->serverOrDaemon && !hUSB->resetIO) { in PreSendUsbSoftReset()
142 hUSB->lockSendUsbBlock.lock(); in PreSendUsbSoftReset()
148 hUSB->lockSendUsbBlock.unlock(); in PreSendUsbSoftReset()
149 hUSB->resetIO = true; in PreSendUsbSoftReset()
155 HUSB hUSB = hSession->hUSB; in CheckPacketOption() local
173 hUSB->payloadSize = header->dataSize; in CheckPacketOption()
176 return hUSB->payloadSize; in CheckPacketOption()
[all …]
Dsession.cpp229 if (hs->hUSB == nullptr) { in EnumUSBDeviceRegister()
266 if (hs->hUSB == nullptr) { in QueryUSBDeviceRegister()
269 if (hs->hUSB->devId != devId || hs->hUSB->busId != busId) { in QueryUSBDeviceRegister()
368 HUSB hUSB = new HdcUSB(); in MallocSessionByConnectType() local
369 if (!hUSB) { in MallocSessionByConnectType()
373 hSession->hUSB = hUSB; in MallocSessionByConnectType()
374 hSession->hUSB->wMaxPacketSizeSend = MAX_PACKET_SIZE_HISPEED; in MallocSessionByConnectType()
492 if (!hSession->hUSB) { in FreeSessionByConnectType()
495 HUSB hUSB = hSession->hUSB; in FreeSessionByConnectType() local
496 if (!hUSB) { in FreeSessionByConnectType()
[all …]
Ddefine_plus.h419 HUSB hUSB; member
463 hUSB = nullptr; in HdcSession()
/developtools/hdc/src/daemon/
Ddaemon_usb.cpp149 int HdcDaemonUSB::ConnectEPPoint(HUSB hUSB) in ConnectEPPoint() argument
180 if ((hUSB->bulkOut = open(outPath.c_str(), O_RDWR)) < 0) { in ConnectEPPoint()
185 if ((hUSB->bulkIn = open(inPath.c_str(), O_RDWR)) < 0) { in ConnectEPPoint()
191 fcntl(hUSB->bulkOut, F_SETFD, FD_CLOEXEC); in ConnectEPPoint()
192 fcntl(hUSB->bulkIn, F_SETFD, FD_CLOEXEC); in ConnectEPPoint()
193 hUSB->wMaxPacketSizeSend = GetMaxPacketSize(hUSB->bulkIn); in ConnectEPPoint()
195 … WRITE_LOG(LOG_DEBUG, "New bulk in\\out open bulkout:%d bulkin:%d", hUSB->bulkOut, hUSB->bulkIn); in ConnectEPPoint()
200 CloseEndpoint(hUSB, true); in ConnectEPPoint()
205 void HdcDaemonUSB::CloseEndpoint(HUSB hUSB, bool closeCtrlEp) in CloseEndpoint() argument
207 Base::CloseFd(hUSB->bulkIn); in CloseEndpoint()
[all …]
Ddaemon_usb.h43 int ConnectEPPoint(HUSB hUSB);
46 void CloseEndpoint(HUSB hUSB, bool closeCtrlEp = false);
49 int LoopUSBRead(HUSB hUSB, int readMaxWanted);