Lines Matching refs:hUSB
225 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()
488 if (hUSB->devHandle) { in FreeSessionByConnectType()
489 libusb_release_interface(hUSB->devHandle, hUSB->interfaceNumber); in FreeSessionByConnectType()
490 libusb_close(hUSB->devHandle); in FreeSessionByConnectType()
491 hUSB->devHandle = nullptr; in FreeSessionByConnectType()
494 Base::CloseFd(hUSB->bulkIn); in FreeSessionByConnectType()
495 Base::CloseFd(hUSB->bulkOut); in FreeSessionByConnectType()
497 delete hSession->hUSB; in FreeSessionByConnectType()
498 hSession->hUSB = nullptr; in FreeSessionByConnectType()
585 if (hSession->hUSB != nullptr in FreeSessionOpeate()
586 && (!hSession->hUSB->hostBulkIn.isShutdown || !hSession->hUSB->hostBulkOut.isShutdown)) { in FreeSessionOpeate()