Home
last modified time | relevance | path

Searched refs:hUSB (Results 1 – 8 of 8) 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()
148 delete hUSB; in DetectMyNeed()
151 libusb_release_interface(hUSB->devHandle, hUSB->interfaceNumber); in DetectMyNeed()
152 libusb_close(hUSB->devHandle); in DetectMyNeed()
153 hUSB->devHandle = nullptr; in DetectMyNeed()
155 …WRITE_LOG(LOG_INFO, "Needed device found, busid:%d devid:%d connectkey:%s", hUSB->busId, hUSB->dev… in DetectMyNeed()
156 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);
Dserver.cpp721 if (++hSession->hUSB->retryCount > usbConnectRetryMax) { // max 15s in UsbPreConnect()
/developtools/hdc/src/common/
Dusb.cpp81 std::lock_guard<std::mutex> lock(hSession->hUSB->lockSendUsbBlock); in SendUSBBlock()
92 if (childRet > 0 && (childRet % hSession->hUSB->wMaxPacketSizeSend == 0)) { in SendUSBBlock()
135 HUSB hUSB = hSession->hUSB; in PreSendUsbSoftReset() local
136 if (hSession->serverOrDaemon && !hUSB->resetIO) { in PreSendUsbSoftReset()
137 hUSB->lockSendUsbBlock.lock(); in PreSendUsbSoftReset()
143 hUSB->lockSendUsbBlock.unlock(); in PreSendUsbSoftReset()
144 hUSB->resetIO = true; in PreSendUsbSoftReset()
150 HUSB hUSB = hSession->hUSB; in CheckPacketOption() local
168 hUSB->payloadSize = header->dataSize; in CheckPacketOption()
171 return hUSB->payloadSize; in CheckPacketOption()
[all …]
Dsession.cpp225 if (hs->hUSB == nullptr) { in EnumUSBDeviceRegister()
262 if (hs->hUSB == nullptr) { in QueryUSBDeviceRegister()
265 if (hs->hUSB->devId != devId || hs->hUSB->busId != busId) { in QueryUSBDeviceRegister()
364 HUSB hUSB = new HdcUSB(); in MallocSessionByConnectType() local
365 if (!hUSB) { in MallocSessionByConnectType()
369 hSession->hUSB = hUSB; in MallocSessionByConnectType()
370 hSession->hUSB->wMaxPacketSizeSend = MAX_PACKET_SIZE_HISPEED; in MallocSessionByConnectType()
480 if (!hSession->hUSB) { in FreeSessionByConnectType()
483 HUSB hUSB = hSession->hUSB; in FreeSessionByConnectType() local
484 if (!hUSB) { in FreeSessionByConnectType()
[all …]
Ddefine_plus.h413 HUSB hUSB; member
457 hUSB = nullptr; in HdcSession()
/developtools/hdc/src/daemon/
Ddaemon_usb.cpp148 int HdcDaemonUSB::ConnectEPPoint(HUSB hUSB) in ConnectEPPoint() argument
177 if ((hUSB->bulkOut = open(outPath.c_str(), O_RDWR)) < 0) { in ConnectEPPoint()
182 if ((hUSB->bulkIn = open(inPath.c_str(), O_RDWR)) < 0) { in ConnectEPPoint()
188 fcntl(hUSB->bulkOut, F_SETFD, FD_CLOEXEC); in ConnectEPPoint()
189 fcntl(hUSB->bulkIn, F_SETFD, FD_CLOEXEC); in ConnectEPPoint()
190 hUSB->wMaxPacketSizeSend = GetMaxPacketSize(hUSB->bulkIn); in ConnectEPPoint()
192 … WRITE_LOG(LOG_DEBUG, "New bulk in\\out open bulkout:%d bulkin:%d", hUSB->bulkOut, hUSB->bulkIn); in ConnectEPPoint()
197 CloseEndpoint(hUSB, true); in ConnectEPPoint()
202 void HdcDaemonUSB::CloseEndpoint(HUSB hUSB, bool closeCtrlEp) in CloseEndpoint() argument
204 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);