/developtools/hdc/src/host/ |
H A D | host_usb.cpp | 139 HUSB hUSB = new(std::nothrow) HdcUSB(); in DetectMyNeed() local 140 if (hUSB == nullptr) { in DetectMyNeed() 141 WRITE_LOG(LOG_FATAL, "DetectMyNeed new hUSB failed"); 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 in DetectMyNeed() 185 HUSB hUSB = hSession->hUSB; KickoutZombie() local 295 CheckDescriptor(HUSB hUSB, libusb_device_descriptor& desc) CheckDescriptor() argument 324 UpdateUSBDaemonInfo(HUSB hUSB, HSession hSession, uint8_t connStatus) UpdateUSBDaemonInfo() argument 363 CheckActiveConfig(libusb_device *device, HUSB hUSB, libusb_device_descriptor& desc) CheckActiveConfig() argument 395 CheckUsbEndpoint(int& ret, HUSB hUSB, libusb_config_descriptor *descConfig) CheckUsbEndpoint() argument 441 HUSB hUSB = hSession->hUSB; CancelUsbIo() local 541 HUSB hUSB = hSession->hUSB; SubmitUsbBio() local 580 HUSB hUSB = hSession->hUSB; BeginUsbRead() local 627 OpenDeviceMyNeed(HUSB hUSB) OpenDeviceMyNeed() argument 675 FindDeviceByID(HUSB hUSB, const char *usbMountPoint, libusb_context *ctxUSB) FindDeviceByID() argument 738 HUSB hUSB = hSession->hUSB; ConnectDetectDaemon() local 778 HUSB hUSB = hSession->hUSB; SendSoftResetToDaemon() local [all...] |
H A D | host_usb.h | 44 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/ |
H A D | host_usb.cpp | 168 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 in UpdateUSBDaemonInfo() 209 OpenDeviceMyNeed(HUSB hUSB) OpenDeviceMyNeed() argument 243 CheckDescriptor(HUSB hUSB, libusb_device_descriptor& desc) OpenDeviceMyNeed() argument 268 CheckActiveConfig(libusb_device *device, HUSB hUSB, libusb_device_descriptor& desc) OpenDeviceMyNeed() argument 301 CheckUsbEndpoint(int& ret, HUSB hUSB, libusb_config_descriptor *descConfig) OpenDeviceMyNeed() argument 336 FindDeviceByID(HUSB hUSB, const char *usbMountPoint, libusb_context *ctxUSB) OpenDeviceMyNeed() argument 384 CancelUsbIo(HUSB hUSB) OpenDeviceMyNeed() argument 441 ReadUsbIO(HUSB hUSB, int exceptedSize) OpenDeviceMyNeed() argument 478 WriteUsbIO(HUSB hUSB, SerializedBuffer buf) OpenDeviceMyNeed() argument [all...] |
H A D | host_usb_wrapper.cpp | 71 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()
|
H A D | host_usb.h | 130 void CancelUsbIo(HUSB hUSB);
135 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/ |
H A D | usb.cpp | 86 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 184 HUSB hUSB = hSession->hUSB; SendToHdcStream() local [all...] |
H A D | session.cpp | 240 if (hs->hUSB == nullptr) { in EnumUSBDeviceRegister() 277 if (hs->hUSB == nullptr) { in QueryUSBDeviceRegister() 280 if (hs->hUSB->devId != devId || hs->hUSB->busId != busId) { in QueryUSBDeviceRegister() 379 HUSB hUSB = new HdcUSB(); in MallocSessionByConnectType() local 380 if (!hUSB) { in MallocSessionByConnectType() 384 hSession->hUSB = hUSB; in MallocSessionByConnectType() 385 hSession->hUSB->wMaxPacketSizeSend = MAX_PACKET_SIZE_HISPEED; in MallocSessionByConnectType() 503 if (!hSession->hUSB) { in FreeSessionByConnectType() 506 HUSB hUSB = hSession->hUSB; FreeSessionByConnectType() local [all...] |
H A D | define_plus.h | 236 HUSB hUSB; member 282 hUSB = nullptr; in HdcSession()
|
/developtools/hdc/src/daemon/ |
H A D | daemon_usb.cpp | 149 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, tru in ConnectEPPoint() 205 CloseEndpoint(HUSB hUSB, bool closeCtrlEp) CloseEndpoint() argument 587 auto hUSB = reinterpret_cast<HUSB>(ctxIo->data); OnUSBRead() local 656 LoopUSBRead(HUSB hUSB, int readMaxWanted) LoopUSBRead() argument 685 HUSB hUSB = &thisClass->usbHandle; WatchEPTimer() local [all...] |
H A D | daemon_usb.h | 43 int ConnectEPPoint(HUSB hUSB); 46 void CloseEndpoint(HUSB hUSB, bool closeCtrlEp = false); 49 int LoopUSBRead(HUSB hUSB, int readMaxWanted);
|
/developtools/hdc/test/fuzztest/daemonusbread_fuzzer/ |
H A D | DaemonUsbRead_fuzzer.cpp | 39 HdcUSB hUSB = {}; in FuzzDaemonUsbRead() local 40 hUSB.wMaxPacketSizeSend = MAX_PACKET_SIZE_HISPEED; in FuzzDaemonUsbRead() 43 ctxRecv.data = &hUSB; in FuzzDaemonUsbRead()
|